Skip to content

Commit 7286147

Browse files
tob-scott-aclaude
andcommitted
Address PR #133 review feedback
- Add Rationalizations (Do Not Skip) sections to 5 security skills: trailmark, audit-augmentation, crypto-protocol-diagram, mermaid-to-proverif, graph-evolution - Fix requires-python: diagram.py >= 3.12 (was 3.13), protocol.py >= 3.12 (was 3.11) to match trailmark's actual requirement - Rename diagram/ to diagramming-code/ to match SKILL.md frontmatter name and all cross-skill references; update Codex symlink Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ebbd30f commit 7286147

File tree

12 files changed

+64
-3
lines changed

12 files changed

+64
-3
lines changed

.codex/skills/diagram

Lines changed: 0 additions & 1 deletion
This file was deleted.

.codex/skills/diagramming-code

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../plugins/trailmark/skills/diagramming-code

plugins/trailmark/skills/audit-augmentation/SKILL.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ onto Trailmark code graphs as annotations and subgraphs.
2929
- Building the code graph itself (use the `trailmark` skill)
3030
- Generating diagrams (use the `diagramming-code` skill after augmenting)
3131

32+
## Rationalizations (Do Not Skip)
33+
34+
| Rationalization | Why It's Wrong | Required Action |
35+
|-----------------|----------------|-----------------|
36+
| "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 |
37+
| "Unmatched findings don't matter" | Unmatched findings may indicate parsing gaps or out-of-scope files | Report unmatched count and investigate if high |
38+
| "One severity subgraph is enough" | Different severities need different triage workflows | Query all severity subgraphs, not just `error` |
39+
| "SARIF results speak for themselves" | Findings without graph context lack blast radius and taint reachability | Cross-reference with pre-analysis subgraphs |
40+
| "weAudit and SARIF overlap, pick one" | Human auditors and tools find different things | Import both when available |
41+
| "Tool isn't installed, I'll do it manually" | Manual analysis misses what tooling catches | Install trailmark first |
42+
43+
---
44+
3245
## Installation
3346

3447
**MANDATORY:** If `uv run trailmark` fails, install trailmark first:

plugins/trailmark/skills/crypto-protocol-diagram/SKILL.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ For call graphs, class hierarchies, or module dependency maps, use the
3434
- User wants to formally verify a protocol — use `mermaid-to-proverif` (after generating the diagram)
3535
- Input has no cryptographic protocol semantics (no parties, no message exchange)
3636

37+
## Rationalizations (Do Not Skip)
38+
39+
| Rationalization | Why It's Wrong | Required Action |
40+
|-----------------|----------------|-----------------|
41+
| "The protocol is simple, I can diagram from memory" | Memory-based diagrams miss steps and invert arrows | Read the source or spec systematically |
42+
| "I'll skip the spec path since code exists" | Code may diverge from the spec — both paths catch different bugs | When both exist, run spec workflow first, then annotate code divergences |
43+
| "Crypto annotations are optional decoration" | Without crypto annotations, the diagram is just a message flow — useless for security review | Annotate every cryptographic operation |
44+
| "The abort path is obvious, no need for alt blocks" | Implicit abort handling hides missing error checks | Show every abort/error path with `alt` blocks |
45+
| "I don't need to check the examples first" | The examples define the expected output quality bar | Study the relevant example before working on unfamiliar input |
46+
| "ProVerif/Tamarin models are code, not specs" | Formal models are specifications — they describe intended behavior, not implementation | Use the spec workflow (S1–S5) for `.pv` and `.spthy` files |
47+
3748
---
3849

3950
## Workflow

plugins/trailmark/skills/crypto-protocol-diagram/examples/simple-handshake/protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# /// script
2-
# requires-python = ">=3.11"
2+
# requires-python = ">=3.12"
33
# dependencies = ["cryptography>=42.0"]
44
# ///
55
"""
File renamed without changes.

plugins/trailmark/skills/diagram/references/diagram-types.md renamed to plugins/trailmark/skills/diagramming-code/references/diagram-types.md

File renamed without changes.

plugins/trailmark/skills/diagram/references/mermaid-syntax.md renamed to plugins/trailmark/skills/diagramming-code/references/mermaid-syntax.md

File renamed without changes.

plugins/trailmark/skills/diagram/scripts/diagram.py renamed to plugins/trailmark/skills/diagramming-code/scripts/diagram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# /// script
2-
# requires-python = ">=3.13"
2+
# requires-python = ">=3.12"
33
# dependencies = ["trailmark"]
44
# ///
55
"""Generate Mermaid diagrams from Trailmark code graphs.

plugins/trailmark/skills/graph-evolution/SKILL.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ taint propagation changes, and privilege boundary modifications.
3333
- Diagram generation from a single snapshot (use the `diagramming-code` skill)
3434
- Mutation testing triage (use the `genotoxic` skill)
3535

36+
## Rationalizations (Do Not Skip)
37+
38+
| Rationalization | Why It's Wrong | Required Action |
39+
|-----------------|----------------|-----------------|
40+
| "We just need the structural diff, skip pre-analysis" | Without pre-analysis, you miss taint changes, blast radius growth, and privilege boundary shifts | Run `engine.preanalysis()` on both snapshots |
41+
| "Text diff covers what changed" | Text diffs miss new attack paths, transitive complexity shifts, and subgraph membership changes | Use structural diff to complement text diff |
42+
| "Only added nodes matter" | Removed security functions and shifted privilege boundaries are equally dangerous | Review removals and modifications, not just additions |
43+
| "Low-severity structural changes can be ignored" | INFO-level changes (dead code removal) can mask removed security checks | Classify every change, review removals for replaced functionality |
44+
| "One snapshot's graph is enough for comparison" | Single-snapshot analysis can't detect evolution — you need both before and after | Always build and export both graphs |
45+
| "Tool isn't installed, I'll compare manually" | Manual comparison misses what graph analysis catches | Install trailmark first |
46+
47+
---
48+
3649
## Prerequisites
3750

3851
**trailmark** must be installed. If `uv run trailmark` fails, run:

0 commit comments

Comments
 (0)