一键导入
fortinet-code-review
Run Fortinet Code Security IaC and SCA scans on the current directory
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run Fortinet Code Security IaC and SCA scans on the current directory
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | fortinet:code-review |
| description | Run Fortinet Code Security IaC and SCA scans on the current directory |
| user-invocable | true |
Security scan of the current working directory.
Always run both scans in parallel:
lacework iac scan --upload=false --noninteractive --format json --save-result <tmpdir>/iac.json -d .lacework sca scan . --deployment=offprem --noninteractive --save-results=false -f lw-json -o <tmpdir>/sca.jsonWhen processing scan results, exclude findings that:
pass == true (the check passed)isSuppressed == true (an exception was added in .lacework/codesec.yaml)Only count and display findings where pass == false AND isSuppressed != true.
Track the number of suppressed findings separately to show in the summary.
| Severity | IaC | SCA | Total |
|----------|-----|-----|-------|
| Critical | X | X | X |
| High | X | X | X |
| Medium | X | X | X |
| Low | X | X | X |
If any findings were suppressed by exceptions, add a line below the table:
_X findings suppressed by exceptions in `.lacework/codesec.yaml`_
For each critical finding, show:
**[CRITICAL]** Policy/CVE-ID
- File: path/to/file:line
- Issue: One-line description from scan output
- Fix: Specific code change or command to remediate
- Exception ID: `<policyId>` (IaC) or `CVE:<cveId>` (SCA)
Same format as critical.
Condensed table only:
| Severity | Source | File:Line | Policy/CVE | Description |
ONLY include if there are findings. List prioritized actions based on actual findings:
1. [Action] - because [reason from findings]
2. [Action] - because [reason from findings]
Do NOT include generic security advice. Only recommend actions directly tied to scan results.
For each finding, ask the user whether to fix or add exception.
Exception format: <criteria>:<value>:<reason>
Criteria (case-sensitive): policy, CVE, CWE, path, file, fingerprint, finding
Reasons (case-sensitive): Accepted risk, Compensating Controls, False positive, Patch incoming
Add to default.iac.scan.exceptions for IaC findings, default.sca.scan.exceptions for SCA findings in .lacework/codesec.yaml.
# .lacework/codesec.yaml
default:
iac:
enabled: true
scan:
exceptions:
- "policy:<policy-id>:<reason>"
- "path:<glob-pattern>:<reason>"
- "file:<file-path>:<reason>"
sca:
enabled: true
scan:
exceptions:
- "CVE:<cve-id>:<reason>"
- "path:<glob-pattern>:<reason>"
- "CWE:<cwe-id>:<reason>"
Important: Only add exceptions the user explicitly approves. Do not auto-suppress findings.