用途:为获授权的二进制与仓库托管的提示面提供可组合、可重复的安全/内部测试原语,把安全流程拆成可测试、可复用的组件。仅可用于自己拥有或明确获授权的二进制;不得用于绕过法律限制或未经授权提取第三方专有内容;优先做行为保障与策略门禁,而非临时性逆向。
主要能力(原语):collect-static 收集文件元数据、运行时启发式、链接库、内嵌归档签名;collect-dynamic 在沙箱中执行跟踪进程、文件变化、网络端点;collect-contract 从 help 面探测生成机器可读行为契约;compare-baseline 对比当前与基线契约漂移(增删命令、运行时变化);enforce-policy 执行允许/拒绝清单并按严重度裁决;collect-redteam 对仓库面做离线攻击包扫描(提示注入、工具误用、密钥外泄、不安全 shell 回归);run 作为薄编排器组合原语并写入套件摘要。
使用方式:单次运行默认动态命令为 --help,例如 python3 skills/security-suite/scripts/security_suite.py run --binary "$(command -v ao)" --out-dir .tmp/security-suite/ao-current。基线回归门禁加 --baseline-dir 与 --fail-on-removed;策略门禁加 --policy-file 与 --fail-on-policy-fail;仓库面红队用 python3 skills/security-suite/scripts/prompt_redteam.py scan --repo-root . --pack-file skills/security-suite/references/agentops-redteam-pack.json --out-dir .tmp/security-suite-redteam。推荐流程:在已知良好版本上捕获基线,在 CI 对候选二进制运行套件,对比基线并执行策略,失败则阻止晋级。
输出:全部写入 --out-dir,包括 static/static-analysis.json、dynamic/dynamic-analysis.json、contract/contract.json,以及(提供时)compare/baseline-diff.json、policy/policy-verdict.json、redteam/redteam-results.json 和 suite-summary.json,便于 CI 消费。
策略与红队模型:策略可从 policy-example.json 起步,支持 required_top_level_commands、deny_command_patterns、max_created_files、forbid_file_path_patterns、allow/deny_network_endpoint_patterns、block_if_removed_commands、min_command_count。红队包以 agentops-redteam-pack.json 起步,目标字段支持 globs、require_groups、forbidden_any、applies_if_any,每个用例是具体对抗提示或绕过尝试并绑定仓库文件。
限制:需 --help 类接口才能捕获契约,动态分析可能因参数或沙箱限制为空;红队正则可能过脆或不再匹配防护语言;套件设计为模块化,可后续添加更深原语,当前资料未提供收费、价格与平台信息。