agentleFS
SamG0ldSamG0ld/claude-code-starter/skills/security-scan/SKILL.md

security-scan

Skill2 starsChanged 4 months agoMITView on GitHub

Hybrid security scanning pipeline that combines static analysis tools with LLM-powered triage. Provides zero-dependency regex fallback for environments without security tooling installed. Use when performing security scans, interpreting scan results, understanding coverage tiers, or triaging vulnerability findings. Triggers on: "security scan", "vulnerability scan", "secret detection", "static analysis", "security pipeline", "SAST".

  • Installs packages

49 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use springboot-security, django-security and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • FaisalAlqarniSkill

    springboot-security

    Spring Security best practices for authn/authz, validation, CSRF, secrets, headers, rate limiting, and dependency security in Java Spring Boot services.

    Also in 5 projects that use this

  • johnrtiptonSkill

    django-security

    This skill should be used when conducting security reviews, auditing Django applications, hardening security settings, implementing OWASP Top 10 protections, managing secrets, or ensuring multi-tenant security isolation. Provides automated security auditor that scans settings, code, dependencies, and multi-tenant configurations with auto-fix capabilities.

    Also in 5 projects that use this

  • JamkrisSkill

    security-bounty-hunter

    Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.

    Also in 3 projects that use this

  • joneqianSkill

    postgres-patterns

    PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.

    Also in 5 projects that use this

  • Microsoft AzureSkill

    iterative-retrieval

    Max-3-cycle protocol for agent sub-tasks with WHY context and coordinator validation. Use when spawning sub-agents to complete scoped work.

    Also in 5 projects that use this

  • LangChainSkill

    docker-patterns

    Best practices for Docker containerization and multi-stage builds

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 43 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All 5 phases with enhanced scanning

    line 78
  2. Distinctive:

    Every finding carries a provenance label indicating its source:

    line 179

“Common” is measured: kept by at least 6 in 10 of the 43 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Hybrid Security Scanning — Skill Reference

This file is the reference doc. The executable pipeline that actually runs the scan lives at config/commands/security-scan.md and is invoked with /security-scan. They are not duplicates; do not delete either.

Architecture Overview

The hybrid security scanner combines automated static analysis tools with LLM-based triage to produce high-signal vulnerability reports. It operates as a 5-phase pipeline:

Phase 0: Recon         Detect tools + tech stack
Phase 1: Scan          Run tools + regex fallback
Phase 2: Correlate     Normalize + deduplicate
Phase 3: Triage        LLM classifies findings
Phase 4: Report        Markdown report + artifacts

Design Principles

  1. Graceful degradation — works with zero tools installed via regex fallback
  2. Provenance tracking — every finding labeled with its source
  3. Framework-aware triage — suppresses known-safe patterns per framework
  4. Cross-platform — Windows (Git Bash), macOS, Linux
  5. Deterministic pipeline — same inputs produce same outputs (excluding LLM triage)

Coverage Tiers

TierTools AvailableEstimated CoverageTypical Scan Time
0 — Regex OnlyNone~35%15-30s
1 — +Semgrepsemgrep~55%1-3 min
2 — +Secretssemgrep + gitleaks~75%2-5 min
3 — Full Stacksemgrep + gitleaks + trivy + bandit/gosec~85%3-8 min

Coverage percentages are approximate and represent the proportion of OWASP Top 10 vulnerability classes that can be detected. No automated scanner achieves 100% — manual review is always required for complete coverage.

What Each Tool Covers

ToolDetectsInstall
Regex patternsHardcoded secrets, obvious injection patterns, dangerous functions, weak cryptoBuilt-in (zero-dep)
SemgrepTaint tracking, data flow, framework-specific rules, OWASP patternspip install semgrep or brew install semgrep
GitleaksSecrets in code and git history, entropy-based detectionbrew install gitleaks or download binary
TrivyDependency vulnerabilities (CVEs), misconfigurations, license issuesbrew install trivy or download binary
BanditPython-specific security issues (B1xx-B7xx)pip install bandit
GosecGo-specific security issuesgo install github.com/securego/gosec/v2/cmd/gosec@latest

Scan Modes

Quick Mode (--quick)

  • Phases 0 + 1 (regex only) + 4
  • Skips external tools and LLM triage
  • Best for: pre-commit checks, rapid feedback, CI pipelines

Standard Mode (default)

  • All 5 phases
  • Runs all available tools + regex
  • LLM triage by the executing Claude instance
  • Best for: regular development workflow, PR reviews

Deep Mode (--deep)

  • All 5 phases with enhanced scanning
  • Delegates triage to the semgrep-triager agent for parallel processing
  • Uses semgrep-scanner agent for comprehensive ruleset coverage
  • Best for: pre-release audits, security-sensitive changes

Regex Pattern Library

The scanner includes 53+ regex patterns in config/data/security-regex-patterns.json organized by vulnerability class:

CategoryPattern CountSeverity Range
Hardcoded Secrets18CRITICAL-HIGH
SQL Injection5CRITICAL-HIGH
Command Injection3CRITICAL-HIGH
XSS6HIGH-MEDIUM
Dangerous Functions7HIGH
Weak Cryptography5HIGH-MEDIUM
TLS Verification3HIGH
Debug/Config3HIGH-MEDIUM
Path Traversal2HIGH
SSRF1HIGH
Authentication2CRITICAL
CORS2HIGH-MEDIUM
Other (NoSQL, SSTI, logging, etc.)5+CRITICAL-LOW

Each pattern includes:

  • CWE mapping for compliance reporting
  • Language applicability for targeted scanning
  • Severity classification aligned with CVSS qualitative ratings

Framework-Aware Triage

The LLM triage phase suppresses known-safe patterns:

FrameworkSuppressed PatternReason
Django ORM.filter(), .exclude(), .get()ORM parameterizes queries automatically
Rails ActiveRecord.where(), .find_by()ActiveRecord parameterizes by default
React JSXDynamic values in JSX {}React escapes by default (not innerHTML)
Express + HelmetMissing security headersHelmet middleware adds headers
SQLAlchemy.query.filter()ORM parameterizes queries
Prismaprisma.model.findMany()Query builder is injection-safe

Suppression System

Users can suppress known false positives via .security/suppressions.json:

{
  "suppressions": [
    {
      "id": "SECRET-014",
      "file": "tests/fixtures/mock-data.ts",
      "reason": "Test fixture with fake password",
      "author": "developer@example.com",
      "date": "2026-03-16"
    }
  ]
}

Suppressions are:

  • Scoped to specific file + pattern ID
  • Require a documented reason
  • Tracked in the scan report under "Suppressed Findings"

Artifacts

The scanner writes artifacts to .security/:

.security/
  scan-report-YYYY-MM-DD.md    # Human-readable report
  findings-raw.json             # All raw findings before triage
  findings-triaged.json         # Findings with triage classification
  suppressions.json             # User-maintained suppressions
  tool-inventory.json           # Detected tools and versions

Interpreting Results

Finding Classifications

ClassificationMeaningAction
TRUE_POSITIVEConfirmed vulnerabilityFix before merge
FALSE_POSITIVENot actually vulnerableOptionally add suppression
NEEDS_REVIEWUncertain — requires human judgmentManual review required

Severity Levels

SeverityCVSS RangeSLA Guidance
CRITICAL9.0-10.0Fix immediately, block merge
HIGH7.0-8.9Fix before production deploy
MEDIUM4.0-6.9Fix within current sprint
LOW0.1-3.9Track and fix when convenient

Provenance Labels

Every finding carries a provenance label indicating its source:

  • [Static: semgrep] — Semgrep rule match
  • [Static: gitleaks] — Gitleaks secret detection
  • [Static: trivy] — Trivy vulnerability/misconfiguration
  • [Static: bandit] — Bandit Python check
  • [Static: gosec] — Gosec Go check
  • [Static: regex] — Built-in regex pattern match
  • [LLM: triage] — LLM classification annotation

Integration with Other Agents

AgentRole in Pipeline
semgrep-scannerDeep mode: runs comprehensive semgrep rulesets in parallel
semgrep-triagerDeep mode: classifies semgrep findings with source context
security-reviewerStandalone: manual OWASP review (complementary, not part of pipeline)
code-reviewerCan invoke security scan as part of review workflow

Limitations

  1. Regex patterns have high false-positive rates — they lack data flow analysis
  2. No runtime analysis — this is purely static; DAST requires separate tooling
  3. LLM triage is probabilistic — confidence varies by vulnerability type
  4. Git history scanning requires gitleaks — regex only scans current files
  5. Dependency scanning requires trivy — regex cannot detect vulnerable versions
  6. Coverage gaps in binary formats, minified code, and generated files

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.