security-audit

GitHub

执行四阶段安全审计,涵盖供应链风险、OWASP Top 10代码审查、STRIDE威胁建模及趋势报告。通过快速扫描或全面审计发现安全隐患,输出结构化JSON结果并追踪风险趋势。

.claude/skills/security-audit/SKILL.md catlog22/Claude-Code-Workflow

Trigger Scenarios

security audit security scan cso

Install

npx skills add catlog22/Claude-Code-Workflow --skill security-audit -g -y
More Options

Non-standard path

npx skills add https://github.com/catlog22/Claude-Code-Workflow/tree/main/.claude/skills/security-audit -g -y

Use without installing

npx skills use catlog22/Claude-Code-Workflow@security-audit

指定 Agent (Claude Code)

npx skills add catlog22/Claude-Code-Workflow --skill security-audit -a claude-code -g -y

安装 repo 全部 skill

npx skills add catlog22/Claude-Code-Workflow --all -g -y

预览 repo 内 skill

npx skills add catlog22/Claude-Code-Workflow --list

SKILL.md

Frontmatter
{
    "name": "security-audit",
    "description": "OWASP Top 10 and STRIDE security auditing with supply chain analysis. Triggers on \"security audit\", \"security scan\", \"cso\".",
    "allowed-tools": "Read, Write, Bash, Glob, Grep"
}

Security Audit

4-phase security audit covering supply chain risks, OWASP Top 10 code review, STRIDE threat modeling, and trend-tracked reporting. Produces structured JSON findings in .workflow/.security/.

Architecture Overview

+-------------------------------------------------------------------+
|  Phase 1: Supply Chain Scan                                       |
|  -> Dependency audit, secrets detection, CI/CD review, LLM risks  |
|  -> Output: supply-chain-report.json                              |
+-----------------------------------+-------------------------------+
                                    |
+-----------------------------------v-------------------------------+
|  Phase 2: OWASP Review                                           |
|  -> OWASP Top 10 2021 code-level analysis via ccw cli            |
|  -> Output: owasp-findings.json                                  |
+-----------------------------------+-------------------------------+
                                    |
+-----------------------------------v-------------------------------+
|  Phase 3: Threat Modeling (STRIDE)                                |
|  -> 6 threat categories mapped to architecture components         |
|  -> Output: threat-model.json                                    |
+-----------------------------------+-------------------------------+
                                    |
+-----------------------------------v-------------------------------+
|  Phase 4: Report & Tracking                                      |
|  -> Score calculation, trend comparison, dated report             |
|  -> Output: .workflow/.security/audit-report-{date}.json         |
+-------------------------------------------------------------------+

Key Design Principles

  1. Infrastructure-first: Phase 1 catches low-hanging fruit (leaked secrets, vulnerable deps) before deeper analysis
  2. Standards-based: OWASP Top 10 2021 and STRIDE provide systematic coverage
  3. Scoring gates: Daily quick-scan must score 8/10; comprehensive audit minimum 2/10 for initial baseline
  4. Trend tracking: Each audit compares against prior results in .workflow/.security/

Execution Flow

Quick-Scan Mode (daily)

Run Phase 1 only. Must score >= 8/10 to pass.

Comprehensive Mode (full audit)

Run all 4 phases sequentially. Initial baseline minimum 2/10.

Phase Sequence

  1. Phase 1: Supply Chain Scan -- phases/01-supply-chain-scan.md
    • Dependency audit (npm audit / pip-audit / safety check)
    • Secrets detection (API keys, tokens, passwords in source)
    • CI/CD config review (injection risks in workflow YAML)
    • LLM/AI prompt injection check
  2. Phase 2: OWASP Review -- phases/02-owasp-review.md
    • Systematic OWASP Top 10 2021 code review
    • Uses ccw cli --tool gemini --mode analysis --rule analysis-assess-security-risks
  3. Phase 3: Threat Modeling -- phases/03-threat-modeling.md
    • STRIDE threat model mapped to architecture components
    • Trust boundary identification and attack surface assessment
  4. Phase 4: Report & Tracking -- phases/04-report-tracking.md
    • Score calculation with severity weights
    • Trend comparison with previous audits
    • Date-stamped report to .workflow/.security/

Scoring Overview

See specs/scoring-gates.md for full specification.

Severity Weight Example
Critical 10 RCE, SQL injection, leaked credentials
High 7 Broken auth, SSRF, privilege escalation
Medium 4 XSS, CSRF, verbose error messages
Low 1 Missing headers, informational disclosures

Gates: Daily quick-scan >= 8/10, Comprehensive initial >= 2/10.

Directory Setup

mkdir -p .workflow/.security
WORK_DIR=".workflow/.security"

Output Structure

.workflow/.security/
  audit-report-{YYYY-MM-DD}.json    # Dated audit report
  supply-chain-report.json           # Latest supply chain scan
  owasp-findings.json                # Latest OWASP findings
  threat-model.json                  # Latest STRIDE threat model

Reference Documents

Document Purpose
phases/01-supply-chain-scan.md Dependency, secrets, CI/CD, LLM risk scan
phases/02-owasp-review.md OWASP Top 10 2021 code review
phases/03-threat-modeling.md STRIDE threat modeling
phases/04-report-tracking.md Report generation and trend tracking
specs/scoring-gates.md Scoring system and quality gates
specs/owasp-checklist.md OWASP Top 10 detection patterns

Completion Status Protocol

This skill follows the Completion Status Protocol defined in _shared/SKILL-DESIGN-SPEC.md sections 13-14.

Possible termination statuses:

  • DONE: All phases completed, score calculated, report generated
  • DONE_WITH_CONCERNS: Audit completed but findings exceed acceptable thresholds
  • BLOCKED: Required tools unavailable (e.g., npm/pip not installed), permission denied
  • NEEDS_CONTEXT: Ambiguous project scope, unclear trust boundaries

Escalation follows the Three-Strike Rule (section 14) per step.

Version History

  • 07491b0 Current 2026-07-25 09:31

Same Skill Collection

.claude/skills/brainstorm/SKILL.md
.claude/skills/ccw-chain/SKILL.md
.claude/skills/ccw-help/SKILL.md
.claude/skills/delegation-check/SKILL.md
.claude/skills/investigate/SKILL.md
.claude/skills/issue-manage/SKILL.md
.claude/skills/memory-capture/SKILL.md
.claude/skills/memory-manage/SKILL.md
.claude/skills/prompt-generator/SKILL.md
.claude/skills/review-code/SKILL.md
.claude/skills/review-cycle/SKILL.md
.claude/skills/ship/SKILL.md
.claude/skills/skill-generator/SKILL.md
.claude/skills/skill-iter-tune/SKILL.md
.claude/skills/skill-simplify/SKILL.md
.claude/skills/skill-tuning/SKILL.md
.claude/skills/spec-generator/SKILL.md
.claude/skills/team-arch-opt/SKILL.md
.claude/skills/team-brainstorm/SKILL.md
.claude/skills/team-coordinate/SKILL.md
.claude/skills/team-designer/SKILL.md
.claude/skills/team-executor/SKILL.md
.claude/skills/team-frontend-debug/SKILL.md
.claude/skills/team-frontend/SKILL.md
.claude/skills/team-interactive-craft/SKILL.md
.claude/skills/team-issue/SKILL.md
.claude/skills/team-lifecycle-v4/SKILL.md
.claude/skills/team-motion-design/SKILL.md
.claude/skills/team-perf-opt/SKILL.md
.claude/skills/team-planex/SKILL.md
.claude/skills/team-quality-assurance/SKILL.md
.claude/skills/team-review/SKILL.md
.claude/skills/team-roadmap-dev/SKILL.md
.claude/skills/team-tech-debt/SKILL.md
.claude/skills/team-testing/SKILL.md
.claude/skills/team-ui-polish/SKILL.md
.claude/skills/team-uidesign/SKILL.md
.claude/skills/team-ultra-analyze/SKILL.md
.claude/skills/team-ux-improve/SKILL.md
.claude/skills/team-visual-a11y/SKILL.md
.claude/skills/wf-composer/SKILL.md
.claude/skills/wf-player/SKILL.md
.claude/skills/workflow-execute/SKILL.md
.claude/skills/workflow-lite-execute/SKILL.md
.claude/skills/workflow-lite-plan/SKILL.md
.claude/skills/workflow-lite-test-review/SKILL.md
.claude/skills/workflow-multi-cli-plan/SKILL.md
.claude/skills/workflow-plan/SKILL.md
.claude/skills/workflow-skill-designer/SKILL.md

Metadata

Files
0
Version
07491b0
Hash
74930a1e
Indexed
2026-07-25 09:31

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 13:45
浙ICP备14020137号-1 $Гость$