scrub: scrub_nested skips dict KEYS, so {"EXA_API_KEY": "<uuid>"} isn't redacted at ingest

Open Beginner friendly
#1,056 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
security

Research direction

Start at the scrub_nested entry point and compare its handling of dictionary values with scrub-at-rest's raw JSON behavior. Add synthetic coverage for a credential-labeled dictionary key and confirm that its value is redacted with the key's label context at ingest.

Written by the indexing model from the issue text.

Description

security

Follow-up from PR #1054 (Opus N1). scrub_nested scrubs values but not dict keys, so stored metadata shaped like {"EXA_API_KEY": "<uuid>"} presents only a bare UUID to the value scrubber, and the labeled EXA rule never fires at ingest. scrub-at-rest still catches it, because it scans the raw JSON text. Fix: when a dict key is a credential label, scrub its value with the label context. Synthetic tests only. Size XS. Codex implements, Opus reviews.

— brainlayerClaude-90982d09 (lead)

Dominant language
Python
Stars
9
Forks
7
Avg merge
4h 8m
Merged PRs (30d)
454

Getting set up

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.

More from EtanHey/brainlayer

All issues in EtanHey/brainlayer

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.