icdev-secure
Run comprehensive security scanning (SAST, dependency audit, secret detection, container scan). Use when scanning code or containers for security vulnerabilities before deployment.
- License 许可
- Apache-2.0
- 所属仓库
- icdev-ai/icdev
- 最近更新
- 2026-11-15
- Stars
- ★ 5
- Forks
- 0
01 前言 Front Matter
- name
- icdev-secure
- description
- Run comprehensive security scanning (SAST, dependency audit, secret detection, container scan). Use when scanning code or containers for security vulnerabilities before deployment.
- allowed-tools
- Bash, Read, Write, Edit, Glob, Grep
- prerequisites
- [ "trivy", "bandit", "detect-secrets", "pip-audit" ]
02 资源文件 3
- 参考文档REFERENCE.md2.1 KB
- 参考文档SOURCE.md175 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
$icdev-secure
What This Does
Runs the full security scanning pipeline:
- SAST — Static Application Security Testing (bandit for Python)
- Dependency Audit — Check for known CVEs in dependencies (pip-audit, npm audit)
- Secret Detection — Scan for hardcoded credentials, API keys, tokens
- Container Scan — Dockerfile security checks + image vulnerability scan (trivy)
- Evaluates security gates and records findings
Steps
1. Load Security Configuration
!cat args/security_gates.yaml
2. Resolve Project Directory
If --project-dir not specified, detect from current context.
3. Run SAST
python tools/security/sast_runner.py --project-dir <path>
- Uses bandit for Python files
- Reports: severity levels (HIGH/MEDIUM/LOW), CWE IDs, line numbers
4. Run Dependency Audit
python tools/security/dependency_auditor.py --project-dir <path>
- Checks requirements.txt (pip-audit) and package.json (npm audit)
- Reports: CVE IDs, affected packages, fix versions
5. Run Secret Detection
python tools/security/secret_detector.py --project-dir <path>
- 10 built-in regex patterns (AWS keys, passwords, tokens, private keys, etc.)
- Uses detect-secrets baseline if available
- Reports: file, line number, secret type
6. Run Container Scan
python tools/security/container_scanner.py --project-dir <path>
- Static Dockerfile analysis (10 checks: root user, COPY vs ADD, pinned versions, etc.)
- Trivy image scan if available
- Reports: severity, check name, fix suggestion
7. Evaluate Security Gates
python tools/security/vuln_scanner.py --project-dir <path>
- Gate thresholds from security_gates.yaml:
- SAST: 0 HIGH severity findings
- Dependencies: 0 critical CVEs
- Secrets: 0 detected secrets
- Container: no root user, no unpatched CVEs
- PASS/FAIL determination
8. Auto-Fix (if --fix)
If --fix flag provided:
- Remove detected secrets and add to .gitignore
- Update vulnerable dependencies to patched versions
- Fix Dockerfile issues (add USER, pin versions)
9. Compliance Mapping
Run the CLI command or use MCP tool control_map MCP tool from icdev-compliance:
- Map
security.scanto NIST controls (RA-5, SA-11, SI-2)
10. Output Summary
Display:
- SAST: X findings (H/M/L breakdown)
- Dependencies: X CVEs (critical/high/medium/low)
- Secrets: X detected (MUST be 0 to pass)
- Container: X issues
- Gate: PASS/FAIL
- Compliance controls satisfied
Example
$icdev-secure --project-dir projects/my-webapp --scan all --fix
Error Handling
- If bandit not installed: report and suggest
pip install bandit - If trivy not installed: skip container image scan, run static checks only
- If secrets detected: ALWAYS fail gate regardless of other results
04 同仓库更多 Skills
icdev
Work inside an ICDEV project from any coding harness -- the icdev-unified MCP tools, the `icdev` CLI, kanban claim/release, worktree-first branching, and where ICDEV's pre-tool guard lives. Use when a repo has CLAUDE.md/AGENTS.md naming ICDEV, a kanban task id (e.g. omx-dx-02), or you need an ICDEV tool.
icdev-worktree
Create and manage isolated git worktrees for parallel ICDEV™ task execution. Use when invoking /icdev-worktree.
icdev-test
Run the full test suite (pytest unit + behave BDD) with coverage reporting and compliance tracking. Use when validating code quality and coverage before a release.
icdev-status
Display comprehensive project status including compliance, security, deployment, and agent health. Use when checking overall project health or preparing a status report.
icdev-simulate
Run Digital Program Twin simulations and generate COAs for requirements. Use when simulating program scenarios or generating courses of action.
icdev-review
Enforce code review gates with security checks, compliance validation, and merge readiness assessment. Use when running a pre-merge code review or checking merge readiness.