audit
Skill3 starsChanged 30 days agoMITView on GitHub
Security audit across dependencies, secrets, Docker, code patterns, images, STRIDE, and OWASP. Covers dependency vulnerability scanning and threat modeling. Use when user says "security audit", "scan for vulnerabilities", "check dependencies", "find secrets", "audit Docker", "CVE scan", "cso", "threat model", "owasp audit", "deep security scan", or wants to find security issues across the full project. For code review, use /review; for architecture completeness, use /assessment; for running tests, use /test.
- Reads credentials
- Deletes or force-pushes
- Installs packages
194 other projects use a version of this.
Adopted by
Most recently taken up by
- Laucked-Security/claude-oswetheir own version, first seen Nov 8, 2026
- sanmidable/skillstheir own version, first seen Nov 8, 2026
- alegauss/claude-traytheir own version, first seen Nov 8, 2026
- ansvisor/ansvisortheir own version, first seen Nov 8, 2026
- ai-search-guru/getcito-worlds-first-open-source-aio-aeo-or-geo-tooltheir own version, first seen Nov 8, 2026
- MammadovEshgin/clean-code-skilltheir own version, first seen Nov 8, 2026
Used with
Projects with it also use delight, teach-impeccable 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.
HK-hubSkilldelight
Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.
Also in 32 projects that use this
HK-hubSkillteach-impeccable
One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.
Also in 19 projects that use this
zwy123zwySkillnormalize
将用户随意输入的提示词规范化为结构清晰、便于大模型执行的标准化提示词。适用于需要整理、统一提示词格式时调用。
Also in 19 projects that use this
SkillPilotCHSkilllevel-up
Eine Automatisierung pro Woche finden, scopen, shippen. Output landet als proposed-Eintrag in cadence.md mit konkreten Implementations-Schritten.
Also in 12 projects that use this
ww-w-aiSkillpm-discovery
PM Agent Team - Automated product discovery, strategy, and PRD generation. Runs PM analysis workflow to produce comprehensive PRD before PDCA Plan phase.
Also in 3 projects that use this
- +7 more from HK-hub
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- openai/plugins★ 7.8ksame name
- ccch1mneyyy/dsh-TUI★ 7.2ksame name
- macro-inc/macro★ 6ksame name
- yournextstore/yournextstore★ 5.5ksame name
- gadievron/raptor★ 4ksame name
- alchemy-run/alchemy★ 1.9ksame name
- alchemy-run/alchemy-effect★ 1.9ksame name
- mattmireles/gemma-tuner-multimodal★ 1.5ksame name
- jsmastery-pro/skills★ 1.4ksame name
- nateherkai/AIS-OS★ 1.4ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- asideSkill
- assessmentSkill
- benchmarkSkill
- brainSkill
- checkpointSkill
- cleanupSkill
- concise-modeSkill
- cross-modelSkill
- deploySkill
- designSkill
- explainSkill
- fix-issueSkill
- ganSkill
- guardSkill
- hotfixSkill
- incidentSkill
- infraSkill
- interview-meSkill
- investigateSkill
- migrateSkill
- module-auditSkill
- morningSkill
- onboardSkill
- planSkill
- profileSkill
- pr-summarySkill
- readmeSkill
- refactorSkill
- researchSkill
- resolveSkill
- respondSkill
- retroSkill
- reviewSkill
- session-logSkill
- setupSkill
- shipSkill
- skill-newSkill
- spikeSkill
- tddSkill
- testSkill
- zoom-outSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
71 rules. 0 are common, 39 are distinctive, and 32 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
39
Distinctive
This author's own choices. Worth a look.
32
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Run trust on any freshly received project before the first install or build command, daily before merging a significant PR, and …
- Distinctive: line 35
If no subcommand is given, run all layers except threat modeling, daily, and comprehensive, which require focused analysis.
- Very specific: line 40
Check which scanners are on PATH and report the missing ones before scanning.
- Distinctive: line 41
Run the Steps of the selected section in order.
- Very specific: line 95
Run language-specific audit: pnpm audit, pip-audit, cargo audit, govulncheck ./....
- Very specific: line 99
Run pnpm outdated, cargo outdated, go list -m -u all, etc.
- Very specific: line 107
Check available tools, parallel: trivy, snyk, gitleaks.
- Very specific: line 177
No top-level version: key.
- Very specific: line 178
Every service has read_only: true unless the workload legitimately writes to its root
- Very specific: line 179
Every service has cap_drop: ["ALL"] followed by minimal cap_add: entries
- Very specific: line 180
Every service has security_opt: ["no-new-privileges:true"]
- Very specific: line 181
No service has privileged: true
- Very specific: line 182
No service has pid: host, ipc: host, network_mode: host, or userns_mode: host
- Very specific: line 183
Every service either inherits a non-root USER from the Dockerfile or sets user: "<uid>:<gid>"
- Very specific: line 189
Every service sets init: true or has tini/dumb-init as PID 1 in its Dockerfile
- Very specific: line 192
Only namespaced sysctls:. No raw net.core.*
- Distinctive: line 219
Before deploying a new service or API to production.
- Distinctive: line 220
When adding authentication, authorization, or data handling features.
- Distinctive: line 222
When compliance or regulatory requirements demand threat analysis.
- Distinctive: line 226
No arguments: analyze the full project.
- Distinctive: line 231
Map the attack surface: Read the project structure and identify:
- Distinctive: line 308
Before merging a significant PR.
- Distinctive: line 310
After onboarding a new dependency or changing CI configuration.
- Distinctive: line 314
Secrets archaeology: Search git history for leaked credentials:
- Very specific: line 315
Run git log --all --diff-filter=A --name-only to find added files.
- Distinctive: line 316
Search for patterns: API keys, tokens, passwords, private keys, connection strings.
- Very specific: line 317
Check .env files that were committed and later removed but remain in history.
- Distinctive: line 318
Check for high-entropy strings in configuration files.
- Very specific: line 322
Run the project's audit command: pnpm audit, uv run pip-audit, cargo audit, or equivalent.
- Distinctive: line 323
Check for known CVEs with severity >= HIGH.
- Very specific: line 329
Check for pull_request_target triggers with checkout of PR code, which enables code injection.
- Distinctive: line 330
Check for secrets passed to steps that run user-controlled code.
- Very specific: line 331
Check for actions/checkout without pinned SHA versions.
- Very specific: line 332
Check for overly permissive permissions blocks.
- Distinctive: line 333
Check for self-hosted runners on public repos.
- Distinctive: line 334
Verify OIDC is used for cloud provider authentication where possible.
- Distinctive: line 373
Before a major release or launch.
- Distinctive: line 374
After significant architecture changes.
- Distinctive: line 375
When onboarding a new team member who needs a security overview.
- Very specific: line 381
OWASP Top 10 audit: Read ~/.claude/skills/security-patterns.md as a vulnerability pattern catalog.
- Distinctive: line 409
LLM/AI security review: If the project uses LLMs or AI models:
- Distinctive: line 410
Check for prompt injection vulnerabilities in user-facing inputs.
- Distinctive: line 411
Check for sensitive data leakage through model context or logs.
- Distinctive: line 412
Check for missing output sanitization on model responses.
- Distinctive: line 413
Check for excessive permissions granted to AI agents or tools.
- Distinctive: line 414
Check for missing rate limiting on model API calls.
- Distinctive: line 460
Read-only safety scan for untrusted projects.
- Very specific: line 466
Before running pnpm install, uv sync, cargo build, or any build/setup command on a fresh clone.
- Distinctive: line 472
After installation has already happened.
- Distinctive: line 476
No arguments: scan the current directory.
- Very specific: line 491
Scan auxiliary install configs: Read .npmrc, .yarnrc, .yarnrc.yml, .pip.conf, setup.cfg [install] section.
- Very specific: line 501
Scan editor configs: Read .vscode/settings.json, .vscode/tasks.json, .idea/workspace.xml, .envrc, .devcontainer/devcontainer.json.
- Very specific: line 505
If pnpm is available and the user has internet, run pnpm view <name> time to get age.
- Distinctive: line 561
Read-only. Never install dependencies, never run lifecycle scripts, never execute any script from the project.
- Very specific: line 562
Never read .env or *.local.env files.
- Distinctive: line 563
Never reveal actual secret values.
- Distinctive: line 564
Never call paid external APIs without explicit user opt-in.
- Distinctive: line 573
Never install scanning tools without asking.
- Distinctive: line 574
Never modify code or fix vulnerabilities automatically.
- Distinctive: line 575
Never expose actual secret values.
- Very specific: line 576
Always scan .env.example, never .env directly.
- Distinctive: line 577
Always detect package manager from lockfile.
- Distinctive: line 578
Never update packages without showing changes and getting approval.
- Very specific: line 579
Never apply pnpm audit --fix overrides that cross a major version without explicit approval.
- Distinctive: line 580
If no vulnerabilities found, say so clearly.
- Very specific: line 593
Stop and recommend no install, no run, and a Docker sandbox when trust reaches a MALICIOUS verdict.
- Very specific: line 594
Stop and require the confirmation phrase when trust reaches HIGH-RISK.
- Distinctive: line 595
Stop and redact when a draft finding contains a live secret value instead of a masked match.
- Very specific: line 596
Stop and read .env.example when a step points at .env or *.local.env.
- Distinctive: line 597
Stop and ask for approval when a step would modify code, a lockfile, or an installed package.
- Very specific: line 604
After deps update, a re-audit ran and reports no new vulnerabilities.
“Common” is measured: kept by at least 6 in 10 of the 175 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.
Files
Overview
Multi-layer security audit, dependency management, and threat modeling.
When to Use
Run trust on any freshly received project before the first install or build command, daily before merging a significant PR, and comprehensive before a major release. The bare /audit covers dependencies, secrets, Docker, and code patterns in one pass.
Subcommand Routing
| Invocation | Action |
/audit | Run all audit layers (deps, secrets, docker, code) |
/audit deps | Dependency vulnerability scan |
/audit deps outdated | List packages with newer versions |
/audit deps update [pkg] | Update packages with approval |
/audit secrets | Secret scanning across the full repo: Full Audit step 3 with the Extended Secret Detection Patterns under deps |
/audit docker | Dockerfile security checks |
/audit code | Code pattern analysis for injection, XSS, and the rest of Full Audit step 5, run alone |
/audit scan | Deep scan with trivy, snyk, and gitleaks, per scan (deep) under deps |
/audit image <name> | Docker image vulnerability and layer analysis, per image <name> under deps |
/audit threat | STRIDE threat modeling for the project or a specific component |
/audit daily | High-confidence security gate: secrets archaeology, supply chain, CI/CD pipeline review |
/audit comprehensive | Deep scan: daily checks plus OWASP Top 10, STRIDE per component, LLM/AI review |
/audit trust | Untrusted-project safety scan. Run before pnpm install, uv sync, or any build command on a freshly received project |
If no subcommand is given, run all layers except threat modeling, daily, and comprehensive, which require focused analysis.
Process
- Route the invocation per Subcommand Routing; with no subcommand, run Full Audit.
- Check which scanners are on
PATHand report the missing ones before scanning. - Run the Steps of the selected section in order.
- Report findings in that section's output format, with severity buckets or 1-10 scores, and masked secret matches.
- For
threat,daily, andcomprehensive, state every finding rated 8/10 or higher as blocking.
Full Audit (default)
Steps
- Detect project and tools, parallel: identify languages from manifests, check for Dockerfiles, check available tools,
pnpm,pip-audit,cargo-audit,trivy,grype,semgrep,bandit, read.env.example. - Dependency scan: per-language audit (see deps section).
- Secret scanning: scan all tracked files,
git ls-filesusing patterns from~/.claude/hooks/secret-scanner.py. Skip binaries, lockfiles, vendored code. Check.gitignorecovers.env,*.pem,*.key. Apply the extended provider-specific patterns below (see secrets section) for Stripe, Twilio, GCP, Azure, Slack, Shopify, and other services not covered by the hook's generic patterns. - Dockerfile and Compose checks: see the
dockersubcommand section below. Run the full Dockerfile checklist and, whencompose*.ymlordocker-compose*.ymlis present, the full Compose checklist. Ifhadolintis onPATH, runhadolint Dockerfile. Ifdocker scoutis available, rundocker scout quickviewanddocker scout cves. Iftrivyis available, scan built images. - Code patterns: SQL injection, string concatenation in queries, command injection via
exec,spawn, orevalwith dynamic input, XSS throughdangerouslySetInnerHTMLorinnerHTML, path traversal, hardcoded secrets, insecure randomness usingMath.random()for security, empty catch blocks. Runsemgrep --config autoif available. Also check supply chain risks: reviewpostinstallscripts in dependencies viacat node_modules/<pkg>/package.json | jq .scripts.postinstall, verify scoped packages resolve to the private registry,pnpm install --lockfile-only --ignore-scripts, verify Docker secrets use--mount=type=secretnotENVorARG, and confirm lockfile integrity hashes are present. - Compile report by severity:
## Security Audit Report
**Project:** <name>
**Date:** <date>
**Layers scanned:** dependencies, secrets, docker, code
### Critical (fix immediately)
### High (fix before next release)
### Medium (schedule fix)
### Low (backlog)
### Summary
| Layer | Critical | High | Medium | Low |
|-------|----------|------|--------|-----|
### Missing safeguards
- [ ] .gitignore covers .env and credential files
- [ ] .env.example documents all required env vars
- [ ] Dockerfiles use non-root user
- [ ] Dependencies have no critical vulnerabilities- Suggest next steps per finding severity.
deps
Audit dependencies for known vulnerabilities. Detect package manager from lockfile.
Package Manager Detection
bun.lock/bun.lockb = bun, pnpm-lock.yaml = pnpm, yarn.lock = yarn, package-lock.json = npm, which is converted to pnpm with pnpm import, Cargo.toml = cargo, go.mod = go, pyproject.toml with uv.lock = uv, pyproject.toml with [tool.poetry] = poetry, pyproject.toml/requirements.txt = pip. Also check for Makefile/Justfile targets.
Audit (default)
Run language-specific audit: pnpm audit, pip-audit, cargo audit, govulncheck ./.... Parse and present by severity.
outdated
Run pnpm outdated, cargo outdated, go list -m -u all, etc. Show current, wanted, and latest versions.
update [package]
Show what would change, ask for approval, run update, re-audit to verify no new vulnerabilities.
scan (deep)
Check available tools, parallel: trivy, snyk, gitleaks. Run all available:
trivy fs .for dependency + config + secret scanning.snyk test+snyk code testfor dependency + static analysis.gitleaks detect --source .for hardcoded secrets.
Extended Secret Detection Patterns
Apply these provider-specific patterns during secrets and scan runs. These extend the generic patterns in secret-scanner.py with service-specific formats.
| Provider | Pattern | Severity |
| AWS access key | AKIA[0-9A-Z]{16} | CRITICAL |
| Stripe | sk_live_[a-zA-Z0-9]{24,} or pk_live_[a-zA-Z0-9]{24,} | CRITICAL |
| Twilio | AC[a-f0-9]{32} or SK[a-f0-9]{32} | CRITICAL |
| GCP service account | "type":\s*"service_account" with private_key_id | CRITICAL |
| Azure storage | AccountKey=[a-zA-Z0-9+/=]{88,} | CRITICAL |
| Slack | xoxb-[a-zA-Z0-9-]{50,} or hooks\.slack\.com/services/ | CRITICAL |
| GitHub PAT | ghp_[a-zA-Z0-9]{36} | CRITICAL |
| GitLab PAT | glpat-[a-zA-Z0-9-]{20} | CRITICAL |
| Shopify | shppa_[a-z0-9]{32} or shpat_[a-z0-9]{32} | CRITICAL |
| MongoDB Atlas | mongodb\+srv://[^:]+:[^@]+@ | CRITICAL |
| Vault token | s\.[a-zA-Z0-9]{24} | CRITICAL |
| SendGrid | SG\.[a-zA-Z0-9_-]{22,} | CRITICAL |
| Firebase | firebase-adminsdk or serviceAccount.json | CRITICAL |
| npm registry | //registry.npmjs.org/:_authToken | CRITICAL |
| OpenAI | sk-[a-zA-Z0-9]{48,} | HIGH |
| Anthropic | sk-ant-[a-zA-Z0-9_-]{48,} | HIGH |
| Google Maps | AIzaSy[a-zA-Z0-9_-]{33} | HIGH |
| Datadog | DD_API_KEY=[a-f0-9]{32} | HIGH |
| Cloudflare | CF_API_TOKEN= or X-Auth-Key: | HIGH |
| Okta | SSWS [a-zA-Z0-9_-]{40,} | CRITICAL |
Also check high-risk contexts: test fixtures with real credentials, database seed files with production data, .tfstate files, Docker ENV/ARG with secrets, and *.js.map source maps containing decompiled secrets.
image <name>
trivy image <name>for OS and library vulnerabilities.dive <name>for layer analysis and wasted space.
docker
Dockerfile, Compose, BuildKit, and image authoring audit. Authority for every rule below is standards/container-security.md.
Dockerfile checklist
For each Dockerfile in the repo, verify:
- Base image pinned by digest,
FROM image:tag@sha256:..., not floating tag such aslatest,lts, or no tag # syntax=docker/dockerfile:1declared at the top to enable modern BuildKit frontend- Multi-stage build; runtime stage does not include compilers, source, or dev dependencies
WORKDIRabsolute pathUSERdirective in final stage sets a non-root UID. Numeric preferred for Kubernetes compatibility- No
COPY .env*,COPY *.pem,COPY *.key,COPY *.crt,COPY id_rsa* - No
ENVorARGcontaining literal secret values such asPASSWORD=,TOKEN=,API_KEY=, orPRIVATE_KEY= - Build-time secrets use
RUN --mount=type=secret,id=<name>, neverENVorARG - Package installs use
--no-install-recommends, apt,--no-cache, apk, or equivalent - Package manager caches purged in the same layer:
rm -rf /var/lib/apt/lists/*,pip cache purge, etc. - BuildKit cache mounts used for package managers when build time matters:
--mount=type=cache,target=<path> COPY --linkused to maximize layer cache hitsHEALTHCHECKdeclared with--interval,--timeout,--start-period,--retries- PID 1 covered by
tini,dumb-init,docker run --init, or Composeinit: true .dockerignoreexists and excludes.env*,*.pem,*.key,.git/,node_modules/,.terraform/- Hadolint clean on the file when
hadolintis onPATH. Runhadolint Dockerfile
Compose checklist
For each compose.yml, compose.*.yml, docker-compose.yml, docker-compose.*.yml:
- No top-level
version:key. Deprecated under Compose v2 - Every service has
read_only: trueunless the workload legitimately writes to its root - Every service has
cap_drop: ["ALL"]followed by minimalcap_add:entries - Every service has
security_opt: ["no-new-privileges:true"] - No service has
privileged: true - No service has
pid: host,ipc: host,network_mode: host, oruserns_mode: host - Every service either inherits a non-root
USERfrom the Dockerfile or setsuser: "<uid>:<gid>" - Secrets defined via top-level
secrets:withfile:,environment:, orexternal: truesource; never via plainenvironment: - Apps consume secrets via the
*_FILEconvention (DB_PASSWORD_FILE=/run/secrets/db_password) - Dev port bindings use
127.0.0.1:prefix; internal services useexpose:, notports: - Networks are explicit per tier; backend networks marked
internal: true depends_on:usescondition: service_healthyform for ordering, paired withhealthcheck:- Every service sets
init: trueor hastini/dumb-initas PID 1 in its Dockerfile - Resource limits set such as
deploy.resources.limits.memory,cpus, pluspids_limit, orulimits.nofile restart:useson-failure:<n>orunless-stopped, not unboundedalways- Only namespaced
sysctls:. No rawnet.core.* - Dev-only services gated behind
profiles: ["dev"] - Production deployment does not invoke
docker compose watchor thedevelop:block
Tools to invoke when present
| Tool | Command |
| Hadolint | hadolint Dockerfile per Dockerfile; fail on any rule in the never-ignore list (DL3000, DL3007, DL3008, DL3018, DL3025, DL3027, DL3059, DL4006) |
| Docker Scout | docker scout quickview <image>; then docker scout cves <image> --only-severity critical,high --exit-code; then docker scout policy evaluate <image> for attestation coverage |
| Trivy | trivy config . for Dockerfile + Compose misconfigurations; trivy image <name> for OS+library CVEs |
| Grype | grype <image> cross-check with Trivy when the registry is sensitive |
| Dive | dive <image> for layer waste and base-image bloat |
| BuildKit attestation check | docker buildx imagetools inspect <image> --format '{{ json .SBOM }}' and --format '{{ json .Provenance }}' to confirm SBOM + provenance attached |
Reporting
Report findings in the standard severity buckets: Critical, High, Medium, or Low. Critical: secrets in layers, privileged: true, host namespaces, COPY .env. High: missing USER non-root, floating tags, missing cap_drop, missing no-new-privileges, dev ports bound to 0.0.0.0. Medium: missing HEALTHCHECK, missing init: true, missing .dockerignore, missing BuildKit cache mounts. Low: missing attestations, missing Hadolint config, image bloat.
threat
STRIDE threat modeling for the full project or a specific component. Systematic analysis of security threats across six categories.
When to use
- Before deploying a new service or API to production.
- When adding authentication, authorization, or data handling features.
- During security review of an existing system.
- When compliance or regulatory requirements demand threat analysis.
Arguments
- No arguments: analyze the full project.
<component>: focus on a specific module, service, or feature (e.g.,/audit threat auth,/audit threat payments).
Steps
- Map the attack surface. Read the project structure and identify:
- Entry points: API routes, webhooks, message consumers, CLI commands.
- Data stores: databases, caches, file storage, session stores.
- External integrations: third-party APIs, OAuth providers, payment processors.
- Trust boundaries: where authenticated meets unauthenticated, where internal meets external.
Analyze each STRIDE category. For every entry point and data flow:
Category Question What to look for Spoofing Can an attacker impersonate a user or service? Missing auth on endpoints, weak token validation, no mutual TLS between services Tampering Can data be modified in transit or at rest? Missing input validation, unsigned payloads, no integrity checks on stored data Repudiation Can a user deny performing an action? Missing audit logging, no transaction records, unsigned operations Information Disclosure Can sensitive data leak? Verbose error messages, exposed stack traces, missing field-level authorization Denial of Service Can the system be overwhelmed? Missing rate limits, unbounded queries, no payload size limits, resource-intensive operations without throttling Elevation of Privilege Can a user gain unauthorized access? Missing authorization checks, IDOR vulnerabilities, role bypass, privilege escalation through API chaining Score each finding.
Severity Criteria Critical (9-10) Exploitable without authentication, data breach risk High (7-8) Exploitable with low-privilege access, significant impact Medium (4-6) Requires specific conditions, moderate impact Low (1-3) Theoretical risk, minimal impact Generate the threat model report:
## STRIDE Threat Model **Scope:** <full project or component name> **Date:** <date GMT> **Entry points analyzed:** <count> ### Attack Surface Map <list of entry points, data stores, trust boundaries> ### Findings by Category #### Spoofing | # | Threat | Severity | Affected Component | Mitigation | |---|--------|----------|-------------------|------------| #### Tampering ... #### Repudiation ... #### Information Disclosure ... #### Denial of Service ... #### Elevation of Privilege ... ### Summary | Category | Critical | High | Medium | Low | |----------|----------|------|--------|-----| ### Priority Actions <findings rated 8+ must be resolved before shipping>- Gate check. Findings rated 8/10 or higher are blocking. State them explicitly and recommend resolution before deployment.
daily
Fast security gate for routine use. Three focused checks that catch the highest-impact issues with minimal time investment.
When to use
- Before merging a significant PR.
- As a periodic health check during active development.
- After onboarding a new dependency or changing CI configuration.
Steps
- Secrets archaeology. Search git history for leaked credentials:
- Run
git log --all --diff-filter=A --name-onlyto find added files. - Search for patterns: API keys, tokens, passwords, private keys, connection strings.
- Check
.envfiles that were committed and later removed but remain in history. - Check for high-entropy strings in configuration files.
- Report each finding with the commit hash, file path, and pattern matched.
- Run
- Dependency supply chain check. Audit the dependency tree:
- Run the project's audit command:
pnpm audit,uv run pip-audit,cargo audit, or equivalent. - Check for known CVEs with severity >= HIGH.
- Flag packages with fewer than 100 weekly downloads or a single maintainer.
- Flag packages added in the last 30 days that have no prior release history.
- Cross-reference lockfile integrity: verify the lockfile is committed and matches the manifest.
- Run the project's audit command:
- CI/CD pipeline security review. Audit workflow files:
- Check for
pull_request_targettriggers with checkout of PR code, which enables code injection. - Check for secrets passed to steps that run user-controlled code.
- Check for
actions/checkoutwithout pinned SHA versions. - Check for overly permissive
permissionsblocks. - Check for self-hosted runners on public repos.
- Verify OIDC is used for cloud provider authentication where possible.
- Check for
Output
## Security Daily Report
**Date:** <timestamp GMT>
**Mode:** daily
**Duration:** <seconds>
### Secrets Archaeology
| Commit | File | Pattern | Severity |
|--------|------|---------|----------|
| <hash> | <path> | <type> | <1-10> |
### Supply Chain
| Package | Issue | CVE | Severity |
|---------|-------|-----|----------|
| <name> | <description> | <id or N/A> | <1-10> |
### CI/CD Pipeline
| File | Line | Issue | Severity |
|------|------|-------|----------|
| <path> | <line> | <description> | <1-10> |
### Verdict
<PASS: no blocking findings / BLOCK: N findings rated 8/10+>comprehensive
Deep scan that includes everything from daily mode plus OWASP Top 10, STRIDE threat modeling per component, and LLM/AI security review.
When to use
- Monthly security review cadence.
- Before a major release or launch.
- After significant architecture changes.
- When onboarding a new team member who needs a security overview.
Steps
- Run all daily checks. Execute steps 1-3 from the daily mode.
OWASP Top 10 audit. Read
~/.claude/skills/security-patterns.mdas a vulnerability pattern catalog. Map each pattern to its OWASP category when checking the codebase:Category What to check A01: Broken Access Control Authorization checks on every endpoint, IDOR prevention, CORS configuration A02: Cryptographic Failures TLS usage, password hashing algorithms, sensitive data exposure in logs A03: Injection SQL injection, XSS, command injection, LDAP injection, template injection A04: Insecure Design Business logic flaws, missing rate limiting, missing abuse prevention A05: Security Misconfiguration Default credentials, unnecessary features enabled, error messages leaking internals A06: Vulnerable Components Outdated frameworks, known vulnerable versions, unmaintained dependencies A07: Authentication Failures Weak password policies, missing MFA, session fixation, credential stuffing prevention A08: Data Integrity Failures CI/CD pipeline integrity, unsigned updates, deserialization vulnerabilities A09: Logging Failures Missing audit logs, sensitive data in logs, no alerting on security events A10: SSRF Server-side request forgery via user-controlled URLs, DNS rebinding STRIDE threat modeling. For each major component identified in the codebase:
Threat Question What to check Spoofing Can an attacker pretend to be someone else? Authentication mechanisms, token validation, certificate pinning Tampering Can an attacker modify data in transit or at rest? Input validation, integrity checks, signed payloads Repudiation Can an attacker deny performing an action? Audit logging, non-repudiation controls, tamper-evident logs Information Disclosure Can an attacker access data they should not see? Authorization boundaries, error messages, debug endpoints, log contents Denial of Service Can an attacker make the system unavailable? Rate limiting, resource quotas, payload size limits, algorithmic complexity Elevation of Privilege Can an attacker gain higher access than intended? Role checks, privilege escalation paths, default permissions Produce a threat matrix entry for each component-threat combination that has a non-trivial risk.
- LLM/AI security review. If the project uses LLMs or AI models:
- Check for prompt injection vulnerabilities in user-facing inputs.
- Check for sensitive data leakage through model context or logs.
- Check for missing output sanitization on model responses.
- Check for excessive permissions granted to AI agents or tools.
- Check for missing rate limiting on model API calls.
- Skip this section entirely if the project does not use LLM or AI features.
Output
## Security Comprehensive Report
**Date:** <timestamp GMT>
**Mode:** comprehensive
**Duration:** <minutes>
### Daily Checks
<Include full daily report sections>
### OWASP Top 10 Audit
| Category | Status | Findings | Severity |
|----------|--------|----------|----------|
| A01: Broken Access Control | PASS/FAIL | <description> | <1-10> |
| A02: Cryptographic Failures | PASS/FAIL | <description> | <1-10> |
| ... | ... | ... | ... |
### STRIDE Threat Matrix
| Component | Threat | Likelihood | Severity | Mitigation |
|-----------|--------|-----------|----------|------------|
| <name> | <S/T/R/I/D/E> | <low/medium/high> | <1-10> | <action> |
### LLM/AI Security
| Finding | Severity | Mitigation |
|---------|----------|------------|
| <description> | <1-10> | <action> |
(or "Not applicable: no LLM/AI features detected.")
### Summary
**Total findings:** <count>
**Blocking (8/10+):** <count>
**Action items:** <numbered list>
### Verdict
<PASS: no blocking findings / BLOCK: N findings rated 8/10+ require remediation>trust
Read-only safety scan for untrusted projects. Detects install-time hooks, credential-theft patterns, exfiltration endpoints, CI/CD attack patterns, editor auto-run, dependency red flags, and binary anomalies. Produces a verdict: SAFE / SUSPICIOUS / HIGH-RISK / MALICIOUS.
When to use
- First contact with a project from any external source: take-home, contractor delivery, open-source repo from an unknown maintainer, a dependency you are considering adding.
- Automatically invoked by
/onboardPhase 0 before any architecture exploration begins. - Before running
pnpm install,uv sync,cargo build, or any build/setup command on a fresh clone.
When NOT to use
- Projects you wrote yourself.
- Projects from a trusted internal source where the provenance chain is known.
- After installation has already happened. The scan is preventive; once installation runs, lifecycle scripts have already executed.
Arguments
- No arguments: scan the current directory.
<path>: scan the given directory.--no-semgrep,--no-trivy,--no-gitleaks: opt out of specific external tools even if installed.--strict: upgrade MEDIUM findings to HIGH. Useful when the project is highly untrusted.--json: emit machine-readable findings instead of the narrative report. Used by/onboardPhase 0.--no-signatures: skippnpm audit signaturesin step 12.
Steps
- Detect ecosystem. In parallel, check for
package.json,pyproject.toml/requirements.txt/setup.py,Cargo.toml,go.mod,Gemfile,composer.json. Record the ecosystem set. - Read manifest and lockfile. For each detected ecosystem, read the manifest. Extract scripts/lifecycle hooks, dependency list with versions, declared maintainer. Read the lockfile if present.
- Scan install hooks. Apply Section A patterns from
trust-patterns.mdto the manifest scripts, at the severity each row assigns. A lifecycle value that pipes tobashorsh, or decodes withbase64 -dorxxd -r, is CRITICAL; one that callscurl,wget,node -e, orpython -cwithout a pipe to a shell is HIGH. - Scan auxiliary install configs. Read
.npmrc,.yarnrc,.yarnrc.yml,.pip.conf,setup.cfg[install]section. Apply Section A patterns. Unusual registry is HIGH. - Scan source files for code patterns. Walk source directories. Skip
node_modules,.git,dist,build,vendor,target,out. For each text file under 1MB, apply Section B patterns. Cluster matches per the verdict logic intrust-patterns.md. - Scan for sensitive path references. Grep all source files for the Section C strings. Any match in a non-test file is at least HIGH. Cluster with Section D matches in the same file escalates to CRITICAL.
- Scan for exfiltration endpoints. Grep for Section D patterns. Discord/Telegram webhook URLs are CRITICAL on sight. Pastebin URLs are HIGH. Direct public IP addresses in production code are HIGH. URL shorteners are HIGH.
- Scan CI/CD files. Walk
.github/workflows/,.gitlab-ci.yml,.circleci/,Jenkinsfile. Apply Section E patterns.pull_request_targetwith PR-ref checkout is CRITICAL. Unpinned actions in sensitive workflows are MEDIUM. Secrets piped to network calls is CRITICAL. - Scan editor configs. Read
.vscode/settings.json,.vscode/tasks.json,.idea/workspace.xml,.envrc,.devcontainer/devcontainer.json. Apply Section F patterns. Auto-run on folder open is HIGH.evalin.envrcis CRITICAL. - Scan dependencies. For each direct dependency in the manifest:
- Query offline metadata first, lockfile, package cache.
- If
pnpmis available and the user has internet, runpnpm view <name> timeto get age. Skip if offline. - Compare names against the typosquat list and known-malicious package list in
trust-patterns.md. - Apply Section G patterns. Known-malicious match is CRITICAL. Age under 7 days is HIGH. Lockfile resolving to non-default registry is CRITICAL.
- Scan binaries. Walk the tree for files with executable bits, non-text content, in non-build directories. Apply Section H patterns. Pre-compiled binaries in source-only directories are HIGH.
- Integrate external tools, auto-detect, parallel.
gitleaksif installed: rungitleaks detect --no-git --redact --report-path /tmp/gitleaks-trust.json. Parse findings.semgrepif installed and theapiiro/malicious-code-rulesetis reachable: run with that ruleset. Parse findings.trivyif installed: runtrivy fs --scanners misconfig,secret,vuln .. Parse findings.pnpm audit signaturesifpackage.jsonandpnpm-lock.yamlare present, network is available, and--no-signatureswas not passed. Verifies Sigstore provenance.- Each tool's findings merge into the master findings list with mapped severity. Tools are opt-out via
--no-<tool>if the user wants speed.
- Compute verdict. Per the rules in
trust-patterns.mdVerdict Logic section. Per-file aggregate first, then project aggregate. - Render the report. Markdown output. Header with verdict, scan duration, timestamp, ecosystem(s) detected, external tools used. Findings grouped by section. Each finding includes severity, file:line, pattern matched, rationale, recommendation. Closing summary with next-step recommendations: do not install, do not run, sandbox in Docker, abandon the project.
Output format
## Trust Scan Report
**Verdict:** SAFE / SUSPICIOUS / HIGH-RISK / MALICIOUS
**Project:** <path>
**Duration:** <seconds>
**Timestamp:** <YYYY-MM-DD HH:MM GMT>
**Ecosystems:** <list>
**External tools used:** <gitleaks, semgrep, trivy, none>
### Worst findings
1. [CRITICAL] <one-line summary> at <file:line>
2. [HIGH] <one-line summary> at <file:line>
3. [HIGH] <one-line summary> at <file:line>
### Findings by section
#### Section A. Install-time hooks
| Severity | File:Line | Pattern | Rationale |
|----------|-----------|---------|-----------|
[Repeat for sections B through H]
### Verdict explanation
<One paragraph stating why the verdict landed where it did>
### Recommendations
<Numbered next steps. Vary by verdict:
- SAFE: proceed with onboarding.
- SUSPICIOUS: review findings before installing.
- HIGH-RISK: do not run any setup command. Inspect the flagged files manually.
- MALICIOUS: do not install, do not run, do not open in your IDE. Move to a Docker sandbox or delete the directory.>Rules
- Read-only. Never install dependencies, never run lifecycle scripts, never execute any script from the project.
- Never read
.envor*.local.envfiles. Only.env.example. - Never reveal actual secret values. Show file, line, pattern name. Mask the match.
- Never call paid external APIs without explicit user opt-in.
- Pattern list in
trust-patterns.mdis the single source of truth. Updates land there. - Verdict MALICIOUS has no override, because it comes only from a definitive IOC: a row rated CRITICAL or a Section C read paired with a Section D endpoint, never from clustering alone. Verdict HIGH-RISK, including a HIGH cluster, requires the user to type a confirmation phrase. SUSPICIOUS asks once and defaults to no.
- Skip scan directories:
node_modules,.git,dist,build,vendor,target,out,coverage. Their contents are not analyzed.
Rules
- Never install scanning tools without asking. Report availability.
- Never modify code or fix vulnerabilities automatically. Report and let user decide.
- Never expose actual secret values. Show file, line number, pattern name only.
- Always scan
.env.example, never.envdirectly. - Always detect package manager from lockfile.
- Never update packages without showing changes and getting approval.
- Never apply
pnpm audit --fixoverrides that cross a major version without explicit approval. - If no vulnerabilities found, say so clearly.
- Classify by actual severity, not quantity.
Common Rationalizations
- "
trivyis missing, so install it and continue": installing a scanner needs the user's approval. Report what is available and ask. - "
pnpm audit --fixclears the report fastest": it can jump major versions and break the build. Show the changes and get explicit approval. - "Showing the leaked key makes the finding concrete": the report carries file, line, and pattern name, with the match masked.
- "Run
pnpm installfirst so the dependency scan seesnode_modules": on an untrusted project, install runs lifecycle scripts. Runtrustfirst, from manifests and lockfiles only. - "Twelve LOW findings outweigh one HIGH": classify by actual severity, never by count.
Red Flags
- Stop and recommend no install, no run, and a Docker sandbox when
trustreaches a MALICIOUS verdict. - Stop and require the confirmation phrase when
trustreaches HIGH-RISK. - Stop and redact when a draft finding contains a live secret value instead of a masked match.
- Stop and read
.env.examplewhen a step points at.envor*.local.env. - Stop and ask for approval when a step would modify code, a lockfile, or an installed package.
Verification
- The report names every layer or section scanned, the scanners used, and a GMT date.
- Each finding carries a severity, a
file:lineor commit hash, and the matched pattern name. git statusshows no change made by the run, except packages the user approved underdeps update.- After
deps update, a re-audit ran and reports no new vulnerabilities. daily,comprehensive, andtrustend with an explicit verdict line.
Related skills
/review-- Security-aware code review of specific changes./test-- Run tests to verify security fixes./infra docker-- Docker container management.
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
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.

