cosmix/loom/loom-security-scan
Claude Code and agent skill by cosmix/loom
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Quick routine security checks for secrets, dependencies, container images, and common vulnerabilities.
Install
npx vskill@latest install cosmix/loom/loom-security-scanSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as cosmix/loom/loom-security-scan.
Security Scan
Fast, automatable checks to run pre-commit / in CI — catch secrets, known-CVE deps, image and IaC misconfig early. This is the tooling skill; for methodology and compliance use loom-security-audit, for STRIDE use loom-threat-model, for deep dependency/SBOM work use loom-dependency-scan.
Tool Selection Matrix
| Scan type | Tool | Alternative | Notes | |
|---|---|---|---|---|
| Secrets | TruffleHog | Gitleaks | TruffleHog verifies live creds; Gitleaks is regex-fast | |
| Deps (JS) | npm audit | osv-scanner, Snyk | --audit-level=high | |
| Deps (Python) | pip-audit | safety | pip-audit uses OSV/PyPI advisory DB | |
| Deps (Go) | govulncheck | osv-scanner | call-graph aware → fewer false positives | |
| Deps (Rust) | cargo audit | cargo-deny | RustSec DB | |
| Container image | Trivy | Grype | --scanners vuln,secret,config | |
| SAST multi-lang | Semgrep | CodeQL | p/security-audit, p/secrets | |
| SAST Python | Bandit | Semgrep | — | |
| SAST Go | gosec | Semgrep | — | |
| Dockerfile | hadolint | Trivy config | best-practice lint | |
| IaC (Terraform) | tfsec / trivy config | Checkov | — | |
| IaC (K8s) | kubesec / trivy | Checkov | — | |
| Universal (fs+img, vuln+secret+config) | Trivy | osv-scanner | one binary for most CI needs |
Priority Order
Run cheapest/highest-signal first; a secret in git history is worse than a medium CVE.
1. Secrets (Critical)
Prefer dedicated tools over grep — they cut false positives and TruffleHog verifies whether a key is live.
⚠ Secret-scanning gotchas:
- Scan history, not just the worktree. A rotated key still lives in old commits and forks.
gitleaks detectwalks history;gitleaks detect --no-git/trufflehog filesystemonly see current files. A committed-then-deleted secret must be rotated, not just removed — deletion doesn't scrub history. --only-verified(TruffleHog) suppresses unverifiable/expired hits — great for CI signal, but it will miss a secret whose endpoint it can't reach; run a full pass periodically.- Regex fallback for a quick look (dedicated tools are better): AWS keys
(AKIA|ASIA)[A-Z0-9]{16}, PEM-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----, generic(password|secret|token|api[_-]?key)\s*[:=]\s*['"][^'"]{8,}.
⚠ Secrets leak at runtime, beyond git — scanners won't catch these; flag them in review:
- Process argv — a secret passed as a CLI arg (
mytool --token=abc) is world-visible inps//proc/*/cmdline. Pass via env or stdin/file instead. - Env inheritance — child processes inherit the parent's env; a spawned subprocess or crash-reporter can exfiltrate
AWS_SECRET_ACCESS_KEY. Scope/scrub env before spawning untrusted code. - Logs & error/stack traces — request bodies,
Authorizationheaders, DB URLs with passwords, and exception dumps routinely leak secrets. Redact structured fields; never log full request objects. - Client-side & URLs — secrets in query strings land in access logs, referers, and browser history;
.env/NEXT_PUBLIC_*bundled into frontend builds ship to users.
2. Dependency CVEs (High)
For triage, SBOM, license, and supply-chain (typosquat/dependency-confusion) → loom-dependency-scan. ⚠ npm audit reports advisories against the lockfile including transitive/dev-only deps — a "critical" in a build-time devDependency may be unreachable at runtime; confirm reachability before blocking a release.
3. Container Images (High)
⚠ Scan the exact immutable digest (myimage@sha256:…) you'll deploy, not a floating :latest (mutable → scan/deploy drift). Rebuild on base-image CVEs; a passing scan goes stale as new CVEs land.
4. SAST (Medium)
5. IaC / Config (Medium)
CI Integration
Set nonzero exit → fail the job. ⚠ npm audit ... || true never fails CI (swallows exit code) — only use || true for advisory-only steps you deliberately don't gate on.
Interpreting Results
| Severity | Action | Timeline | |
|---|---|---|---|
| Critical | Block merge, fix now | Hours | |
| High | Fix before merge | Days | |
| Medium | Plan a fix | Sprint | |
| Low | Track | Backlog |
Common false positives — triage, don't blindly suppress: test fixtures / example creds (add to .gitleaksignore with a note), unreachable/dev-only dep CVEs (document acceptance), base64/UUIDs mistaken for secrets. Record accepted risks with a justification and reviewer so the next scan doesn't re-litigate them.
Verification Checklist
- [ ] Secret scan covers git history (not just worktree); any historical hit → key rotated, not just deleted
- [ ] Dependency scan run for every ecosystem in the repo (a Python service with a JS build tool needs both)
- [ ] Container scan targets the deployed digest; Dockerfile linted (hadolint + trivy config)
- [ ] SAST run with a security ruleset (not just style)
- [ ] CI steps fail on Critical/High (no stray
|| true); pre-commit blocks secrets locally - [ ] CI grants minimal
GITHUB_TOKENpermissions and pins every third-party action to a reviewed full commit SHA - [ ] Findings triaged: confirmed / false-positive / accepted-risk, each with owner + justification
- [ ] Critical/complex/architecture findings escalated →
loom-security-audit
Escalate to loom-security-audit
Critical or novel findings, architecture-level concerns, compliance questions (SOC2/PCI/HIPAA/GDPR), or incident response — scanners find known patterns; humans/audits find logic and authorization flaws.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/loom-security-scan/SKILL.md
Popularity
- Repository stars
- 56
- Repository forks
- 3
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cosmix/loom/loom-security-scan)