/vibesubin:audit-securityfrom vibesubin
Runs a hand-curated security sweep across a repo, finding secrets, injection patterns, XSS, and more. Triages findings as real, false-positive, or needs-review. Language-agnostic, no heavyweight scanner required.
Ships in vibesubin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A security audit that the operator will actually read.
Enterprise scanners emit hundreds of warnings. Non-developers silence them within a week and then a real vulnerability slips through because nobody's reading anymore. The opposite strategy works better: a short, hand-curated list of patterns that are almost always actionable, each one triaged individually. Every hit gets classified. Every classification has a reason.
Never report more than ~20 findings. If the automated sweep returns 100 hits, triage them into categories and report the categories, not the raw list. The operator's attention is the scarcest resource and the wrong optimization is "comprehensive."
Any of:
.env exposed"refactor-verify)If the operator asks for something outside this skill's scope (compliance audits, penetration testing, crypto review), say so plainly and suggest a specialist tool.
Before running, establish three things with the operator. Do not start the sweep until these are clear:
If the operator doesn't know the answers, pick the most conservative defaults: whole repo, report all, assume public-facing. Tell them that's what you picked.
Before starting the procedure, write an explicit Assumptions block. Don't pick silently between interpretations; surface the choice. If any assumption is wrong or ambiguous, pause and ask — do not proceed on a guess.
Required block:
Assumptions:
- Exposure surface: <public-web | internal | CLI | library>
- Language/framework: <detected set — e.g., Next.js + Python API>
- Existing scanners: <none | Dependabot | Semgrep | GHAS — affects which patterns this sweep adds vs duplicates>
- Scope: <whole repo | subdirectory path | single file>
Typical items for this skill:
Stop-and-ask triggers:
Silent picks are the most common failure mode: the skill runs, produces plausible output, and the operator doesn't notice the wrong interpretation was chosen. The Assumptions block is cheap insurance.
These are the ten categories. Each category has language-specific grep/AST patterns in references/patterns.md. Run them all; don't skip any for time.
sk-, ghp_, xoxb-, -----BEGIN, etc.)git log --all -p -S<suspect> to see if ever committed historicallyAlso check whether secret files themselves are tracked:
git ls-files | grep -iE '\.env$|\.env\.|\.pem$|id_rsa|id_ed25519|credentials|\.ppk$'
Anything returned here is an immediate HIGH regardless of content.
Output rule for secret findings — fingerprint, never the raw value. When reporting a hardcoded secret or a tracked secret file, never print the actual value. Print a fingerprint: file path, line number, value length, first 4 characters (or first 7 if it's a known prefix like sk-, ghp_, xoxb-), and a provider guess if the prefix is recognizable. Example: "src/config.ts:14 — token, length=51, prefix=sk-pro (OpenAI?). Rotate immediately." The raw value is already in the operator's repo; printing it again into a chat log, a PR description, or a screenshot doubles the leak surface.
SQL built by pasting strings. Language-agnostic pattern:
execute, query, raw, or fetch.format() / % inside a query call+, ., ..) inside a query callPrepared-statement placeholders (?, $1, :name) are the safe form. Flag anything else.
subprocess.run(..., shell=True)child_process.exec(userInput) (as opposed to execFile/spawn with args)$() with user input in shell scriptsos.system anywhereeval / exec / Function(userInput) / setTimeout(userInput, ...) (in JS)pickle.loads on anything that might come from a networkyaml.load without SafeLoaderopen(request.something), fs.readFile(req.query.x), File.new(params[:path])FileResponse / sendFile with user-controlled path segmentsinnerHTML =, dangerouslySetInnerHTML, v-html, {@html ...} (Svelte)document.write(|safe, Django mark_safemarked does not sanitize HTML output. The historical sanitize: true option was deprecated and removed. The renderer will faithfully reproduce any <script> it finds in the input. Pair it with DOMPurify on the rendered HTML before injecting it into the DOM.markdown-it disables HTML input by default (html: false), which is safe as long as the option is not overridden. If html: true is set anywhere, the output must be sanitized downstream (DOMPurify again).showdown similarly does not sanitize. Use a sanitizer on the output.bleach (Python), sanitize-html (Node), or language-equivalent after rendering. Never trust Markdown input to be safe just because the renderer "supports" sanitization.pickle.loads / cloudpickle.loadsyaml.load / yaml.Loader (use yaml.safe_load / yaml.SafeLoader)Marshal.load (Ruby) on untrusted inputObjectInputStream (Java) on untrusted streamsunserialize (PHP) on user inputEvery set_cookie / Set-Cookie call should include httpOnly, Secure, and SameSite. Flag any that don't.
Any response header Access-Control-Allow-Origin: * on an endpoint that isn't a public CDN. Especially dangerous if combined with Access-Control-Allow-Credentials: true (actually forbidden by the spec but some code tries).
requirements.txt with no ==, package.json with ^ or *, Cargo.toml with no lockfile)package-lock.json, Cargo.lock, Gemfile.lock)if user_id == 1: style)none algorithm== instead of constant-time compareMath.random() used for session tokens / salts / OTPs (not cryptographically secure)For every hit, classify it as one of:
| Classification | Meaning | Action |
|---|---|---|
| REAL — CRITICAL | Exploitable remotely, data exposure, or secret leak | Fix now, then commit |
| REAL — HIGH | Exploitable but requires auth or specific context | Fix this sprint |
| REAL — MEDIUM | Defense-in-depth gap, not directly exploitable | Queue for cleanup |
| FALSE POSITIVE | The pattern matched but the code is actually safe | Explain why it's safe and move on — do not "fix" it |
| NEEDS REVIEW | You can't tell without more context (e.g., is this input trusted?) | Ask the operator one specific question |
Never just list findings without classification. A raw list of grep matches is worse than no audit, because the operator can't tell signal from noise.
When explaining a false positive, be specific: "This f-string inside a query is safe because days is an integer from int(request.query.get(...)) clamped to 0..365 on line 391." The specificity proves you actually looked.
Per-pattern triage rules: references/false-positive-triage.md
Always structured. Never a prose wall.
# Security sweep — <scope>
## Summary
- Scope: <files/dirs swept>
- Runtime context: <public / authenticated / internal>
- Total findings: <N>
- Triage: <X critical, Y high, Z medium, W false-positive>
## Critical (<N>)
### 1. <Category> — <file:line>
**What was found:** <quoted line>
**Why it's real:** <one-sentence reason>
**Fix:** <concrete code change or command>
### 2. ...
## High (<N>)
...
## Medium (<N>)
...
## False positives (<N>)
Listed only to show they were checked. No action needed.
### 1. <Category> — <file:line>
**Why not a vulnerability:** <specific reason>
## Needs review (<N>)
One specific question per item so the operator can answer and close it.
### 1. <Category> — <file:line>
**Question:** <precise question>
This skill is a minimal hand-curated sweep, not a full application security audit. If the operator needs any of the following, say so plainly and recommend a dedicated tool or human reviewer.
| Class of issue | Why this skill doesn't cover it | What to use instead |
|---|---|---|
| SSRF (Server-Side Request Forgery) | Requires dataflow tracing from user input to outbound HTTP clients. Language-agnostic grep is too coarse to avoid false positives. | Semgrep with SSRF rulepacks; language-specific SAST |
| CSRF (Cross-Site Request Forgery) | Framework-specific. Django, Rails, Next.js each have their own CSRF story. A generic checker gives false confidence. | Verify the framework's CSRF middleware is enabled and tokens are required on state-changing routes |
| IDOR (Insecure Direct Object Reference) | Requires understanding the application's authorization model. "Does this user have permission to read /orders/42?" cannot be answered by grep. | Manual review of every route that takes an ID from the URL; pen test for critical flows |
| Unsafe file upload | Requires runtime behavior (magic bytes, content-type validation, storage isolation). A pattern match catches obvious cases but misses most. | Dedicated upload validation libraries; storage in a separate origin |
| Open redirect | Partially covered (hardcoded redirects), but dynamic redirect targets built from query parameters need dataflow analysis. | Whitelist allowed redirect domains; Semgrep open-redirect rulepack |
| Business logic flaws | "The coupon code can be used twice" is a logic bug that no scanner can find. | Pen test; exploratory testing; code review |
| Crypto primitive choice | "You're using AES-CBC without HMAC" is a crypto-design issue. Not a pattern match. | Cryptography review by someone qualified |
| Supply chain compromises in transitive deps | Requires a full SBOM + CVE database join. Out of scope for a single grep sweep. | pip-audit / npm audit / cargo audit / Dependabot |
| Compliance frameworks (SOC 2, HIPAA, PCI-DSS, GDPR) | Legal / procedural, not technical. | Compliance consultant |
When the operator asks for one of these, respond with: "That's outside what audit-security does well. Here's what it would take to actually cover it: [link or tool]. Do you want me to run the standard audit-security sweep in the meantime?"
If the sweep finds a live credential leak, or the operator says "I accidentally pushed my .env", switch immediately to incident mode. Do not run the full triage. Do the following in order:
Before anything else. Cleanup comes after rotation — as long as the old credentials are still valid, the attacker's window is open.
~/.ssh/authorized_keys on every server, generate a new keypairDo not skip this step because "the repo is private." Private repos have been exfiltrated by compromised collaborator accounts, leaked CI logs, cloned forks, and accidental public-setting toggles. Treat every exposure as public.
The secret is still in every past commit until you rewrite history.
# Modern tool (recommended)
git filter-repo --path <path/to/leaked/file> --invert-paths
# or for a specific string:
git filter-repo --replace-text <file-with-patterns>.txt
# Legacy alternative (BFG Repo-Cleaner):
bfg --delete-files <leaked-file>
bfg --replace-text <file-with-secrets>.txt
Then force-push:
git push --force-with-lease origin --all
git push --force-with-lease origin --tags
Warn the operator before force-pushing. All collaborators need to re-clone; their existing clones will diverge.
.envAsk the operator: "Was this secret also used in any other project, service, or environment?" Credentials are often reused — the leak of one may mean several places are compromised.
Write a short post-mortem in docs/security/incidents/<date>-<what-happened>.md:
.env committed directly? secret in .github/workflows/*.yml? hardcoded in source?).gitignore update, .env.example audit)Hand the file off to write-for-ai to format. This file is for future AI sessions so the same mistake doesn't recur.
Add these guards before closing the incident:
.gitignore entries for every secret file type (hand off to manage-secrets-env)audit-security (or at minimum a secrets-scanning step like gitleaks) on every commitmain so no one can force-push againnpm ls <pkg> (or pnpm why, yarn why, pip show, cargo tree -i) to find dependents, and check whether a patched version exists before recommending removal. A package taken out without a replacement plan breaks downstream consumers. If a patched version exists, recommend the patch over the removal; if removal is the only path, surface the dependent list so the operator owns the breakage decision..semgrepignore / .banditignore / .trivyignore without a CVE/justification comment, suppression comments (# nosec, // trivy:ignore, # noqa: S for security rules) without traceable rationale, downgrading severity to evade CI thresholds, removing the offending test instead of fixing the vulnerability. The audit measures real exposure; suppressions without traceable justification are a regression dressed as a fix.Things to watch for in your own output:
eval( and missing a .env file sitting in git ls-files. Always check tracked secrets first; it's the highest signal-per-second category.This skill is already diagnosis-only by default — it never edits regardless of how it's invoked. When the umbrella runs it with sweep=read-only, the same sweep still runs, but the output shape is trimmed: only CRITICAL and HIGH findings are surfaced, the per-finding triage dialog is deferred to the umbrella's synthesis step, and the report leads with an aggregate stoplight + finding counts instead of a narrative section-by-section walkthrough.
Sweep-mode report includes:
.env → manage-secrets-env; CI secret issues → setup-ci)Sweep-mode report omits (vs the full direct-call report): MEDIUM findings, the false-positive list, the needs-review questions, the full incident runbook prose, and the proposed code-change snippets per finding.
No behavior change from default pure-diagnosis — the sweep still classifies every hit, still respects scope, still never edits. Only the output shape changes so the umbrella can synthesize across workers without reading a thousand-line report.
Marker-less invocation (direct call /audit-security) keeps the full report — MEDIUM, false-positive triage, needs-review questions, and per-finding fix snippets all included.
When the task context contains the tone=harsh marker (usually set by the /vibesubin harsh umbrella invocation, but can also come from direct requests like "don't sugarcoat" / "brutal review" / "매운 맛"), switch output rules:
src/api/users.py:47", not "potential information disclosure in the users endpoint".Harsh mode does not invent findings, fabricate CVSS scores, or become rude. Every harsh statement must be backed by the same evidence the balanced version would cite. The change is framing, not substance.
When the task context contains explain=layperson (from /vibesubin explain, /vibesubin easy, "쉽게 설명해줘", "일반인도 이해되게", "explain like I'm non-technical", "非開発者でも分かるように", "用通俗的话解释"), add a plain-language layer to every finding this skill emits. Combines freely with tone=harsh. Full rules at /plugins/vibesubin/skills/vibesubin/references/layperson-translation.md.
Every finding gets three questions answered in plain language, in the operator's language (Korean / English / Japanese / Chinese):
Wrap each finding in the box format from the shared reference. Header uses urgency phrase ("지금 당장" / "이번 주 안에" / "다음 릴리즈 전까지" / "시간 날 때") and the finding number. Footer names the hand-off skill (e.g., "어떤 스킬이 고치나요? — refactor-verify").
Findings, counts, file:line references, evidence, confidence tags, and severity are identical to balanced/harsh output. Only the wrapping and dimension annotations are added. Layperson mode is presentation-only.
refactor-verify for the fix.env files → hand off to manage-secrets-env for the remediation pattern (rotate, remove from history, add to gitignore, re-examine collaborators)setup-cifight-repo-rotreferences/patterns.md — concrete grep / AST patterns per categoryreferences/false-positive-triage.md — how to classify borderline hitsOptional helper tools (the pack does not require them, but uses them when available): Semgrep, Bandit (Python), ESLint-security (JS), gosec (Go), cargo-audit (Rust), pip-audit (Python), npm audit (Node), gitleaks / trufflehog for secret scanning.
What SKILL.md sets; muted values are Claude Code's defaults
Trigger on "is this safe", "security check", "audit", "any vulnerabilities", "anything leaked", "is my .env exposed", "OWASP", before public releases or open-sourcing, after a major refactor, or when the operator mentions a data breach, incident, or scare.
12 skills in this plugin
/codex-fixPost-edit loop that invokes `/codex:rescue` for a second-model review of the current branch, collects the findings, and hands them off to `refactor-verify`'s review-driven fix mode for triage, verification, and committed resolution. A thin host-specific wrapper — the portable review-driven engine lives in `refactor-verify`. Requires Claude Code with the Codex plugin installed; on every other host the skill emits a one-line fallback and exits without error. Operators whose review findings come from any other source (pasted notes, human PR review, Sentry alert, gitleaks output, Semgrep report, GitHub Advanced Security) should invoke `refactor-verify` directly and skip this wrapper entirely./fight-repo-rotFinds what's rotting in a repo and returns a prioritized diagnosis — dead code first, then god files / hotspots / hardcoded paths / stale TODOs / lopsided import graphs. Dead-code candidates are tagged HIGH / MEDIUM / LOW confidence so the operator can delete with calibrated risk. Pure diagnosis — never edits code, never plans fixes, never runs verification. Hand off to refactor-verify for deletions and restructures, to project-conventions for config issues, to audit-security for CVE dependency rot. Language-agnostic.npx claudepluginhub subinium/vibesubin --plugin vibesubinOther plugins' skills for the same job