viper-incident-forensics-triage
Skill22 starsChanged 16 days agoMITView on GitHub
Cloud & Application Security Incident Triage, Containment & Postmortem Auditor (modeled on NIST SP 800-61r3). Guides timeline reconstruction, credential rotation, and hardening.
In this repository72 other files it gives its agents.
- llms.txtllms.txt
- viper-agent-skill-supplychainSkill
- viper-ai-llm-guardrailsSkill
- viper-api-gateway-apigee-kongSkill
- viper-auth-oauth-jwtSkill
- viper-aws-iam-cloud-auditSkill
- viper-bola-idorSkill
- viper-browser-extension-mv3Skill
- viper-browseros-agentSkill
- viper-cicd-hardeningSkill
- viperclawSkill
- viper-container-k8s-auditSkill
- viper-crypto-tls-auditSkill
- viper-csrf-samesite-auditSkill
- viper-dependency-sbomSkill
- viper-deserialization-parserSkill
- viper-diff-pr-reviewSkill
- viper-dns-email-domainSkill
- viper-electron-tauri-desktopSkill
- viper-fastapi-django-flaskSkill
- viper-file-upload-storageSkill
- viper-gcp-azure-cloud-auditSkill
- viper-github-repo-governanceSkill
- viper-go-service-auditSkill
- viper-graphql-wsSkill
- viper-grpc-protobuf-auditSkill
- viper-headers-csp-corsSkill
- viper-iac-terraform-auditSkill
- viper-injection-oracleSkill
- viper-java-spring-auditSkill
- viper-js-harvesterSkill
- viper-kafka-rabbitmq-queueSkill
- viper-linux-systemd-hostSkill
- viper-logging-pii-complianceSkill
- viper-mcp-server-auditSkill
- viper-mobile-api-configSkill
- viper-multitenant-isolationSkill
- viper-nextjs-react-rscSkill
- viper-nginx-envoy-gatewaySkill
- viper-nodejs-express-nestjsSkill
- viper-oauth-oidc-complianceSkill
- viper-openapi-rest-schemaSkill
- viper-orchestratorSkill
- viper-payment-stripe-pciSkill
- viper-php-laravel-wordpressSkill
- viper-postgres-redis-mongoSkill
- viper-privacy-gdpr-hipaaSkill
- viper-proof-judgeSkill
- viper-proxy-fingerprintSkill
- viper-proxy-parser-alignmentSkill
- viper-race-logicSkill
- viper-rag-vector-auditSkill
- viper-rate-limit-dos-resilienceSkill
- viper-remediation-patch-verifierSkill
- viper-ruby-rails-auditSkill
- viper-rust-memory-unsafeSkill
- viper-saml-sso-enterpriseSkill
- viper-sbom-slsa-provenanceSkill
- viper-secrets-auditSkill
- viper-semgrep-rule-authorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 60
Verify exact UTC timestamps across edge proxy, application, and cloud audit logs.
- Very specific: line 89
Verify revoked tokens and rotated keys are immediately rejected (401) in integration tests.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cloud & Application Security Incident Triage & Containment Auditor (viper-incident-forensics-triage)
1. Executive Scope, Standards & CWE/OWASP Mapping
- Frameworks & Standards: NIST SP 800-61 Rev. 3 (Incident Response), Cloud Security Alliance (CSA) Incident Response Guide
- Primary CWE Mapping: CWE-778 (Insufficient Logging), CWE-613 (Insufficient Session Expiration), CWE-798 (Exposed Credentials)
- ViperClaw MCP Tools:
viper_secrets_scan,viper_iac_audit,viper_taint_scan,viper_verify_and_report - ViperClaw CLI Command:
viperclaw secrets . && viperclaw iac . && viperclaw taint .
2. Threat Model & Root-Cause Architecture
flowchart LR
Detect["Alert / Anomaly"] --> Preserve["Preserve Immutable Logs & Snapshots"] --> Contain["Revoke Tokens / Isolate IAM & Sessions"] --> Harden["Root-Cause Patch + Regression Rule"]Root-Cause Analysis
Incident response stalls when teams rotate a leaked key without revoking active sessions/refresh tokens, overwrite volatile logs before capturing evidence, or miss secondary persistence vectors (new IAM users, OAuth app grants, SSH keys, or CI workflow edits).
3. Deterministic Discovery & Grep/AST Audit Commands
# 1. Scan repository for exposed secrets and misconfigured CI/IaC
viperclaw secrets .
viperclaw iac .
# 2. Audit recent high-risk commits across auth, IAM, and CI files
git log --since="14 days ago" --stat -- .github/ terraform/ auth/4. Senior Security Engineer 8-Point Audit Checklist
| Control ID | Audit Verification Target | Pass Criteria | Fail / Vulnerability Indicator |
IR-01 | Evidence Preservation First | CloudTrail, audit logs, container stdout, and DB query logs are exported to immutable storage before remediation alters state. | Hosts terminated or logs overwritten before timeline reconstruction. |
IR-02 | Full Credential & Session Revocation | Rotating a compromised key also invalidates active JWT signing keys, refresh tokens, and OAuth grants. | Old sessions remain valid after password or API key rotation. |
IR-03 | Blast-Radius & Principal Enumeration | Audit all actions by affected IAM roles, service accounts, and API tokens over the full exposure window. | Only the initial alert timestamp is checked without reviewing earlier access. |
IR-04 | Persistence Mechanism Sweep | Verify no unauthorized IAM access keys, GitHub deploy keys, webhooks, or CI workflow triggers were added. | Secondary access key or rogue webhook left active after containment. |
IR-05 | Git History & Artifact Scrubbing | Leaked credentials are rotated immediately (assuming compromise) and blocked via pre-commit secret scanning. | Secret only deleted in a new commit while still valid and present in Git history. |
IR-06 | Root-Cause Code & Config Fix | Underlying vulnerability (taint sink, IAM wildcard, missing auth check) is patched before re-enabling service. | Service restarted without closing the entry vector. |
IR-07 | Detection Rule & Regression Test | New CI guardrail (viperclaw secrets, Semgrep rule, or CloudWatch alarm) prevents recurrence. | Incident closed with manual runbook note only. |
IR-08 | Blameless Postmortem & Timeline | Document exact UTC timeline, affected assets, root cause, and tracked remediation tickets. | Incomplete handoff or unowned follow-up actions. |
5. False-Positive Elimination & CVSS v3.1 Triage Rubric
False-Positive Gate
- Correlate anomalous IPs/principals against authorized CI runners, health checks, and scheduled automation.
- Verify exact UTC timestamps across edge proxy, application, and cloud audit logs.
| Severity Tier | Baseline CVSS v3.1 Vector | Qualifying Security Impact |
| CRITICAL (9.8) | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | Active compromise of production cloud IAM credentials, signing keys, or customer database. |
| HIGH (7.5) | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | Confirmed exposure of scoped service tokens or non-admin tenant records. |
| MEDIUM (5.3) | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N | Insufficient audit logging preventing timeline reconstruction. |
6. Production Remediation Patterns (Vulnerable vs. Hardened Code)
# ✅ HARDENED: Atomic session & refresh-token revocation on security incident / password reset
def revoke_all_user_sessions(user_id: str, db_session) -> None:
db_session.execute(
"UPDATE refresh_tokens SET revoked_at = NOW() WHERE user_id = %s AND revoked_at IS NULL",
(user_id,),
)
db_session.execute(
"UPDATE users SET token_version = token_version + 1 WHERE id = %s",
(user_id,),
)
db_session.commit()7. Regression Testing & Continuous Verification
- Verify revoked tokens and rotated keys are immediately rejected (
401) in integration tests. - Re-run
viperclaw secrets .,viperclaw iac ., andviperclaw taint .to confirm clean posture. - Archive the verified SARIF 2.1.0 report and postmortem checklist.
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.

