source-analyzer

An agent that reviews discovered application source code for security problems. It can inspect archives and common Python, Node.js, and PHP project files for secrets, risky code, database connection strings, and package issues.

In plain words
What is it for?
Use it to unpack source archives, identify the application type, search for hardcoded secrets and private keys, and inspect dangerous patterns or dependencies.
Why use it?
It helps find vulnerabilities and exposed credentials in code that was discovered during security testing.

Agent

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

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 agents/allsmog/blackbox-claude-plugin/source-analyzer
Clone the repo
git clone --depth 1 https://github.com/allsmog/blackbox-claude-plugin

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

Per session 67 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,013 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.00067 $0.01013
Opus 5 $0.00034 $0.00507
Sonnet 5 $0.00013 $0.00203
Haiku 4.5 $0.00007 $0.00101

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

Security

Grade A, and why

source-analyzer 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/agents/source-analyzer.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Source Code Analyzer Agent

Purpose

Analyzes discovered source code for security vulnerabilities, hardcoded credentials, dangerous function usage, and vulnerable package versions.

Analysis Workflow

Step 1: Extract Archives

mkdir -p source_analysis
unzip <FILE>.zip -d source_analysis/ 2>/dev/null
tar -xzf <FILE>.tar.gz -C source_analysis/ 2>/dev/null

Step 2: Identify Application Type

# Python
ls source_analysis/requirements.txt source_analysis/setup.py 2>/dev/null
# Node.js
ls source_analysis/package.json 2>/dev/null
# PHP
ls source_analysis/composer.json 2>/dev/null

Step 3: Scan for Hardcoded Secrets

# API keys, passwords, secrets
grep -rniE "(api[_-]?key|secret[_-]?key|password|passwd|token)" source_analysis/ --include="*.py" --include="*.js" --include="*.php" --include="*.env" 2>/dev/null | head -50

# Database connection strings
grep -rniE "(mysql|postgres|mongodb|redis|sqlite)://" source_analysis/ 2>/dev/null

# Private keys
grep -rnl "BEGIN.*PRIVATE KEY" source_analysis/ 2>/dev/null

# Env files
find source_analysis/ -name ".env*" 2>/dev/null

Step 4: Check for Dangerous Patterns

Python - Search for risky functions
# Command execution
grep -rniE "subprocess\.|os\.system|os\.popen" source_analysis/ --include="*.py"

# Serialization issues
grep -rniE "\.loads\(|yaml\.load\(" source_analysis/ --include="*.py"

# SQL patterns
grep -rniE "\.execute\(f|\.execute\(.*%" source_analysis/ --include="*.py"

# Template injection
grep -rniE "render_template_string|jinja2\.Template" source_analysis/ --include="*.py"

# JS sandbox libs (check version for CVEs)
grep -rniE "js2py|PyV8" source_analysis/ --include="*.py"

# Debug mode enabled
grep -rniE "debug\s*=\s*True" source_analysis/ --include="*.py"
PHP - Search for risky functions
grep -rniE "system\s*\(|passthru\s*\(|shell_exec" source_analysis/ --include="*.php"
grep -rniE "include\s*\(.*\\\$|require\s*\(.*\\\$" source_analysis/ --include="*.php"

Read the full file on GitHub · 123 lines

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 · 123 lines · 67 tokens per session scan A 0aece593b404

Subscribe to this mod's changes

source-analyzer is an agent published in the GitHub repository allsmog/blackbox-claude-plugin (5 stars, last pushed 6mo ago), licensed MIT. It adds 67 tokens to every session and 1,013 once invoked, about $0.0003 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 agents, from other repositories

redteam-agent

Red Team penetration testing agent for HTB Expressway. Use when the user wants to attack or pentest the target machine. Executes reconnaissance, enumeration, exploitation, and privilege escalation. ALWAYS shows attack plan first before executing.

waybarrios/cyber-agent · 48 tokens

report-agent

Security report writer agent. Use after the Red Team Agent completes an attack to generate professional penetration testing reports in Markdown format following OWASP and PTES standards.

waybarrios/cyber-agent · 34 tokens

osint-collector

Delegates to this agent when the user asks about OSINT, reconnaissance, information gathering, target profiling, email harvesting, subdomain enumeration, social media recon, breach data, open source intelligence, or building a target dossier for authorized engagements.

0xSteph/pentest-ai-agents · 53 tokens

vuln-scanner

Delegates to this agent when the user wants to run vulnerability scans, identify CVEs in target systems, use tools like nuclei, nikto, or OpenVAS, parse vulnerability scan results, or prioritize vulnerabilities for exploitation during authorized penetration testing.

0xSteph/pentest-ai-agents · 54 tokens

supply-chain-auditor

Delegates to this agent when the user wants to audit software supply chain risk, generate or review an SBOM, hunt for dependency confusion and typosquatting exposure, inspect lockfile and package integrity, review install-time scripts in third-party packages, assess build and artifact provenance, or evaluate the blast…

0xSteph/pentest-ai-agents · 78 tokens

database-attacker

Delegates to this agent when the user wants database-specific offensive testing on an authorized target — SQL and NoSQL injection depth, authenticated database enumeration, DBMS privilege escalation, and safe data-extraction validation across MySQL, PostgreSQL, MSSQL, Oracle, MongoDB, and Redis. Executes with…

0xSteph/pentest-ai-agents · 71 tokens