PostHog / PostHog/warlock

expand base64 injection detection beyond code comments

Open
#5 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.