swapniltamse/claude-security-engineer

cryptographic-failures

Checks for weak or missing encryption before any code handling passwords, tokens, PII, or sensitive data is written or modified.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/swapniltamse/claude-security-engineer --skill cryptographic-failures

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Cryptographic Failures Skill

Cryptographic failures happen when sensitive data is exposed because it was stored or transmitted without adequate protection. An agent generating data persistence or transmission code defaults to what works, not what is safe. MD5 works. SHA1 works. Storing passwords in plaintext works. None of them are acceptable.

What to Check Before Writing Crypto-Adjacent Code

1. Passwords Must be stored using an adaptive hashing algorithm: bcrypt, scrypt, Argon2, or PBKDF2. MD5, SHA1, SHA256, and SHA512 are not password hashing algorithms. If the code stores a password, the hash function must be one of the four above.

2. Sensitive data at rest PII, financial data, health records, and API keys must be encrypted at rest. "Stored in the database" is not the same as "encrypted." Check whether the column, file, or object is encrypted. If the ORM or storage layer does not handle it, application-level encryption is required.

3. Sensitive data in transit All transmission of sensitive data must use TLS 1.2 or higher. HTTP endpoints that accept credentials, tokens, or PII are a block condition.

4. Weak algorithms Flag and block use of: MD5, SHA1, DES, 3DES, RC4, ECB mode for block ciphers. These are broken or deprecated for security use.

5. Hardcoded secrets API keys, passwords, encryption keys, or tokens hardcoded in source code are a block condition. Secrets belong in environment variables or a secrets manager, not in code.

Output Format

## Cryptographic Failures Check

**Data type handled:** [passwords / PII / tokens / financial / other]
**Storage method:** [database column / file / object store / in-memory only]
**Transmission method:** [HTTPS / HTTP / internal only]

### Findings
- Password hashing algorithm: [algorithm name or "not applicable"]
- Encryption at rest: [yes / no / not applicable]
- Transport security: [TLS version or "HTTP — BLOCKED"]
- Weak algorithms detected: [list or "none"]
- Hardcoded secrets detected: [yes / no]

### Verdict
[CLEAR / BLOCKED — list each block condition]

Hard Stops

Block and require resolution before writing code if:

  • Password storage uses MD5, SHA1, SHA256, SHA512, or plain text
  • Sensitive data is transmitted over HTTP
  • A hardcoded secret, key, or credential appears in the code
  • ECB mode is used for block cipher encryption
  • A deprecated algorithm (DES, 3DES, RC4) is used for any security purpose

What Good Looks Like

python
# Good: Argon2 for password hashing
from argon2 import PasswordHasher
ph = PasswordHasher()
hashed = ph.hash(user_password)

# Good: secrets from environment
import os
api_key = os.environ["THIRD_PARTY_API_KEY"]
python
# Bad: SHA256 for password storage
import hashlib
hashed = hashlib.sha256(password.encode()).hexdigest()

# Bad: hardcoded secret
API_KEY = "sk-live-abc123def456"

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills