/engineering-advanced-skills:threat-detectionfrom engineering-advanced-skills
Scans auth and access logs for brute force, injection, path traversal, admin probing, and request floods with triage guidance. Useful for analyzing suspicious activity after an alert.
Ships in engineering-advanced-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Category: Engineering Domain: Security Operations
The Threat Detection skill provides automated analysis of log files for suspicious patterns including brute force attempts, injection attempts, path traversal, admin path probing and request flooding. It helps security teams triage log data and identify threats before they escalate.
For live monitoring and alert routing use a SIEM; this skill reads one file per run.
Before analyzing logs, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
--file; the subject of detection).--category; focuses the scan).--min-severity; changes which signals surface and any SIEM/CI gate).Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
# Bundled sample: SQLi (plain and URL-encoded), traversal, command injection, XSS,
# admin probes and a brute-force run -> 10 signals, exit 1
python scripts/threat_signal_analyzer.py --file assets/sample_access_log.txt
# Clean traffic (including URL fragments and "--" in queries) -> no signals, exit 0
python scripts/threat_signal_analyzer.py --file assets/sample_clean_log.txt
# Analyze with specific threat category
python scripts/threat_signal_analyzer.py --file access.log --category injection
# JSON output for SIEM integration
python scripts/threat_signal_analyzer.py --file auth.log --format json
# Set minimum severity
python scripts/threat_signal_analyzer.py --file access.log --min-severity high
Exit codes: 0 no critical signal; 1 at least one critical signal (SQL or command
injection); 2 bad input (file missing or unreadable). High-severity signals alone exit 0,
so gate on the JSON summary if you need to fail on them.
Request lines are URL-decoded (twice) before matching, so %27%20OR%20%271%27%3D%271 is
caught as a quoted tautology; evidence keeps the raw line. Brute force and flooding counts
cover the whole file, so for a long log slice it by time window first (for example one hour
with awk '$2 >= "09:00" && $2 < "10:00"') or every busy IP looks like a flood.
Analyzes log files for suspicious activity patterns across multiple threat categories.
| Feature | Description |
|---|---|
| Brute force detection | Counts failed login lines per source IP across the whole file |
| Injection scanning | Detects SQL injection, XSS, command injection in requests |
| Path traversal | Detects ../ sequences, their URL-encoded forms and direct requests for /etc/passwd, /etc/shadow, win.ini |
| Admin probing | Flags requests to admin and sensitive paths such as /admin, /.env and /.git that returned 401, 403 or 404 |
| Rate analysis | Counts requests per source IP across the whole file and flags high volumes |
# Cron job: analyze auth logs every hour
python scripts/threat_signal_analyzer.py --file /var/log/auth.log --format json --min-severity high > /tmp/threat_report.json
# CI/CD: scan application logs on deployment
python scripts/threat_signal_analyzer.py --file app.log --category injection --format json
In Scope:
threat_signal_analyzer.py for SQL injection, XSS, command injection, path traversal, failed authentication and brute force, admin path probing, and request flooding.--category (injection, auth, traversal, probe, rate) and --min-severity, with text or JSON output.references/threat-indicators.md.Out of Scope:
engineering/incident-commander/) and building a security operations program (see engineering/senior-secops/).engineering/secrets-vault-manager/).Important Caveats:
| Category | Signals | Severity |
|---|---|---|
| Brute force | 5+ failed logins from same IP in the file (3-4 is Medium) | High |
| SQL injection | UNION SELECT, OR 1=1, DROP TABLE in requests | Critical |
| XSS | script tags, javascript: URIs, event handlers in input | High |
| Path traversal | ../ sequences, /etc/passwd access attempts | High |
| Command injection | ; cat, ` | nc, $( )`, backticks |
| Admin probing | /admin, /wp-admin, /phpmyadmin access attempts | Medium |
| Rate flooding | More than 500 requests from a single IP in the file (more than 200 is Medium) | High |
| Severity | Immediate Action | Follow-Up |
|---|---|---|
| Critical | Block IP, alert SOC | Incident report, forensics |
| High | Rate limit, monitor | Review access, check damage |
| Medium | Log and monitor | Weekly review |
| Low | Log only | Monthly trend analysis |
Mistake: Blocking every IP that produced a signal. Why it happens: The report says "Block source IP" next to each finding. Instead: Check whether the request succeeded (status code, response size, application logs) and whether the IP belongs to a scanner you run or a shared NAT. Block on confirmed malicious intent, not on one pattern match.
Mistake: Closing an investigation because the analyzer found nothing. Why it happens: No output feels like a clean bill of health. Instead: The rules see common, single-line patterns. Obfuscated payloads, slow brute force spread across IPs and post-login abuse are invisible to it. Correlate with other sources before concluding.
Mistake: Running the analyzer on 30 days of access logs and acting on the flooding and brute-force counts. Why it happens: It is one command. Instead: Counts are per file. Slice by hour or day first so thresholds mean "per window".
| File | Purpose |
|---|---|
scripts/threat_signal_analyzer.py | Log scanner for injection, traversal, auth failures, probes and floods |
assets/sample_access_log.txt | Hostile sample: 10 signals across six categories (exit 1) |
assets/sample_clean_log.txt | Benign traffic, including look-alikes such as # fragments and -- in queries (exit 0) |
references/threat-indicators.md | Attack categories, log formats, scanner indicators and response playbook |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub borghei/claude-skills --plugin engineering-advanced-skills100 skills in this plugin
/a11y-auditStatic WCAG scan of HTML files (alt text, headings, labels, ARIA, lang, landmarks) and colour contrast checks for colour pairs or CSS. Use when auditing templates for accessibility, checking contrast, or adding an a11y gate to CI.
/agent-designerDesigns multi-agent system architectures with orchestration patterns, tool schemas, and performance evaluation. Use when building AI agent systems, designing agent workflows, creating tool schemas, or evaluating agent performance.
/agent-harnessTest and evaluation harness for AI agents — scenario suites, deterministic replay, regression diffing, cost and latency budgets. Use when agent quality is vibe-checked, before shipping a prompt or model change, or when evals drift.
Other plugins' skills for the same job