/viperclaw:viper-crypto-tls-auditfrom viperclaw
Audits cryptography, key management, and password hashing against OWASP and Trail of Bits standards. Reviews algorithms, IV/nonce handling, CSPRNG usage, and Argon2/bcrypt.
Ships in viperclaw. 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.
None: SKILL.md is the whole skill.
viper-crypto-tls-audit)viper_taint_scan, viper_verify_and_reportviperclaw taint ./src --db .viperclaw/graph.dbflowchart LR
Secret["Plaintext Password / PII / Token"] --> CSPRNG["CSPRNG (secrets / crypto.randomBytes)"] --> Algo["Argon2id / AES-256-GCM / Ed25519"] --> Store[("Authenticated Ciphertext / Hash")]
Cryptographic failures occur when developers use fast general-purpose hashes (SHA-256, MD5) for passwords, unauthenticated encryption modes (AES-ECB, AES-CBC without HMAC—vulnerable to padding oracle decryption), static or reused IVs/nonces in AES-GCM, or non-cryptographic PRNGs (random, Math.random()) for security tokens.
Run the following discovery commands across the target repository before manual code review:
# 1. Automated ViperClaw analysis
viperclaw taint ./src --db .viperclaw/graph.db
# 2. Rapid static pattern discovery (ripgrep)
rg -n "(hashlib\.(md5|sha1)|MD5\.Create|MessageDigest\.getInstance\(.(MD5|SHA-1).\))"
rg -n "(AES\.MODE_ECB|AES\.MODE_CBC|DES|RC4|Blowfish)"
rg -n "(random\.(randint|choice|random)|Math\.random\(|math/rand)"
| Control ID | Audit Verification Target | Pass Criteria | Fail / Vulnerability Indicator |
|---|---|---|---|
CRYP-01 | Memory-Hard Password Hashing (Argon2id) | User passwords hashed with Argon2id (m>=19MiB, t>=2, p=1), bcrypt (cost >= 12), or scrypt. | Passwords hashed with MD5, SHA-1, unsalted SHA-256, or low-iteration PBKDF2. |
CRYP-02 | Authenticated Encryption (AEAD) Only | Symmetric encryption uses AES-256-GCM, ChaCha20-Poly1305, or Fernet / libsodium secretbox. | Unauthenticated AES-ECB (leaks patterns) or raw AES-CBC (vulnerable to PKCS#7 padding oracle). |
CRYP-03 | Unique CSPRNG Nonce / IV Per Encryption | Every AES-GCM or ChaCha20 encryption generates a fresh CSPRNG nonce (os.urandom(12)) prepended to the ciphertext. | Hardcoded/static IV (b'\x00'*12) or counter reuse under the same key (catastrophic key/plaintext recovery in GCM). |
CRYP-04 | CSPRNG for All Security Tokens | Reset tokens, OTPs, salts, and session IDs use secrets (Python), crypto.randomBytes (Node), or crypto/rand (Go). | random.choice(), uuid.uuid1() (MAC + timestamp), or Math.random() used for tokens. |
CRYP-05 | Constant-Time Secret Comparison | MACs, webhook signatures, and API tokens compared via hmac.compare_digest() / crypto.timingSafeEqual(). | Standard == string comparison leaking signature bytes via timing side channels. |
CRYP-06 | Asymmetric Key Lengths & Curve Safety | Ed25519, ECDSA P-256/P-384, or RSA >= 2048-bit with RSA-OAEP (encryption) and RSA-PSS (signatures). | RSA-1024 or legacy PKCS#1 v1.5 encryption padding (Bleichenbacher oracle). |
CRYP-07 | Key Separation & KMS Envelope Encryption | Signing keys and encryption keys are strictly separated (HKDF subkey derivation); master keys reside in KMS/HSM. | The same raw secret key is used for both JWT signing (HS256) and database field encryption. |
CRYP-08 | TLS 1.2+ & Certificate Verification | Outbound TLS clients verify hostname + certificate chain (CERT_REQUIRED) and enforce TLS 1.2/1.3. | verify=False, NODE_TLS_REJECT_UNAUTHORIZED=0, or InsecureSkipVerify: true enabled. |
| Severity Tier | Baseline CVSS v3.1 Vector | Qualifying Security Impact |
|---|---|---|
| CRITICAL (9.1) | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N | Predictable PRNG reset tokens, static AES-GCM nonce reuse, or AES-CBC padding oracle compromising confidentiality. |
| HIGH (7.5) | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | Disabled TLS certificate verification (verify=False) or fast unsalted password hashes (MD5/SHA1). |
| MEDIUM (5.3) | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N | Non-constant-time HMAC comparison or shared key material across signing and encryption. |
# ❌ VULNERABLE: Uses random.choices (Mersenne Twister) for OTP & fast SHA-256 for password
otp = "".join(random.choices("0123456789", k=6))
pw_hash = hashlib.sha256(password.encode()).hexdigest()
# ✅ HARDENED: CSPRNG secrets module for OTP & Argon2id for password hashing
import secrets
from argon2 import PasswordHasher
ph = PasswordHasher(time_cost=3, memory_cost=65536, parallelism=4)
otp = f"{secrets.randbelow(1_000_000):06d}"
pw_hash = ph.hash(password)
viperclaw taint and viperclaw verify to confirm zero remaining unmitigated flows in .viperclaw/graph.db.What SKILL.md sets; muted values are Claude Code's defaults
72 skills in this plugin
/viper-agent-skill-supplychainAI Agent Skill, Plugin & MCP Config Supply-Chain Auditor (modeled on NVIDIA SkillSpector & OWASP Agentic Skills Top 10). Audits SKILL.md bundles and MCP JSON configs./viper-ai-llm-guardrailsAI, LLM & MCP Application Security & Guardrails Auditor (OWASP LLM Top 10). Reviews prompt boundaries, RAG data isolation, tool-call authorization, and output sanitization./viper-api-gateway-apigee-kongAPI Gateway, BFF & Rate-Tier Policy Auditor (Kong, AWS API Gateway, Apigee, Envoy Gateway). Reviews JWT authorizers, backend origin lockdown, and route-level quotas.npx claudepluginhub zahidoverflow/viperclaw --plugin viperclawOther plugins' skills for the same job