crypto-secrets
БесплатноЗапускает вложенные скриптыНе проверенAudit application source code and configuration for cryptography and secrets hygiene issues: hardcoded API keys, committed .env files, private keys, weak…
от superagent-ai★ 82 звезды на GitHubОб этом скилле
Cryptography and Secrets Hygiene
This skill turns the model into an application security auditor for one question: can this code leak secrets or rely on broken cryptography? It reads files on disk, runs an offline scanner, then adds the judgment regex cannot: exploitability, false-positive suppression, and framework-correct remediations.
The scanner is the first pass, not the verdict. Treat its findings as anchored candidates and confirm them against surrounding code before reporting.
How it works: two stages
- Stage 1 — the scanner (deterministic, mechanical).
scripts/scan.pywalks the target, skips dependency/build directories, and flags unambiguous weak crypto, unsafe TLS/JWT patterns, and secret signatures. It is pure Python standard library: nopip install, no network, no credential validation, no target-code execution. It emitsfile:line, redacted evidence, markdown or JSON, and exits1when P0/P1 findings are present. - Stage 2 — you (semantic, judgment). Read each flagged file and nearby callsites. Decide if a secret is live or synthetic, whether MD5 is a checksum or password hashing, whether TLS verification is disabled only in a test harness, and what rotation or code change is required. Catch judgment-only issues the scanner misses, such as a weak key-management design spread across files.
Mental model
Risk is secret exposure × cryptographic consequence.
- Secret exposure — where the value lives and who can read it: committed production key, client-side bundle, log output, test fixture, local example, or runtime-only environment.
- Cryptographic consequence — what the flaw enables: credential reuse, token forgery, plaintext recovery, session prediction, downgrade, or deserialization code execution.
The same pattern can move between P0 and Informational depending on these axes. State the evidence and assumptions when scoring.
Workflow
Phase 1 — Discover and scan
Run the scanner over the requested target:
python3 scripts/scan.py <target-dir-or-file> --format markdown
Useful options:
python3 scripts/scan.py <target> --format json
python3 scripts/scan.py <target> --severity P0,P1
python3 scripts/scan.py <target> --include-secrets --no-crypto
python3 scripts/scan.py <target> --include-crypto --no-secrets
It scans common application source, config, docs, env, key, certificate, and container/deployment files while skipping dependency and generated directories.
Phase 2 — Confirm by category
Use the catalogs in references/crypto-checklist.yaml and references/secrets-patterns.yaml while reading surrounding code:
- Secrets exposure — API keys, cloud credentials, OAuth/Bearer tokens, Slack/GitHub/Stripe tokens, database URLs, webhook URLs, PEM private keys, passwords in config, committed
.envfiles. - Weak algorithms — MD5/SHA1 for passwords or security decisions, DES/3DES/RC4/Blowfish, AES-ECB, CBC/CTR without visible authentication.
- Randomness —
Math.random(),random.random(),rand(),java.util.Random, or timestamp-derived tokens used for secrets/session IDs. - KDF and password hashing — single-round hashes, low PBKDF2 iterations, missing salt, custom password hashing instead of Argon2id/bcrypt/scrypt/PBKDF2 with modern parameters.
- TLS and certificates — disabled verification, old TLS/SSL versions, self-signed production certs, weak certificate key sizes.
- JWT and token handling —
alg: none, algorithm confusion, missingexp, weak/hardcoded signing secrets. - Key management — hardcoded encryption keys/IVs/nonces, private keys in repo, secrets logged or thrown in errors, no rotation path.
- Serialization — unsafe
pickle,yaml.load,ObjectInputStream,eval,exec, or dynamicFunctionon untrusted input.
Phase 3 — Report and remediate
For every confirmed finding, produce:
- Severity (P0-P3 or Informational; read
references/severity-rubric.mdwhen scoring) - Category and stable rule id
file:linewith redacted evidence for secrets- Current code — verbatim except secrets are redacted
- Fixed code — a concrete secure rewrite, not just "use a vault"
- Rationale — the exploit path in one or two sentences
- Effort — Quick Fix / Moderate / Complex
- Rotation required — yes/no for any exposed credential or private key
Assemble full reports with references/report-template.md. Default save path: ./crypto-secrets-audit-report-<timestamp>.md.
Finding format
When reporting inline, group by severity with P0 first:
[P0] secret-aws-access-key in services/payments/config.py:12
A high-confidence AWS access key is committed in application config. Anyone
with repo access can reuse it until rotation.
Current:
AWS_ACCESS_KEY_ID = "AKIA****XYZ"
Fix:
AWS_ACCESS_KEY_ID = os.environ["AWS_ACCESS_KEY_ID"]
# Rotate the exposed IAM access key and remove it from git history.
Rationale: Committed cloud
Установить crypto-secrets в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл crypto-secrets?
Audit application source code and configuration for cryptography and secrets hygiene issues: hardcoded API keys, committed .env files, private keys, weak hashes, insecure encryption modes, unsafe randomness, bad KDF/password hashing, JWT signing mistakes, disabled TLS verification, and dangerous serialization. Runs a dependency-free offline scanner for high-recall findings, then the model confirms impact and writes concrete fixes with redacted evidence. Use when reviewing app code that handles encryption, tokens, sessions, certificates, or credentials; when asked to scan for hardcoded secrets, exposed API keys, weak crypto, AES-ECB/CBC misuse, MD5/SHA1 password hashing, insecure random tokens, verify=False, InsecureSkipVerify, rejectUnauthorized false, alg none JWTs, or committed private keys. Not for Terraform/Kubernetes-only audits (use infra-security), package install-hook risk (use supply-chain-security), or vetting an agent skill before install (use skill-security).
Как установить скилл crypto-secrets?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл crypto-secrets запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic