Loading...
Loading...
Compare original and translation side by side
../../shared/schemas/flags.md| Flag | Hardening Behavior |
|---|---|
| Default |
| Check for missing security headers and obvious hardening gaps only. |
| Full hardening review: headers, validation, logging, error handling, configuration. |
| Standard + analyze middleware chains, review all trust boundaries, check defense layering. |
| Deep + compare against security benchmarks (CIS, OWASP ASVS), generate hardening scorecard. |
| Filter suggestions by impact level. |
| Default |
../../shared/schemas/flags.md| 标志 | 加固行为 |
|---|---|
| 默认值为 |
| 仅检查缺失的安全头和明显的加固缺口。 |
| 完整的加固审查:安全头、验证、日志记录、错误处理、配置。 |
| 标准审查 + 分析中间件链、检查所有信任边界、验证防御分层。 |
| 深度审查 + 对照安全基准(CIS、OWASP ASVS)进行比较,生成加固评分卡。 |
| 按影响级别过滤建议。 |
| 默认值为 |
| Header | Recommended Value | Impact |
|---|---|---|
| Strict policy, no | Mitigates XSS |
| | Enforces HTTPS |
| | Prevents MIME sniffing |
| | Prevents clickjacking |
| | Limits referrer leakage |
| Disable unused browser features | Reduces attack surface |
| | Prevents cross-origin attacks |
| | Controls resource sharing |
| | Prevents cache leaks |
| 头信息 | 推荐值 | 影响 |
|---|---|---|
| 严格策略,不使用 | 缓解XSS攻击 |
| | 强制使用HTTPS |
| | 防止MIME类型嗅探 |
| | 防止点击劫持 |
| | 限制Referrer信息泄露 |
| 禁用未使用的浏览器功能 | 减少攻击面 |
| | 防止跨源攻击 |
| | 控制资源共享 |
| 敏感响应使用 | 防止缓存泄露 |
Access-Control-Allow-Origin: *OriginAccess-Control-Allow-Credentials: trueVary: OriginAccess-Control-Allow-Origin: *OriginAccess-Control-Allow-Credentials: trueVary: Originnpm auditpip auditnpm auditpip auditundefinedundefinedapp.use(helmet.contentSecurityPolicy({
directives: {
defaultSrc: ["'self'"],
scriptSrc: ["'self'"],
styleSrc: ["'self'", "'unsafe-inline'"],
imgSrc: ["'self'", "data:"],
}
}));app.use(helmet.contentSecurityPolicy({
directives: {
defaultSrc: ["'self'"],
scriptSrc: ["'self'"],
styleSrc: ["'self'", "'unsafe-inline'"],
imgSrc: ["'self'", "data:"],
}
}));
When hardening gaps represent actual vulnerabilities (e.g., CORS misconfiguration allowing credential theft), emit a formal finding using `../../shared/schemas/findings.md`.
Finding ID prefix: **HARD** (e.g., `HARD-001`).
- `metadata.tool`: `"harden"`
- `references.cwe`: Varies by suggestion (e.g., `CWE-693` Protection Mechanism Failure, `CWE-16` Configuration)
当加固缺口代表实际漏洞时(例如,CORS配置错误导致凭证被盗),使用`../../shared/schemas/findings.md`生成正式的发现报告。
发现ID前缀:**HARD**(例如,`HARD-001`)。
- `metadata.tool`: `"harden"`
- `references.cwe`: 根据建议不同而变化(例如,`CWE-693` 保护机制失效,`CWE-16` 配置错误)