Skip to content

Fix false positives from embedded Jupyter images - #1004

Open
arin30 wants to merge 1 commit into
Yelp:masterfrom
arin30:fix/jupyter-image-false-positive-clean
Open

arin30 wants to merge 1 commit into
Yelp:masterfrom
arin30:fix/jupyter-image-false-positive-clean

Conversation

@arin30

@arin30 arin30 commented Oct 20, 2026

Copy link
Copy Markdown

Please check if the PR fulfills these requirements

  • Tests for the changes have been added
  • Docs have been updated
  • All CI checks are green

What kind of change does this PR introduce?

Bug fix.

What is the current behavior?

Base64 image data embedded in a Jupyter notebook can be reported as a Base64 High Entropy String. Because the payload is stored in the notebook JSON, an inline allowlist comment is not practical. Fixes #384.

What is the new behavior?

A default filter ignores high-entropy values when they are image payloads in an .ipynb file, including inline data:image/...;base64 URIs. The filter does not exclude notebooks as a whole, so a high-entropy value in another notebook field is still detected.

Does this PR introduce a breaking change?

No.

Testing

  • python -m pytest tests -q — 1,038 passed, 6 xfailed
  • mypy detect_secrets/filters/heuristic.py detect_secrets/settings.py — passed
  • Added focused filter cases and a scan-level regression test

Ignore base64 image payloads in notebook image fields and inline data URIs while continuing to scan other notebook values. Add unit and scan-level regression coverage.

Fixes Yelp#384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embedded images in Jupyter notebooks trigger false positive Base64 High Entropy

1 participant