Should Jupyter provide maintained notebook output sanitization / DLP tooling?
- Dominant language
- Jupyter Notebook
- Stars
- 27
- Forks
- 12
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 3
Description
## Problem
Jupyter notebooks can persist sensitive data in ways that are easy to miss before sharing, exporting, or committing a notebook.
A notebook is not only source code. It can contain code cells, markdown, stream output, rich MIME output, HTML tables, JSON payloads, images, attachments, and execution metadata. This means API keys, cloud credentials, PII, PHI, financial records, customer rows, or internal identifiers can be stored directly inside `.ipynb` files and then shared through Git, JupyterHub, exports, object storage, or published examples.
Jupyter already has important security mechanisms for notebook trust and HTML/JavaScript sanitization, and nbconvert supports clearing/removing outputs. However, I could not find a maintained Jupyter-native workflow for detecting and reviewing sensitive data in notebook contents before sharing/exporting/committing.
## Prior work / related tools
- `protectai/nbdefense` provides a CLI/SDK for scanning notebooks for secrets, PII, CVEs, and licenses.
- `protectai/nbdefense-jupyter` provides a JupyterLab extension on top of NB Defense.
- `nbstripout` is widely used to strip outputs and metadata, including as a git filter/pre-commit style workflow, but it does not classify findings or support review/redaction decisions.
- `nbconvert` has preprocessors such as `ClearOutputPreprocessor`, `TagRemovePreprocessor`, and `RegexRemovePreprocessor`, and JupyterLab exposes an HTML export sanitization option, but these are not DLP/PII/secrets scanners.
- Presidio, detect-secrets, Gitleaks, TruffleHog, etc. provide useful detector engines, but they are not a maintained Jupyter-native notebook review workflow by themselves.
- Related: jupyter/nbformat#299 proposes notebook-level metadata indicating outputs should not be saved.
NB Defense is the closest prior work I found, but it is not maintained under Jupyter. Its JupyterLab extension targets JupyterLab 3 / Python <3.11, while current JupyterLab is 4.x. Protect AI was also acquired by Palo Alto Networks in July 2025, so I am unsure whether the open-source NB Defense stack is still the right community foundation.
## Questions for the Jupyter security community
1. Are Jupyter users, deployments, or organizations currently using NB Defense or another notebook-aware scanner for secrets/PII in notebooks?
2. Is there already a recommended Jupyter workflow for scanning notebook outputs before sharing, exporting, or committing?
3. Would the Jupyter community want a maintained, notebook-native DLP/sanitization tool, or should this remain outside Jupyter as third-party tooling?
4. If this belongs in Jupyter, where should it live?
- `jupyter/security` as a security-maintained tool/discussion?
- a new standalone Jupyter repository?
- a JupyterLab extension?
- an nbconvert preprocessor/plugin?
- documentation only, pointing to external tools?
5. What scope would be acceptable for an initial implementation?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing Jupyter security mechanisms, nbconvert preprocessors, and related jupyter/nbformat#299. Compare NB Defense and the other listed detector tools, then determine whether the community wants a Jupyter-native tool, extension, preprocessor, or documentation workflow. Done means an agreed project location and initial scope, not an implementation yet.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook
- Domain
- security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100