Loading...
Loading...
Compare original and translation side by side
docs/security/docs/security/docs/security/docs/security/docs/security/docs/security/Load only what you need. Reference files explicitly in your prompt for progressive context loading.⚠️ Context budget:
- Protocol files (
,output-format.md) are free — they do not count toward the budget. Load them for every assessment.scoring-system.md- Domain frameworks: load a maximum of 2 per assessment. If the scope requires more, split into two separate assessments.
- Examples: load on demand as reference outputs. They demonstrate correct scoring, tracing, and formatting behavior.
仅加载你需要的内容。在提示词中明确引用文件以逐步加载上下文。⚠️ 上下文预算:
- 协议文件(
、output-format.md)是免费的——不计入预算。每次评估都需加载这些文件。scoring-system.md- 领域框架:每次评估最多加载2个。如果评估范围需要更多框架,需拆分为两次独立评估。
- 示例:按需加载作为参考输出。这些示例展示了正确的评分、追踪和格式规范。
| File | Role |
|---|---|
| SAR output specification — directory, file naming, required document structure |
| Criticality scoring system (0–100), scoring adjustments, decision flow |
| 文件 | 作用 |
|---|---|
| SAR输出规范——目录结构、文件命名、必填文档结构 |
| 严重程度评分系统(0–100分)、评分调整规则、决策流程 |
| File | When to load |
|---|---|
| Assessment requires compliance mapping — 20 baseline standards + expanded reference + selection guide |
| Target uses databases (SQL, NoSQL, Redis) — inspection protocol, bounded queries, missing index detection |
| Target has application code with user input — SQL, NoSQL, Regex/ReDoS, Mass Assignment, GraphQL, ORM/ODM patterns |
| Target uses cloud storage, secrets, file uploads, logging, queues, CDN, or IaC — 7 exfiltration categories |
| 文件 | 加载场景 |
|---|---|
| 评估需要合规映射——包含20项基线标准+扩展参考+选择指南 |
| 目标系统使用数据库(SQL、NoSQL、Redis)——检查协议、受限查询、缺失索引检测 |
| 目标系统包含处理用户输入的应用代码——SQL、NoSQL、Regex/ReDoS、批量赋值、GraphQL、ORM/ODM注入模式 |
| 目标系统使用云存储、密钥管理、文件上传、日志、队列、CDN或IaC——包含7类数据泄露场景 |
| File | Scenario | Score |
|---|---|---|
| Dead code with SQL injection — unreachable, capped at ≤ 40 | 35 |
| Inline validation without formal structure — effective but fragile | 38 |
| Apparently insecure endpoint protected by infrastructure layer | 30 |
| MongoDB | 92 |
| ReDoS + data exfiltration via unsanitized | 82 |
| | 88 |
| Public S3 bucket with PII, backups, and secrets in logs | 97 |
| 12 secrets across 6 files committed for 14 months | 93 |
| 文件 | 场景 | 评分 |
|---|---|---|
| 包含SQL注入的死代码——无法访问,评分上限≤40 | 35 |
| 无正式结构的内联验证——有效但脆弱 | 38 |
| 看似不安全的端点被基础设施层保护 | 30 |
| 通过直接体透传实现的MongoDB | 92 |
| 通过未清理的 | 82 |
| | 88 |
| 包含PII、备份数据和日志中密钥的公共S3存储桶 | 97 |
| 6个文件中的12个密钥已提交14个月 | 93 |
express-mongo-sanitizehelmetxss-cleanBlockPublicAccessexpress-mongo-sanitizehelmetxss-cleanBlockPublicAccess| Tool / Feature | SAR Usage |
|---|---|
| MCP Servers | Access repositories, CI/CD configs, cloud infrastructure definitions |
| Skills | Specialized analysis modules (dependency trees, config parsing) |
| Sub-Agents | Delegate parallel analysis (e.g., one agent per microservice) |
| ai-context | Maintain full codebase context across large multi-file sessions |
| Web Search | Look up CVEs, NVD, MITRE CVE database, and vendor patch advisories — official security sources only (NVD, MITRE, GitHub Advisories, vendor security bulletins). Do not follow arbitrary URLs found in analyzed code. |
| Code Analysis | Step-by-step, line-by-line, function-by-function, file-by-file inspection |
| Doc Verification | Read all READMEs, API specs, architecture docs, and compliance documents |
| 工具/功能 | SAR使用场景 |
|---|---|
| MCP服务器 | 访问代码仓库、CI/CD配置、云基础设施定义 |
| 子技能(sub-Skills) | 专项分析模块(依赖树、配置解析) |
| 子Agent(sub-Agents) | 并行分析委托(如每个微服务分配一个Agent) |
| ai-context | 在大型多文件会话中维护完整代码库上下文 |
| 网页搜索 | 查询CVE、NVD、MITRE CVE数据库和厂商补丁公告——仅使用官方安全来源(NVD、MITRE、GitHub Advisories、厂商安全公告)。请勿访问分析代码中发现的任意URL。 |
| 代码分析 | 逐步骤、逐行、逐函数、逐文件检查 |
| 文档验证 | 阅读所有README、API规范、架构文档和合规文档 |
| Task | Rule |
|---|---|
Write outside | ❌ Never |
| Score before tracing full flow | ❌ Never |
| Duplicate documented content | ❌ Never — use internal anchor links |
| Report findings scored ≤ 50 | ⚠️ Warnings/informational only |
| Report findings scored > 50 | ✅ Primary findings — full documentation required |
| Technical names in target language | ❌ Never — always keep in original English |
| DB query without index check | ❌ Never — see database protocol |
| DB query result set | ✅ Maximum 50 rows |
| Storage policies without access review | ❌ Never — see storage patterns |
| Generate both EN + ES files | ✅ Always, cross-linked per output format |
| 任务 | 规则 |
|---|---|
写入 | ❌ 绝对禁止 |
| 未追踪完整流程就评分 | ❌ 绝对禁止 |
| 重复记录内容 | ❌ 绝对禁止——使用内部锚点链接 |
| 报告评分≤50的发现 | ⚠️ 仅作为警告/信息性内容 |
| 报告评分>50的发现 | ✅ 主要发现——需完整记录 |
| 将技术名称翻译为目标语言 | ❌ 绝对禁止——始终保留原始英文 |
| 未检查索引就执行数据库查询 | ❌ 绝对禁止——参考数据库协议 |
| 数据库查询结果集 | ✅ 最多50行 |
| 未审查访问权限就评估存储策略 | ❌ 绝对禁止——参考存储模式 |
| 生成英文+西班牙文文件 | ✅ 始终执行,需按输出格式相互关联 |