/security-toolkit:vercel-forensicsfrom security-toolkit
Preservation-first forensic evidence collection and analysis for Vercel security incidents (OAuth supply-chain compromise, env-var exposure, audit-log triage). Produces a frozen evidence directory, an 8-section findings report, and a rotation-worklist CSV for downstream rotation tooling. Strictly read-only. Never rotates, revokes, deletes, or redeploys. The banned-ops list is absolute. Rotation is handed off to subinium/vercel-incident-toolkit Flow C or codyhxyz/metapod-harden `/rotate-vercel-env <KEY>` using this skill's CSV as input. Use this skill when: (1) Vercel publishes a security incident and you need to assess exposure across your team / account / linked GitHub org. (2) A customer suspects env-var exposure and wants an evidence bundle plus prioritized rotation worklist by lunch Monday. (3) Audit-log triage across Vercel activity + GitHub audit log is needed without contaminating the very log under investigation. (4) Forensic handoff to a rotation tool is required — this skill produces the input, another tool performs the rotation. Evidentiary bar: engineering-triage grade (SHA-256 manifest + software WORM via `chmod -R a-w`). NOT court-admissible. For legally admissible exhibits, use Velociraptor / KAPE / Magnet AXIOM, or wait for v2 which adds GPG signing + dual-location manifests + RFC 3161 time-stamping.
Trending skills
7-day visitors to each skill page
Ships in security-toolkit. 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; scripts run unread.
Preservation-first evidence collection and analysis for Vercel incidents.
Pulls Vercel team + project data and adjacent GitHub audit data, redacts
matched secret patterns, freezes the case directory (SHA-256 manifest +
chmod -R a-w on raw evidence), then produces triage markdown, a fused
timeline, per-actor profiles, a build-log IOC scan, and a rotation-worklist
CSV.
Read-only discipline in this skill is layered (preserves defense-in-depth) but not uniformly code-enforced across every layer. Be honest about which layer catches what:
| Layer | What it enforces | How it's enforced |
|---|---|---|
| L1 Agent contract | Banned-ops refused before any action | SKILL.md Preservation Contract; agent echoes verbatim before Phase 0 |
| L2 Trusted CLIs | Only api.vercel.com / api.github.com reachable | Scripts invoke vercel api / gh api / curl with hardcoded hosts; no other outbound targets anywhere |
| L3 Query + verb allowlist | decrypt= / reveal= rejected; GET-only | _common.py::validate_url (Python layer); bash layer relies on scripts never constructing -X <verb> commands (enforced at review time by banned-ops grep) |
| L4 API contract | value / decryptedValue not returned on plain GETs | Upstream Vercel API behavior; confirmed empirically. Client-side _common.py::project_fields is a Python-only safety net, not applied to bash-written raw JSON |
| L5 Software WORM | Frozen raw evidence immutable | freeze.sh writes SHA-256 manifest then chmod -R a-w on raw/ + root artifacts (analysis/ and handoff/ stay writable so analysis scripts can run against frozen input) |
v2 will upgrade L3 to a shell-level validate_url wrapper invoked before
every outbound request and upgrade L4 to a mandatory post-write projection
pass. See references/allowlist-enforcement.md
for the full enforcement map.
The agent echoes this contract verbatim before any Phase 0 action. If the user asks for a rotation, deletion, or any mutation mid-workflow, refuse and point to the handoff targets below.
references/preservation-constraints.md)vercel env add|rm|update|pull — pull creates a new exfil target on disk.vercel redeploy | deploy | remove | rollback — alters the target state.vercel api or gh api with -X PATCH|POST|PUT|DELETE.gh api graphql mutation operations.git push, git reset --hard, token-revoke, OAuth-app-delete.chmod -R a-w on the local evidence directory.subinium/vercel-incident-toolkit — Flow C consumes rotation-worklist.csv.codyhxyz/metapod-harden — /rotate-vercel-env <KEY> consumes individual rows.This skill produces evidence + findings. It does not rotate. Run this skill first; hand the CSV to subinium or metapod second.
Patterns adopted with attribution (full attribution inline in references):
subinium/vercel-incident-toolkit — 3-tier env-var threat model, lingering-threats checklist, canary env var pattern.garyhtou/Vercel-Env-Var-Exposure-Triager — read-only endpoint allowlist pattern, rotation-worklist CSV schema.codyhxyz/metapod-harden — P0/P1/P2 rotate tiers, env-var class taxonomy, deployment anomaly scan, 8-section audit report, CLI-quirks catalogue.Load references only when needed for the user's specific question.
| Topic | Reference | Covers |
|---|---|---|
| Banned-ops rationale, adversary model, case-dir gitignore hygiene | references/preservation-constraints.md | Why each mutation is banned; lightweight adversary model; evidence-directory .gitignore warning. |
| What can be collected per tier + known gaps | references/data-inventory.md | Per-tier surface (Hobby/Pro/Enterprise); retention; tier detection inline; documented gaps. |
| Endpoint catalogue + rate limits | references/api-endpoint-reference.md | Every endpoint invoked with its allowlisted path, rate limit, and 404-prone edges. |
| Read-only enforcement mechanics | references/allowlist-enforcement.md | ALLOWED_PATHS, ingress projection, atomic write, CSV formula-injection neutralization, log redaction. |
| Pagination, rate-limit recovery, IOC regex list | references/collection-patterns.md | Pagination idioms, 429 recovery, redaction patterns, and the full IOC regex set consumed by build-log-scan.py. |
| Triage → timeline → per-actor → IOC methodology | references/analysis-methodology.md | Severity rubric, class taxonomy, lingering-threats checklist, attribution caution. |
| 5-phase attack chain + STRIDE + 6 pivot sub-paths | references/threat-model-context.md | Workspace OAuth → pivot → persistence model; 3-tier env-var threat model (subinium). |
| Findings report + handoff bundle layout | references/report-template.md | Per-finding format; 8-section audit report (metapod); bundle layout. |
| Where else to look | references/tail-end-pointers.md | Workspace OAuth hunt; vendor audit logs; MCP inventory pointer; canary env var; 2026 adjacent SaaS. |
| Known Vercel CLI / API bugs + workarounds | references/vercel-cli-quirks.md | vercel activity hang; env pull silent overwrite; --sensitive dev-target bug; trustedIps undocumented field. |
| v1 accepted risks + v2 roadmap | references/known-residuals.md | 15 documented residuals: WORM defeat by local root, bash-layer ingress projection, TLS pinning gap, freeze-idempotence bypass, redaction pattern gaps, etc. Each cites the v1 mitigation and where v2 closes it. |
--no-github): fine-grained PAT with minimum scopes
— read:audit_log (org/enterprise); repo-level Administration read;
Metadata is implied.Never use a token you are about to rotate. The investigation token itself appears in Vercel's activity log and GitHub's audit log as the actor of every read the skill performs. If the investigation token overlaps with a token suspected of compromise, every read the skill makes contaminates the very evidence being collected. Mint a new token specifically for the forensic pull, scope it minimally, and revoke it when the case is frozen.
vercel, gh, jq, python3 (3.10+), BSD shasum -a 256.preflight.sh via
saml.connection → resourceConfig.concurrentBuilds → audit-log 404
fallback. GitHub owner type (User vs Organization) is probed the
same way. See references/data-inventory.md._common.py::get_token() resolves tokens in this order, printing the
source to stderr:
--token-file <path> (mode 0600 required).$VERCEL_TOKEN / $GH_TOKEN).getpass prompt.preflight.sh additionally refuses ambient $VERCEL_TOKEN in the
parent shell (Check 1) — the env-var source is reserved for explicit
--token-file <path> or getpass during preflight, then passed through
scripts deliberately. This is stricter than _common.py::get_token()
alone; preflight is the authoritative gate.
A bare --token <value> CLI arg is refused — it would land in shell
history and process args.
preflight.sh creates ~/.vercel-forensics/case-<USER>-<hostname>-<iso-ts>/
at mode 0700. The path intentionally sits outside any repo; see
references/preservation-constraints.md §4
for .gitignore hygiene if the bundle is ever copied into a project
directory.
collect.sh orchestrates all six phases under per-phase idle watchdogs
(ADR-004). Every sub-script accepts --dry-run (prints planned endpoints
to DRY-RUN-PLAN.md, fires zero HTTP) and --log-requests (redacted
request log at raw/request-log.jsonl).
preflight.sh — auth check, tier detection, GitHub owner-type probe,
case-dir creation, slug regex, advisory lockfile on sha256(token)[0..16].activity-paginate.sh — /v3/events throttled ≤50 req/min,
5-minute idle watchdog, RESUME_FROM, 429-aware.vercel-team-context.sh — team (incl. saml object), members, tokens,
drains, integrations (LIST + per-config DETAIL via
/v1/integrations/configurations/:cid), domains, aliases, certs,
webhooks, edge-config, access-groups. Parallel fan-out.vercel-per-project.sh — deployments, env metadata (never values),
logs (24h on Pro), firewall config/bypass/attack-status, access-groups,
retention. Probes the undocumented trustedIps + ssoProtection object.--no-github)github-repo-graphql.sh — per-repo GraphQL: defaultBranchRef,
branchProtectionRule, deployKeys, visibility, pushedAt. Webhooks
stay on REST.github-audit-log.sh — REST audit log in 14-day chunks, 180-day window,
per-owner-type endpoint, 403-recovery via JSONDecoder.raw_decode.vercel-build-logs.sh — per-deployment build events for the incident
window. Serial; feeds build-log-scan.py.--no-github — Vercel-only mode; skips Phase 4 and the GitHub audit
log.--dry-run — enumerates endpoints + resolved params, writes
DRY-RUN-PLAN.md, makes zero outbound calls.--log-requests — writes redacted request log (Authorization header
and secret query params filtered before first write).0 clean, 1 fatal (preflight failed or case dir unwritable),
2 partial (one or more phases hit a watchdog or returned non-2xx —
see scan-errors.txt).Redaction runs on the case dir before any bytes leave the investigator's machine. Freeze must run exactly once.
redact.py --case "$CASE" — walks raw/, emits redacted siblings
(*.redacted.json / *.redacted) in memory before the first write.
Patterns cover Discord/Slack webhooks, Stripe (sk_live_ / whsec_),
AWS pre-signed (X-Amz-Signature), GitHub PAT prefixes
(ghp_ / github_pat_ / gho_ / ghu_ / ghs_), JWT three-segment,
Basic-Auth URLs, Azure SAS, GCP SA keys, IPv4/IPv6, and generic
high-entropy base64. Sidecar analysis/redactions.log records
path + pattern + count — never values.freeze.sh "$CASE" — writes three artifacts:
MANIFEST.sha256 (BSD shasum -a 256 format, deterministic sort).COLLECTOR.json (whoami + hostname + tool version + case id +
collection start/end ISO + timezone).CHAIN_OF_CUSTODY.md (chronological ledger: phase boundaries,
rate-limit events, scan-error entries).
Then chmod -R a-w "$CASE". Refuses to re-run if
MANIFEST.sha256 already exists.If redact.py exited non-zero or did not run to completion, re-run
before freeze.sh. Never freeze an unredacted case dir.
All analysis scripts read the frozen raw/ tree and write to
$CASE/analysis/. freeze.sh deliberately carves analysis/ and
handoff/ out of the WORM scope — it applies chmod -R a-w to
$CASE/raw/ plus the three evidentiary root artifacts
(MANIFEST.sha256, COLLECTOR.json, CHAIN_OF_CUSTODY.md), leaving the
two derivation directories writable so analysis can run against a frozen
input. What the manifest hashes is exactly what WORM locks; analysis
outputs are derivations, not evidence.
triage.py --case "$CASE" → analysis/triage.md —
event-type counters, CLI env-read / deployment-block / member-churn
slices, per-project sensitive-vs-non-sensitive counts, class taxonomy,
P0/P1/P2 rotate-priority, account-surface audit table, local CLI
hygiene, and the runtime-log availability finding (MEDIUM if log
drain absent + incident window > 24h).timeline-fuse.py --case "$CASE" → analysis/timeline.tsv —
Vercel + GitHub events fused, 15-minute correlation window. Handles
either source missing gracefully.per-actor-profile.py --case "$CASE" → analysis/per-actor.md +
analysis/actors.json — primary owner (lastUpdatedBy) + backup owner
(most-frequent 90-day deployer, bots filtered); per-actor baselines;
anomaly flags; non-corporate email domain flag; deployment anomaly
scan (creator.uid + source diversity).build-log-scan.py --case "$CASE" → analysis/build-log-scan.md —
IOC regex from references/collection-patterns.md §9, hosts
histogram, HIGH / LOW / NONE calibration (noise-tagged patterns only
escalate when paired with a high-tagged hit).rotation-worklist.py --case "$CASE" → handoff/rotation-worklist.csv
— garyhtou's 23-column schema, formula-injection neutralized
(= + - @ \t \r → ' prefix), CONFIDENTIAL header comment, atomic
write, rows sorted by provider/team/project/key. Never emits
env-var values. Honest reason: Vercel's plain-GET env-metadata
endpoint does not return value or decryptedValue in the first
place (L4 above), and _common.py::ALLOWED_PATHS rejects any URL
carrying ?decrypt= or ?reveal= — so values never reach disk to
begin with.Use references/report-template.md for
the per-finding format and the 8-section audit report (metapod):
per-actor-profile.py).auth.json presence + recommended vercel logout).VERCEL_AUTOMATION_BYPASS_SECRET unrecoverable).Severity discipline: HIGH = plausible exploitation + active signal; MEDIUM = plausible exposure OR unusual actor OR hygiene gap on critical control; LOW = hygiene with no active signal. Attribution caution: default "unknown actor" until a second corroborating signal.
What the operator ships to the responder / customer / auditor:
<bundle>/
├── executive-summary.md (5-bullet TL;DR, copy from triage.md §1)
├── audit-report.md (8-section, copy of triage.md + per-actor.md)
├── technical-findings.md (per-finding detail, cited evidence)
├── timeline.tsv (analysis/timeline.tsv)
├── evidence-index.md (manifest → file → purpose table)
├── rotation-worklist.csv (handoff/rotation-worklist.csv)
├── MANIFEST.sha256 (copied from frozen case dir)
├── COLLECTOR.json (copied from frozen case dir)
├── scan-errors.txt (if present — partial-failure log)
└── raw/ (frozen, a-w, SHA-verifiable against MANIFEST)
See references/report-template.md for
the full layout.
This skill produces engineering-triage evidence: SHA-256 content
hashes, a chronological custody ledger, software WORM via chmod -R a-w,
and a COLLECTOR.json identity header. That bar is sufficient for
"what do we rotate and by when" decisions, internal post-mortems, and
vendor escalation.
It is not sufficient for court-admissible exhibits. A sophisticated
adversary with local root on the investigator's machine can defeat
chmod -R a-w, and the manifest is not cryptographically signed. For
legally admissible collection, use a dedicated DFIR tool (Velociraptor,
KAPE, Magnet AXIOM, FTK) — or wait for v2, which adds GPG signing,
dual-location manifests, verify-scene.sh, and optional RFC 3161
time-stamping.
For the full list of known v1 residuals — including WORM defeat by
local root, bash-layer ingress projection gaps, TLS pinning / MITM,
freeze-idempotence bypass, and redaction pattern catalogue gaps — see
references/known-residuals.md. Each
item cites its v1 mitigation and where v2 closes it.
Where else to look after the Vercel + GitHub sweep completes — see
references/tail-end-pointers.md for
the full list:
~/Library/Application Support/Claude/,
~/.cursor/mcp.json, ~/.codex/. v1 documents the paths; v2 adds a
read-only mcp-inventory.sh.vercel logout + gh auth logout
then fresh login.These rules are canonical here. Rationale for each lives in
references/preservation-constraints.md — never state the rule text in
both files.
api.vercel.com and
api.github.com. Any other outbound hostname is a bug — stop and
report it.vercel env pull|add|rm|update, no redeploy, no
-X PATCH|POST|PUT|DELETE under any circumstance. If the user asks,
refuse and point to subinium / metapod.MANIFEST.sha256 did not write, collection
did not complete. Do not claim freeze succeeded.redact.py threw any error or did not
run to completion, re-run before freeze.sh. Never freeze an
unredacted case dir._common.py::get_token() hierarchy only.references/allowlist-enforcement.md (opens in a new tab)references/analysis-methodology.md (opens in a new tab)references/api-endpoint-reference.md (opens in a new tab)references/collection-patterns.md (opens in a new tab)references/data-inventory.md (opens in a new tab)references/known-residuals.md (opens in a new tab)references/preservation-constraints.md (opens in a new tab)references/report-template.md (opens in a new tab)references/tail-end-pointers.md (opens in a new tab)references/threat-model-context.md (opens in a new tab)references/vercel-cli-quirks.md (opens in a new tab)scripts/_common.py (opens in a new tab)scripts/activity-paginate.sh (opens in a new tab)scripts/build-log-scan.py (opens in a new tab)scripts/collect.sh (opens in a new tab)scripts/freeze.sh (opens in a new tab)scripts/github-audit-log.sh (opens in a new tab)scripts/github-repo-graphql.sh (opens in a new tab)scripts/per-actor-profile.py (opens in a new tab)scripts/preflight.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub swannysec/robot-tools --plugin security-toolkit5 skills in this plugin
/gha-hardeningGitHub Actions security hardening, configuration best practices, and
vulnerability detection. Covers workflow syntax, trigger security,
permission management, secrets handling, OIDC federation, supply chain
protection, self-hosted runner hardening, attack pattern recognition,
and security scanning tool rules.
60% security/hardening content, 40% implementation/configuration guidance.
Use this skill when users need to:
(1) Harden GitHub Actions workflows against injection, supply chain, or
privilege escalation attacks
(2) Configure workflow permissions, secrets, OIDC, or environment
protection rules securely
(3) Understand dangerous workflow patterns (pull_request_target + checkout,
workflow_run artifact poisoning, script injection via ${{ }})
(4) Choose or configure security scanning tools (zizmor, scorecard,
actionlint, poutine, harden-runner, Raven)
(5) Respond to supply chain incidents (tj-actions, reviewdog, compromised
action tags)
(6) Audit workflows for OWASP CI/CD risks, CIS benchmark compliance, or
OpenSSF Scorecard checks
(7) Write or review workflow YAML (triggers, matrix, reusable workflows,
composite actions, caching, artifacts, environments)
(8) Secure self-hosted runners (ephemeral patterns, network egress,
persistence detection, runner groups)
/secret-scanning-investigatorInvestigate GitHub secret scanning alerts to trace provenance, gather context,
assess risk, and produce a structured report for security professionals.
Handles one or more alerts in a single investigation using only open-source tools.
/security-vuln-analyzerEvidence-led security vulnerability analysis, fix verification, and guarded fix development for source repositories. Use for reported or suspected vulnerabilities, primary-control weaknesses, secure-code review, cross-model verification, remediation verification, and candidate security fixes. Supports Claude Code and Codex/ChatGPT Desktop with mandatory cold cross-provider verification for security claims./vantaVanta compliance platform operations — posture analysis, audit readiness,
vulnerability management, personnel compliance, and flexible reporting.
Complements the official vanta-mcp-plugin with analysis workflows,
direct API access for write operations, and reporting capabilities
not available in the Vanta UI.
50% compliance analysis/reporting, 30% API operations, 20% workflow orchestration.
Use this skill when users need to:
(1) Assess compliance posture across frameworks (gap analysis, control coverage,
cross-framework overlap)
(2) Prepare for audits (readiness checklist, missing evidence, policy expiry,
personnel compliance)
(3) Track and triage vulnerabilities with SLA awareness (approaching deadlines,
missed SLAs, severity breakdown)
(4) Monitor personnel compliance (overdue training, policy acceptance,
deactivated personnel in scope)
(5) Generate compliance reports and executive summaries (posture, readiness,
vulnerability SLA, personnel, custom)
(6) Perform bulk low-risk operations (set control owners, acknowledge SLA
misses, reactivate test entities, update person metadata)
(7) Understand risk and vendor impact on audit readiness (unmitigated risks,
stale vendor reviews, risk-control linkage)
(8) Query Vanta data that is hard to surface in the Vanta UI (cross-framework
control overlap, integration resource inventory, historical test status)