trailofbits / trailofbits/claude-code-config
`/trailofbits:config` installs files with WebFetch, which cannot transfer them intact
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 2.1k
- Forks
- 161
- Avg merge
- 3d 59m
- Merged PRs (30d)
- 1
Description
.claude/commands/trailofbits/config.md:5 instructs:
Fetch each file from GitHub using WebFetch.
and :37:
Use WebFetch to download only the files needed for the user's selections from the GitHub URLs above. Extract the raw file content from each response.
WebFetch converts the page to markdown and answers a prompt against it using a small fast model. It's a summarizing reader, not a downloader — there is no guarantee the bytes come back intact. The two files where that matters most are two of the ones it's asked to install:
scripts/statusline.sh— ANSI escape sequences, nested quoting, and ajqprogram using//and@tsvsettings.json— hook commands containing escaped\"inside a shell pipeline inside JSON
Silently corrupting a user's settings.json is about the worst failure mode an installer has available, and README.md:15 makes /trailofbits:config the primary install path for first-time setup.
Suggested fix
Use Bash: curl -fsSL <raw-url> -o <dest>. Or skip the network entirely — the README has already had the user clone the repo, so cp from the working tree. Reserve WebFetch for reading pages, never for transferring files.
Three smaller defects in the same file
- Step 5 self-installs this command file, but it isn't in the fetch list, so no source is defined for its own content — and the path it gets fetched from doesn't exist. This is the root cause of #49: the install tries
commands/trailofbits/config.mdand 404s, because the file actually lives at.claude/commands/trailofbits/config.md. Either move the file or fix the path, and add it to the fetch list. - The fetch list and the component menu both omit
commands/merge-dependabot.md, which the repo ships andREADME.md:548tells you to install. - The menu offers "MCP servers — Context7, Exa, Granola". Granola isn't in
mcp-template.json, so it's an option that can't be fulfilled.
Note that the MCP install step has a separate problem, filed separately: the location it writes to isn't a user-scope MCP config at all.
Found while reviewing the repo against Anthropic's current docs and the installed CLI (2.1.238).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with .claude/commands/trailofbits/config.md, then compare its fetch list and component menu with README.md, including the referenced install paths. Check the listed files and settings.json for intact transfer requirements, the command file's actual path, merge-dependabot.md, and the MCP template. Done means the installer references valid repository files, transfers them without content corruption, and offers only available components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100