Audit AugmentationCAUTION
Trail of Bits skills for security research, vulnerability detection, and audit workflows
Overview
Trail of Bits skills for security research, vulnerability detection, and audit workflows
3b4b772eb485OBSERVED · 2026-10-27Install
Commands as the repository documents them. They are shown, not run.
uv tool install trailmark
uv run trailmark augment {targetDir} --sarif results.sarifuv run trailmark augment {targetDir} --weaudit .vscode/alice.weaudituv run trailmark augment {targetDir} \What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: audit-augmentation
description: >
Augments Trailmark code graphs with external audit findings from SARIF static
analysis results, weAudit annotation files, and version-gated Trailmark 0.4.x
binary-analysis graph exports. Maps findings to graph nodes by
file and line overlap, creates severity-based subgraphs, and enables
cross-referencing findings with pre-analysis data (blast radius, taint, etc.).
Use when projecting SARIF results onto a code graph, overlaying weAudit
annotations, importing binary graph findings, cross-referencing Semgrep,
CodeQL, or binary-analysis findings with call graph data, or visualizing audit
findings in the context of code structure.
---
# Audit Augmentation
Projects findings from external tools (SARIF) and human auditors (weAudit)
onto Trailmark code graphs as annotations and subgraphs. Trailmark 0.4.0+ can
also import an external binary-analysis graph JSON export via
`engine.augment_binary()`.
## When to Use
- Importing Semgrep, CodeQL, or other SARIF-producing tool results into a graph
- Importing weAudit audit annotations into a graph
- Importing binary-analysis graph data into a source graph (Trailmark 0.4.0+)
- Cross-referencing static analysis findings with blast radius or taint data
- Querying which functions have high-severity findings
- Visualizing audit coverage alongside code structure
- Preparing one SARIF or weAudit result for `trailmark-finding-triage`
## When NOT to Use
- Running static analysis tools (use semgrep/codeql directly, then import)
- Building the code graph itself (use the `trailmark` skill)
- Generating diagrams (use the `diagramming-code` skill after augmenting)
## Rationalizations to Reject
| Rationalization | Why It's Wrong | Required Action |
|-----------------|----------------|-----------------|
| "The user only asked about SARIF, skip pre-analysis" | Without pre-analysis, you can't cross-reference findings with blast radius or taint | Always run `engine.preanalysis()` before augmenting |
| "Unmatched findings don't matter" | Unmatched findings may indicate parsing gaps or out-of-scope files | Report unmatched count and investigate if high |
| "One severity subgraph is enough" | Different severities need different triage workflows | Query all severity subgraphs, not just `error` |
| "SARIF results speak for themselves" | Findings without graph context lack blast radius and taint reachability | Cross-reference with pre-analysis subgraphs |
| "weAudit and SARIF overlap, pick one" | Human auditors and tools find different things | Import both when available |
| "Tool isn't installed, I'll do it manually" | Manual analysis misses what tooling catches | Install trailmark first |
---
## Installation
**MANDATORY:** If `uv run trailmark` fails, install trailmark first:
```bash
uv tool install trailmark
# Python snippets: uv run --with trailmark python - (a tool env is not importable)
```
## Version Gate
SARIF and weAudit augmentation are v0.2-safe. Binary graph augmentation is
Trailmark 0.4.0+ only. Before calling `engine.augment_binary()`, check:
```python
if not hasattr(engine, "augment_binary"):
raise RuntimeError("Binary augmentation requires Trailmark >= 0.4.0")
```
On Trailmark 0.5.0+, known links between source functions and imported binary
or external endpoints can also be declared once in `.trailmark/links.toml`
(see the main `trailmark` skill's Repository Links section) instead of being
re-derived per session. Declared external endpoints materialize as
`proxy.external:<symbol>` nodes on every parse.
## Quick Start
### CLI
```bash
# Augment with SARIF
uv run trailmark augment {targetDir} --sarif results.sarif
# Augment with weAudit
uv run trailmark augment {targetDir} --weaudit .vscode/alice.weaudit
# Both at once, output JSON
uv run trailmark augment {targetDir} \
--sarif results.sarif \
--weaudit .vscode/alice.weaudit \
--json
```
Binary graph augmentation is programmatic in Trailmark 0.4.0+; do not invent a
CLI flag if `trailmark augment --help` does not show one.
### Programmatic API
```python
from trailmark.query.api import QueryEngine
engine = QueryEngine.from_directory("{targetDir}", language="auto")
# Run pre-analysis first for cross-referencing
engine.preanalysis()
# Augment with SARIF
result = engine.augment_sarif("results.sarif")
# result: {matched_findings: 12, unmatched_findings: 3, subgraphs_created: [...]}
# Augment with weAudit
result = engine.augment_weaudit(".vscode/alice.weaudit")
# Augment with an external binary graph export (v0.4+)
if hasattr(engine, "augment_binary"):
result = engine.augment_binary("binary_graph.json")
# Query findings
engine.findings() # All findings
engine.subgraph("sarif:error") # High-severity SARIF
engine.subgraph("weaudit:high") # High-severity weAudit
engine.subgraph("sarif:semgrep") # By tool name
engine.annotations_of("function_name") # Per-node lookup
```
If auto-detection is wrong for the target, rerun with an explicit language or
comma-separated list such as `python,rust`.
## Workflow
```
Augmentation Progress:
- [ ] Step 1: Build graph and run pre-analysis
- [ ] Step 2: Locate SARIF/weAudit/binary graph files
- [ ] Step 3: Run augmentation
- [ ] Step 4: Inspect results and subgraphs
- [ ] Step 5: Cross-reference with pre-analysis
```
**Step 1:** Build the graph and run pre-analysis for blast radius and taint
context:
```python
engine = QueryEngine.from_directory("{targetDir}", language="auto")
engine.preanalysis()
```
If auto-detection is wrong for the target, rerun with an explicit language or
comma-separated list such as `python,rust`.
**Step 2:** Locate input files:
- **SARIF**: Usually output by tools like `semgrep --sarif -o results.sarif`
or `codeql database analyze --format=sarif-latest`
- **weAudit**: Stored in `.vscode/<username>.weaudit` within the worksTrust audit
CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (2)
plugins/modern-python/hooks/shims/pip3
plugins/modern-python/hooks/shims/python3
Gates applied: no_behavioural_pass.
3b4b772eb485full audit observations/trust-audit/skill/trailofbits__audit-augmentation.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-27 | 3b4b772eb485 | CAUTION | B | 89 | first audit |
Questions
What does the audit-augmentation — trailofbits/skills skill do?
Trail of Bits skills for security research, vulnerability detection, and audit workflows
Is audit-augmentation — trailofbits/skills safe to install?
With care. The audit graded it B (89/100) and found 2 things worth knowing before you trust this skill, listed below with the exact line each was found on.
What can audit-augmentation — trailofbits/skills access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
What do I need installed to use audit-augmentation — trailofbits/skills?
Its own instructions reference error. Dependencies are pinned to exact versions.
How current is this page?
The grade is for one exact copy of the source (3b4b772eb485), read on 2026-10-27. The repository is watched, and a new audit runs when it changes — this is the first audit.
Add this badge to your README
Shows this page's audit result and links back to it. It updates when the audit does.
[](https://modelsatlas.com/skills/trailofbits/audit-augmentation/)
Not your listing, or something out of date? Claim or update your listing.