New rule: detect suspicious encoded blobs in comments (beyond base64)
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Context
From Vincent's review on PR #12 — the current prompt_injection_base64_in_comment rule only catches base64. Other encoding schemes could also be used to smuggle payloads in comments.
What to catch
- Long hex strings in comments (e.g.,
\x48\x65\x6c\x6c\x6f) - URL-encoded blobs (
%48%65%6C%6C%6F) - Other obfuscation patterns (rot13, unicode escapes, etc.)
Considerations
- High false-positive risk. Legitimate code comments often contain:
- SHA hashes (40+ hex chars)
- JWTs in test fixtures
- UUIDs
- Color codes, memory addresses
- Needs careful threshold tuning per encoding type.
- Better as companion rules (one per encoding type) rather than broadening the existing base64 rule.
Origin
PR #12 review comment by @gewenyu99
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.
Research direction
Review PR #12 and the existing prompt_injection_base64_in_comment rule first. Determine which encoding-specific companion rules are in scope and set thresholds that distinguish encoded payloads from hashes, JWTs, UUIDs, color codes, and memory addresses. Done means the scope and false-positive safeguards are defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100