expand base64 injection detection beyond code comments
Open
@sarahxsanders is already working on this.
Since Apr 22, 2026.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
prompt_injection_base64_in_comment detects 100+ character base64 strings inside code comments (//, #, /* */). it's a narrow first pass.
proposal
- add detection for base64 in non-comment contexts: string literals, file body content, YAML/JSON field values, tool outputs; requires careful false-positive management since legitimate base64 is common (JWTs, cryptographic signatures, embedded assets)
- add engine-level decoded-content verification
- add multi-line-split base64 detection
- extend to other encodings: hex, URL-encoded, Unicode escape sequences
- handle prefix-anchor bypass: any non-base64 char between the comment marker and the blob (e.g.
// --base64blob--) defeats the current regex
Contributor guide
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.
Assessment
This issue has not been assessed yet.