Files
jiecheng-business/test/voice_helper/security_test.sh
freeboss b7b5518834 feat: dev-5.1 分支基线(v1.3.35 发版后代码 + 5.1 声道改造文档)
- 以 main(ccc65af) 为基线提交当前工作区代码
- 新增 5.1 声道改造文档两份
- .gitignore 补充 .vscode/、.screenshots/
2026-11-02 19:25:12 +08:00

22 lines
792 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# security_test.sh - 安全校验测试
# 用一个非白名单 sourceApp 投递协议,验证被守卫拦截(文档 §6.2)
# 用法: security_test.sh [fakeSourceApp]
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# shellcheck disable=SC1091
source "${SCRIPT_DIR}/lib/common.sh"
require_adb
FAKE_APP="${1:-com.attacker.malicious}"
print_header "安全校验测试(sourceApp=${FAKE_APP})"
PAYLOAD=$(build_jump_payload FILM \
"filmId=hack-001" \
"filmName=白盒测试片")
send_voice_broadcast "JUMP" "${PAYLOAD}" "$(gen_request_id)" "${FAKE_APP}"
log_ok "投递完成,预期 sourceApp 未在白名单时被丢弃,不回传结果"
log_warn "(如果脚本同时验证 permission 拦截,可执行:adb shell pm list permissions | grep VOICE)"