feat: dev-5.1 分支基线(v1.3.35 发版后代码 + 5.1 声道改造文档)
- 以 main(ccc65af) 为基线提交当前工作区代码
- 新增 5.1 声道改造文档两份
- .gitignore 补充 .vscode/、.screenshots/
This commit is contained in:
22
test/voice_helper/security_test.sh
Normal file
22
test/voice_helper/security_test.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/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)"
|
||||
Reference in New Issue
Block a user