apiiro-guardian
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApiiro Guardian
Apiiro Guardian
Ask security questions and get AI-powered analysis about your repository.
提出安全问题并获取关于您代码仓库的AI驱动分析结果。
Query
查询
Auto-detects the current git repository for context (like does). No need to specify a repo explicitly — Guardian picks it up from the git remote.
risksImportant: Before running a query, consider whether the question is repo-specific or org-wide:
- Repo-specific (default): questions about the current repo's code, risks, auth flows, dependencies, etc.
- Org-wide (): questions about the org's policies, top risks across all repos, general security posture, or anything not tied to a specific codebase.
--global
If the question is clearly about the org as a whole (e.g. "top risks last week", "what are our policies"), use . If it's unclear, ask the user: "Should I scope this to the current repo, or across your whole org?"
--globalbash
apiiro guardian query "what risks exist in this repo"
apiiro guardian query "deep analysis of auth flow" --model normal
apiiro guardian query "what is STRIDE?" --global # General security question
apiiro guardian query "top risks across the org last week" --global
apiiro guardian query "what are our org security policies?" --global
apiiro guardian query "detailed analysis" --timeout 120 # 120s timeout
apiiro guardian query "risk analysis" -f analysis.mdOptions: (default: ), , (default: 60), .
--model <fast|normal>fast-g, --global--timeout <seconds>-f, --file <path>In TTY mode, responses stream with markdown rendering.
会自动检测当前git仓库以获取上下文(与命令的逻辑一致)。无需明确指定仓库——Guardian会从git远程仓库信息中自动识别。
risks重要提示: 在运行查询前,请确认问题是针对特定仓库还是整个组织:
- 特定仓库(默认):关于当前仓库代码、风险、认证流程、依赖项等的问题
- 全组织范围(参数):关于组织政策、所有仓库中的顶级风险、整体安全态势,或任何不绑定到特定代码库的问题
--global
如果问题明确针对整个组织(例如“上周的顶级风险”“我们的政策有哪些”),请使用参数。若问题不明确,请询问用户:“我应该将查询范围限定为当前仓库,还是覆盖整个组织?”
--globalbash
apiiro guardian query "what risks exist in this repo"
apiiro guardian query "deep analysis of auth flow" --model normal
apiiro guardian query "what is STRIDE?" --global # 通用安全问题
apiiro guardian query "top risks across the org last week" --global
apiiro guardian query "what are our org security policies?" --global
apiiro guardian query "detailed analysis" --timeout 120 # 120秒超时
apiiro guardian query "risk analysis" -f analysis.md可选参数:(默认值:)、、(默认值:60)、。
--model <fast|normal>fast-g, --global--timeout <seconds>-f, --file <path>在TTY模式下,响应内容会以流式方式呈现并支持markdown渲染。
Repository Management
仓库管理
bash
apiiro guardian repository detect # Detect and verify repo in Apiiro
apiiro guardian repository clear # Clear cached repo info
apiiro guardian repository clear --global # Clear all cached reposDetection results are cached for 24 hours.
bash
apiiro guardian repository detect # 在Apiiro中检测并验证仓库
apiiro guardian repository clear # 清除缓存的仓库信息
apiiro guardian repository clear --global # 清除所有缓存的仓库信息检测结果的缓存有效期为24小时。