6 Commits

Author SHA1 Message Date
kz-tob 4b1b74b181 Give differential-review a trigger, and name every component in its README (#278)
* Give differential-review a trigger, and name every component in its README

differential-review's description listed what it does and never named a
situation, so it competed on capability wording alone. It now closes with
the triggers its own README already documents — reviewing a PR, commit,
or diff; checking whether a change re-introduces a fixed bug; asking what
else a change could break; finding modified code with no test.

The same plugin's README never mentioned adversarial-modeler, which is
what Phase 5 dispatches for HIGH RISK changes. Checking whether that was
isolated turned up more of it, and the sweep found three kinds of gap:

zeroize-audit's agent table was missing three of its eleven agents —
0-preflight, which gates the entire run, plus 5b-poc-validator and
5c-poc-verifier. All three appear in the phase diagram directly above the
table, which is why they read as present.

constant-time-analysis documents the ct-analyzer CLI end to end and never
says the plugin also ships a skill and a command. entry-point-analyzer
lists phrases that trigger its skill but never names the skill or its
command.

Three more READMEs describe their skill without naming it. That matters
most where the skill name is not the plugin name and a user cannot guess
it: chrome-mcp-troubleshooting and interpreting-culture-index.

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

* Fix review findings and make the README sweep a gate

The two PoC rows I added to zeroize-audit said Phase 4. The diagram three
lines above them, SKILL.md, and workflows/phase-5-poc-validation.md all
say Phase 5, steps 5a and 5b. "Wave 5a" is a label that exists nowhere.
A debugger consulting the table — the artifact this branch designates as
what runs when — would have opened phase-4-poc-generation.md and found no
validation in it. Also corrected the sentence introducing that table,
which still said 10 agents across 8 phases against 11 across 9, and the
Phase 0 diagram line, which still credited the orchestrator for a gate
the new row credits to 0-preflight.

differential-review's README claimed the agent is "dispatched", and named
it bare in a column whose other rows are namespaced. Nothing dispatches
it: the only instruction is prose in SKILL.md, and a bare subagent_type
fails at runtime. Namespaced both, and corrected the five stale line
counts in the same file — reporting.md is 369 lines, not the ~120 the
token-efficiency section budgets for.

Drop the dead `name: trailofbits:<cmd>` key from five command files.
The three newest command files carry no name: at all, #275 namespaced 22
bare invocations, and this branch documents the `/<plugin>:<cmd>` form —
so the key contradicts the docs it sits next to.

Then make the sweep repeatable. Doing this by hand three times found
eight gaps and missed two more, both of the same shape: a workflow ships
under meta.name, not its filename, so a README citing the filename never
writes the name a reader types. The validator now checks that a README
names every skill, agent, command, and workflow its plugin ships, reading
meta.name for workflows. It refuses a run that inspected zero components,
and six self-test assertions hold it to known-bad fixtures.

It found git-cleanup on its first run: ships as /git-cleanup:git-cleanup-analysis,
README cites workflows/analyze-branches.js four times and that name never.
static-analysis had the same gap for codeql-build.

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

* Fix both P2s: the gate was a substring test, and the dispatch was still bare

The README gate ran `name not in text`. That reads as thorough and could
not fail for a large share of what it counted: `draw` was satisfied by
"(draw cards instead)", `semgrep-rule` by the plugin's own name in the
install line, `burp-search` by a `scripts/burp-search.sh` path that is a
different thing, and `audit` by the prose "shared-state struct audit".

Match by kind instead. Commands and workflows are reachable only as
`/<plugin>:<name>`, so require that literal — it is the only string a
user can type. Agents are dispatched by identifier and never typed as
prose, so require an identifier-shaped mention. Skills are genuinely
referred to by bare name, so require only a delimited occurrence, which
is what stops "draws" counting as `draw`.

That surfaced seven real gaps, the four above plus insecure-defaults'
audit-pipeline workflow, mutation-testing's skill, and trailmark's
code-slice-worker. All seven fixed.

adversarial-modeler was still bare at SKILL.md:96. Line 77 was the
decision-tree mention; line 96 is the "Delegate to this agent"
instruction a model actually acts on, so the runtime failure the last
commit claimed to fix survived it. Namespaced, and it now says why.

Also from the review: a per-kind floor, since a single total stays
healthy while skill_files() — 63% of coverage — silently stops matching;
workflow_names anchored to the meta block, because a bare search takes
any earlier `name:` in a comment, and .mjs was invisible; and AGENTS.md
documents the new hard failure. Self-test 88 -> 96, each new rule with a
negative control.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 08:54:12 -04:00
Lixin2026 d5fe2e6a78 feat(codex): add UI metadata for skills (#175)
* feat(codex): add skill UI metadata

* Use official Trail of Bits logo

* fix: resolve code review findings for PR #175

Codex silently drops the icons as authored: its loader
(codex-rs/core-skills resolve_asset_path) requires icon paths
containing '..' to resolve under <plugin_root>/assets/, and the
repo-root .codex/assets location fails that containment check.
Verified empirically via codex app-server plugin/read: every
iconSmall/iconLarge came back null; only brand_color applied.

P1 fixed:
- Vendor trail-of-bits-mark.svg into plugins/<name>/assets/ for
  all 38 plugins with skills and point every openai.yaml at
  ../../assets/trail-of-bits-mark.svg (the supported plugin-level
  shared asset pattern). Icons now resolve for marketplace
  installs too, since nothing escapes the plugin root.
- Drop the .codex/ additions: .codex/skills/gh-cli/agents/
  openai.yaml resolved nowhere (.codex/skills is not a Codex
  discovery root) and PR #173 removes the whole .codex/ tree

P2 fixed:
- Patch-bump all 38 touched plugins in plugin.json and
  marketplace.json so installed clients pick up the metadata

Verified:
- Static check replicating Codex's resolution algorithm: all 73
  yaml files resolve under their plugin assets/ and exist
- Live codex app-server probe: 71/72 loadable skills report
  resolved iconSmall/iconLarge and brand_color #D83A34
  (claude-in-chrome-troubleshooting fails to load on main due to
  a pre-existing 64-char qualified-name limit, fixed by #173's
  rename; zeroize-audit's manifest mcpServers object is likewise
  a pre-existing Codex incompatibility fixed by #173)
- validate_codex_skills.py, validate_plugin_metadata.py, prek all
  pass

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

* fix(codex): use skill-local icon assets

---------

Co-authored-by: Dan Guido <dan@trailofbits.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 12:28:41 -04:00
dm cad5abdc48 Sync skill with claude-code-devcontainer repo (#151)
* sync skill with claude-code-devcontainer repo

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

* devcontainer-setup: apply ruff format and shfmt

The pre-commit hook was failing on these two files in CI: ruff joins
the multi-line f-strings in post_install.py, and shfmt with the repo's
'-i 2 -ci' flags adjusts case-body indentation in install.sh.
No behavior change.

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 20:50:28 -04:00
dm 7e885f5982 Sync devcontainer-setup templates with upstream claude-code-devcontainer (#101)
- Add initializeCommand to create ~/.gitconfig if missing (prevents bind mount failure)
- Add trailofbits/skills-curated marketplace plugin to Dockerfile
- Update SKILL.md to document the new marketplace plugin

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-19 07:55:39 -07:00
Dan Guido f1d166608b Sync devcontainer skill with upstream trailofbits/claude-code-devcontainer (#71)
- Dockerfile: use multi-stage build for uv (ARG actually used now)
- Dockerfile: reorder installs to match upstream (git-delta → uv → fzf)
- devcontainer.json: remove UV_VERSION/FZF_VERSION build args (handled by Dockerfile ARGs)
- .zshrc: sync fzf comment wording

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 06:49:17 -05:00
dm 543816914a Add devcontainer-setup plugin (#26)
* Add devcontainer-setup plugin for Claude Code development environments

Creates pre-configured devcontainers with Claude Code and language-specific
tooling. Supports Python, Node/TypeScript, Rust, and Go projects with
automatic detection and configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add plugin to marketplace list

* Fix the post install command

* Fix YARN installation

* Install fzf from GitHub and add plugin marketplaces

- Install fzf from GitHub releases instead of apt (Ubuntu 24.04's apt
  version lacks shell integration)
- Add Claude plugin marketplace setup for anthropics/skills and
  trailofbits/skills in post_install.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix linting issues in devcontainer-setup plugin

- Use contextlib.suppress instead of try-except-pass (SIM105)
- Fix case statement indentation in install.sh for shfmt

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Exclude /home/vscode from hardcoded path check

Standard devcontainer user path should not be flagged as a
personal hardcoded path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Sync devcontainer-setup with upstream claude-code-devcontainer

Sync resources with https://github.com/trailofbits/claude-code-devcontainer:

- Add Python 3.13 via uv and Node 22 via fnm to base Dockerfile
- Add ast-grep for AST-based code search
- Include network isolation tools (iptables, ipset) by default
- Add Tailscale feature for secure networking
- Add NPM security settings (ignore-scripts, 24-hour release delay)
- Add init: true and updateRemoteUserUID: true to devcontainer.json
- Expand .zshrc with fnm integration, fzf config, and more aliases
- Update post_install.py to print to stderr and add ghostty terminal features
- Integrate delta config into .gitconfig.local
- Move marketplace plugin installation from post_install.py to Dockerfile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Sync devcontainer-setup resources with upstream

Align with https://github.com/trailofbits/claude-code-devcontainer:

- Move PATH env before Claude install
- Remove -p fzf from Oh My Zsh, download fzf shell integration separately
- Add FZF_VERSION arg for shell integration download
- Use uv run --no-project for post_install.py
- Add fzf sourcing to .zshrc
- Add symlink resolution and update command to install.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Address PR review comments and sync with upstream devcontainer

DarkaMaul's review comments:
- Restore SHA256 hash on base image for reproducibility
- Sort apt packages alphabetically within category groups
- Install fzf from GitHub releases (v0.67.0) instead of old apt package
- Remove Tailscale feature (not generic enough for template)

Upstream sync (3 new commits from claude-code-devcontainer):
- Add bubblewrap and socat for Claude Code sandboxing
- Add exec, upgrade, and mount commands to devc CLI
- Mount .devcontainer/ read-only to prevent container escape on rebuild

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Harden devcontainer templates from multi-agent review findings

- Pin uv to 0.10.0 with SHA256 digest (supply chain security)
- Add SYS_ADMIN capability guard to install.sh (prevents defeating
  read-only .devcontainer mount)
- Fix mount filter to use target paths instead of source prefixes
  (was broken when PROJECT_SLUG was substituted)
- Fix temp file leak in extract_mounts_to_file
- Remove claude-yolo alias (unsafe pattern for a template)
- Remove dead POWERLEVEL9K_DISABLE_GITSTATUS and NODE_OPTIONS configs
- Remove unnecessary terminal profile definitions
- Default timezone to UTC instead of America/New_York
- Remove stale Tailscale reference from SKILL.md
- Fix line length violations throughout install.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Restore claude-yolo alias and POWERLEVEL9K_DISABLE_GITSTATUS

The claude-yolo alias is intentional for devcontainer use.
POWERLEVEL9K_DISABLE_GITSTATUS is needed because zsh-in-docker
installs Powerlevel10k, whose gitstatus can be slow in large repos.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Restore NODE_OPTIONS, terminal profiles, and re-clone URL

NODE_OPTIONS 4GB heap is intentional for Claude Code in containers.
Terminal profiles are useful in VS Code dropdown. Re-clone message
needs the full URL to be actionable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Dan Guido <dan@trailofbits.com>
2026-02-10 06:12:28 -05:00