Source Code Security Patterns

Source Code Security Patterns is a skill for Claude Code from allsmog/blackbox-claude-plugin. It costs 33 tokens per session (557 once invoked), scanned A, original, MIT.

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 Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the blackbox-htb plugin — 17 skills, 11 commands, 9 agents shipped together

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/allsmog/blackbox-claude-plugin/source-code-patterns
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.

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.

Or install blackbox-htb, the plugin that ships this one along with the rest of its 17 skills, 11 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Source Code Security Patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/allsmog/blackbox-claude-plugin/source-code-patterns/github.svg)](https://agentmods.dev/skills/allsmog/blackbox-claude-plugin/source-code-patterns)
Your own site
<a href="https://agentmods.dev/skills/allsmog/blackbox-claude-plugin/source-code-patterns"><img src="https://agentmods.dev/badge/skills/allsmog/blackbox-claude-plugin/source-code-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Source Code Security Patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/allsmog/blackbox-claude-plugin/source-code-patterns"><img src="https://agentmods.dev/badge/skills/allsmog/blackbox-claude-plugin/source-code-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00033 $0.00557
Opus 5.5 $0.00013 $0.00223
Sonnet 5.5 $0.00007 $0.00111
Haiku 4.5 $0.00003 $0.00056

Measured 2mo ago against content hash 676750967f54, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (6 stars, last pushed 8mo ago), licensed MIT. It adds 33 tokens to every session and 557 once invoked, about $0.0001 per session on Opus 5.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

mks

MKS (Metasploit-Kali Server) tool preference guide. Mount in Phase 0/1 alongside the primary skill. Provides URL resolution, REST endpoint patterns, response parsing, error handling, and fallback rules for all MKS-backed Kali tools.

Stickman230/claude-pentest · 54 tokens

pentest

Penetration testing orchestrator that coordinates specialized attack agents. Provides attack indexes, methodology frameworks, and documentation. Execution delegated to specialized agents (SQL Injection, XSS, SSRF, etc.). Use for engagement planning and attack coordination.

Stickman230/claude-pentest · 50 tokens

authenticating

Authentication testing skill - automates signup, login, 2FA bypass, CAPTCHA solving, and bot detection evasion using Playwright MCP. Tests authentication security controls. Includes behavioral biometrics simulation, OTP handling, and automated account creation for security assessments.

Stickman230/claude-pentest · 54 tokens

common-appsec-patterns

Application security testing coordinator for common vulnerability patterns including XSS, injection flaws, and client-side security issues. Orchestrates specialized testing agents to identify and validate common application security weaknesses.

Stickman230/claude-pentest · 42 tokens

web-application-mapping

Comprehensive web application reconnaissance and mapping coordinator that orchestrates passive browsing, active endpoint discovery, attack surface analysis, and headless browser automation for complete application coverage.

Stickman230/claude-pentest · 38 tokens

cve-testing

CVE vulnerability testing coordinator that identifies technology stacks, researches known vulnerabilities, and tests applications for exploitable CVEs using public exploits and proof-of-concept code.

Stickman230/claude-pentest · 36 tokens