autonomyproof/autonomyproof-cli

GitHub: autonomyproof/autonomyproof-cli

AutonomyProof 是一款确定性本地静态扫描工具,用于检测 AI Agent 代码中的未受限权限和危险操作,并可通过 CI 门禁在授予新权限时自动阻断 PR。

Stars: 0 | Forks: 0

# AutonomyProof **证明你的 AI agent 无法被武器化——即使被诱导欺骗——因为它从一开始就不具备造成破坏的未受限权限。** 你无法净化你的 agent 将要阅读的每一个页面、电子邮件和文档——因此追踪诱导欺骗注定是徒劳的。真正可靠的防线是每位管理者都熟知的策略:**仅授予 agent 真正所需的访问权限,并对其无法撤销的任何操作要求人工介入。** [![CI](https://static.pigsec.cn/wp-content/uploads/repos/cas/ad/ad5834178f7599af9fdda11629d49cae07f2997beec49821b2920eff5bfd50e7.svg)](https://github.com/autonomyproof/autonomyproof-cli/actions/workflows/ci.yml) [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE) [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)](#testing) ## 安装 ``` pipx install autonomyproof # recommended # 或 pip install autonomyproof ``` ## 快速开始 ``` autonomyproof init # writes autonomyproof.yaml + .autonomyproofignore autonomyproof scan . # scans the current directory autonomyproof report open # opens the latest HTML report ``` 扫描内置的漏洞示例以查看其运行效果: ``` autonomyproof scan examples/vulnerable-langgraph-agent ``` ## 检测内容 确定性规则涵盖不受限制的 shell/`eval`、任意文件系统和凭证访问、SSRF、无限制的网络调用、未经批准的危险工具、缺失的执行限制、模型控制的 SQL、MCP 参数验证、token 直通、guardrail 自我修改、模型上下文中的机密信息等。运行 `autonomyproof rules list` 查看完整目录,运行 `autonomyproof rules explain AG001` 查看详情。 ## 隐私 扫描完全在本地进行。如果关联了云端账户,仅会推送**脱敏后的**发现结果(规则 ID、严重程度、相对路径、行号、经隐藏的证据、指纹等)——绝不会上传源码、机密信息、提示词或工具输出。使用 `--local-only` 可确保零网络调用。 ``` autonomyproof scan . --local-only ``` ## 输出格式 ``` autonomyproof scan . --format all # html + json + sarif autonomyproof scan . --format sarif # for GitHub code scanning autonomyproof scan . --fail-on high # non-zero exit for CI gating ``` ## CI (GitHub Actions) ``` - run: pipx install autonomyproof - run: autonomyproof scan . --fail-on critical --format sarif env: AUTONOMYPROOF_TOKEN: ${{ secrets.AUTONOMYPROOF_TOKEN }} # optional, enables cloud push - uses: github/codeql-action/upload-sarif@v3 with: sarif_file: autonomyproof-report.sarif ``` ## 就绪评分 初始分为 100;根据发现的问题进行扣分(Critical 扣 20 分,High 扣 10 分,Medium 扣 5 分,Low 扣 2 分,最低降至 0 分)。评级区间:80–100 为低风险,60–79 为中等风险,40–59 为高风险,0–39 为严重风险。 ## 测试 ``` pip install -e ".[dev]" pytest # runs the suite and enforces 100% branch coverage ``` ## 平台的其他部分 AutonomyProof Cloud 增加了扫描历史记录、版本对比、私有保障报告、团队工作流和策略管理。在 [autonomyproof.io](https://autonomyproof.io) 了解更多。
标签:Blue Team, 逆向工具