Files
trailofbits-skills/plugins/static-analysis
Jonathan Hefner debfb29c8e Fix allowed-tools to use spec-compliant space-delimited strings (#139)
* Fix `allowed-tools` to use spec-compliant space-delimited strings

Per the agentskills.io specification, `allowed-tools` must be a single
string of space-delimited patterns, not a YAML list. Converted all 23
SKILL.md files from the `- Item` list format to the correct
`"Item1 Item2"` string format. Also updated the frontmatter examples in
CLAUDE.md and the workflow-skill-design skill template to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix remaining allowed-tools format in firebase-apk-scanner and workflow-skill-design docs

- Convert firebase-apk-scanner from comma-separated to space-delimited
- Update anti-patterns.md and tool-assignment-guide.md examples from YAML lists to space-delimited strings
- Remove unnecessary quotes from SKILL.md template placeholder

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Cover commands, new SKILL.md files, and fix template placeholder

Extends the previous spec-compliance fixes:

* Convert command frontmatter (commands/*.md) — per Claude Code
  docs, command files use the same frontmatter as skills, so the
  same space-delimited rule applies.
* Convert three SKILL.md files added since the original PR:
  mutation-testing, trailmark-structural, trailmark-summary.
* Fix the placeholder in the workflow-skill-design template.
  The previous "[minimum tools needed, space-delimited]" was YAML
  flow-sequence syntax, which parses as a list — the opposite of
  what the placeholder claims. Replaced with a concrete-looking
  space-delimited example plus a comment.

Zeroize-audit agent files still use `allowed-tools:` in YAML list
form. They are intentionally excluded: per the project's own docs
(workflow-skill-design references), agents declare tools with
`tools:` (not `allowed-tools:`). Fixing those requires changing
the field name as well as the format and is out of scope for this
PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* zeroize-audit agents: switch allowed-tools to tools

Subagents declare their tool allowlist via `tools:` (comma-separated),
not `allowed-tools:` — see Claude Code's subagent docs and this
repo's own designing-workflow-skills/SKILL.md:47:

> Skills use `allowed-tools:` in frontmatter. Agents use `tools:`
> in frontmatter.

Before this change, the zeroize-audit agents declared their tool list
under `allowed-tools:`, which Claude Code does not read for subagents.
The field was effectively a no-op; the spawned agents had no tool
restriction enforced.

Renames the field on all 11 agents to `tools:` and reformats the YAML
list as comma-separated to match the documented format and existing
agents elsewhere in the repo (e.g. function-analyzer.md,
spec-compliance-checker.md). Tool sets are unchanged.

Behavior change: tools now actually constrain what each spawned agent
can call. The lists are the ones the original author intended.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* skill-improver: convert command allowed-tools to space-delimited

The two command files in plugins/skill-improver/commands/ still used
the JSON flow-array format (`allowed-tools: ["..."]`), which the rest
of this PR converted everywhere else. Convert them to the spec-compliant
space-delimited string form for consistency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Dan Guido <dan@trailofbits.com>
2026-04-28 19:50:30 -04:00
..
2026-04-01 10:49:33 -04:00
2026-02-26 11:30:21 -05:00

Static Analysis

A comprehensive static analysis toolkit with CodeQL, Semgrep, and SARIF parsing for security vulnerability detection.

CodeQL and Semgrep skills are based on the Trail of Bits Testing Handbook:

Author: Axel Mierczuk & Paweł Płatek

Skills Included

Skill Purpose
codeql Deep security analysis with taint tracking and data flow
semgrep Fast pattern-based security scanning
sarif-parsing Parse and process results from static analysis tools

When to Use

Use this plugin when you need to:

  • Perform security vulnerability detection on codebases
  • Run CodeQL for interprocedural taint tracking and data flow analysis
  • Use Semgrep for fast pattern-based bug detection
  • Parse SARIF output from security scanners
  • Aggregate and deduplicate findings from multiple tools

What It Does

CodeQL

  • Create databases for Python, JavaScript, Go, Java, C/C++, and more
  • Run security queries with SARIF/CSV output
  • Generate data extension models for project-specific APIs
  • Select and combine query packs (security-extended, Trail of Bits, Community)

Semgrep

  • Quick security scans using built-in rulesets (OWASP, CWE, Trail of Bits)
  • Write custom YAML rules with pattern matching
  • Taint mode for tracking data flow from sources to sinks
  • CI/CD integration with baseline scanning

SARIF Parsing

  • Understand SARIF 2.1.0 structure
  • Quick analysis using jq for CLI queries
  • Python scripting with pysarif and sarif-tools
  • Aggregate and deduplicate results from multiple files
  • CI/CD integration patterns

Agents Included

Agent Tools Purpose
semgrep-scanner Bash Executes parallel semgrep scans for a language category
semgrep-triager Read, Grep, Glob, Write Classifies findings as true/false positives by reading source

Installation

/plugin install trailofbits/skills/plugins/static-analysis
  • variant-analysis - Use CodeQL/Semgrep patterns to find bug variants