Source Code Security Patterns

A security-review guide for spotting risky code, exposed secrets, unsafe functions, and vulnerable software packages in an application’s source files.

In plain words
What is it for?
It helps inspect backup files and source archives, search for passwords and keys, review Python, PHP, and Node.js code, and identify dangerous database or operating-system calls.
Why use it?
It helps turn a large codebase into a focused list of patterns that may allow attacks such as command injection, code execution, or unauthorized access.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/allsmog/blackbox-claude-plugin/source-code-patterns
Any agent
npx skills add allsmog/blackbox-claude-plugin --skill source-code-patterns
Clone the repo
git clone --depth 1 https://github.com/allsmog/blackbox-claude-plugin

Made for: Claude Code, Codex.

Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 557 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.00557
Opus 5 $0.00016 $0.00279
Sonnet 5 $0.00007 $0.00111
Haiku 4.5 $0.00003 $0.00056

Measured 2d ago against content hash 676750967f54, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Source Code Security Patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

blackbox-htb/skills/source-code-patterns/SKILL.md · 82 lines

What it actually says

Source Code Security Patterns

Discovery Endpoints

Common backup/source locations to check:

  • /download, /backup, /backup.zip
  • /source.zip, /app.zip, /.git/
  • *.bak, *.old files

Dangerous Patterns by Language

Python

Pattern Risk Notes
js2py with user input Critical Check CVE-2024-28397
yaml.load() no Loader Critical Use safe_load
subprocess shell=True High Command injection
render_template_string High SSTI
debug=True in Flask Medium Debugger access
Hardcoded secret_key High Session forgery

PHP

Pattern Risk Notes
system/passthru/shell calls Critical Command injection
include with variable Critical LFI/RFI
unserialize user data Critical Object injection

Node.js

Pattern Risk Notes
spawn/run with user input High Command injection
vm.runIn* functions High Sandbox escape
SQL string concatenation High SQL injection

Search for Secrets

# Passwords and keys
grep -rniE "(password|secret|token|api.?key)\s*[:=]" .

# Database URLs
grep -rniE "(mysql|postgres|mongo)://" .

# Private keys
grep -rnl "PRIVATE KEY" .

# Env files
find . -name ".env*"

Vulnerable Package Versions

Python (check requirements.txt)

  • js2py <= 0.74: Sandbox escape CVE
  • pyyaml < 5.4: Code execution
  • flask < 2.0: Security fixes
  • jinja2 < 2.11.3: Sandbox issues

Node.js (check package.json)

  • lodash < 4.17.21: Prototype pollution
  • serialize-javascript < 3.1.0: RCE

Quick Checklist

  1. Check framework and version
  2. Search for hardcoded secrets
  3. Review package versions for CVEs
  4. Find dangerous function calls
  5. Look for debug mode enabled
  6. Check for SQL string building
  7. Find serialization with user input
  8. Check template injection points
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 82 lines · 33 tokens per session scan A 676750967f54

Subscribe to this mod's changes

Source Code Security Patterns is a skill published in the GitHub repository allsmog/blackbox-claude-plugin (5 stars, last pushed 6mo ago), licensed MIT. It adds 33 tokens to every session and 557 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ctf-osint

Provides open source intelligence techniques for CTF challenges. Use when gathering information from public sources, social media, geolocation, DNS records, username enumeration, reverse image search, Google dorking, Wayback Machine, Tor relays, FEC filings, or identifying unknown data like hashes and coordinates.

ljagiello/ctf-skills · 65 tokens

ctf-malware

Provides malware analysis and network traffic techniques for CTF challenges. Use when analyzing obfuscated scripts, malicious packages, custom crypto protocols, C2 traffic, PE/.NET binaries, RC4/AES encrypted communications, YARA rules, shellcode analysis, memory forensics for malware (Volatility malfind, process…

ljagiello/ctf-skills · 101 tokens

osint-recon

OSINT 开源情报收集知识库 — 四维信息收集模型(服务器→网站→域名→人员),维度四(人员信息)条件触发.

Netw0rkNoob/VulnClaw · 42 tokens

crypto-toolkit

编码解码与加解密工具 — base64/URL/Hex/HTML实体编码解码,MD5/SHA哈希,AES/DES/RSA加解密,JWT解析,Caesar/ROT13密码,栅栏/Vigenere密码,Unicode转义,Morse电码等.

Netw0rkNoob/VulnClaw · 69 tokens

secknowledge-skill

Web+AI 安全测试知识库。融合 WooYun 88,636 案例 + 先知 L1-L4 方法论 + GAARM 150 风险 OWASP Top 10 (LLM/ASI/WSTG)。 TRIGGER when 任务是实战安全测试:渗透测试、漏洞挖掘/利用、红队攻防、安全审计 (SAST/DAST)、 CTF、AI/LLM 安全测试 (Prompt 注入/越狱/MCP/Agent/沙箱逃逸)。用户明确给出测试目标 (URL/代码/模型/Agent 架构) 且意图是"测试/审计/挖漏洞/利用"。 DO NOT trigger: 安全概念讨论("什么是 XSS"、"SQL 注入原理是什么")→ 普通问答 非安全性质的 code…

Netw0rkNoob/VulnClaw · 321 tokens

metabigor

Use when operating the metabigor CLI for OSINT recon and infrastructure mapping without API keys. Covers finding network ranges from an ASN, org, domain, or IP (net); enumerating subdomains from certificate logs (cert); enriching IPs with ports/CVEs via Shodan InternetDB (ip); searching public GitHub code for secrets…

j3ssie/metabigor · 143 tokens