Skip to content

Bug: Jupyter notebook entries not properly detected #951

Description

@barseghyanartur

Describe the bug
Jupyter notebook entries not properly detected

To Reproduce
Consider this partial entry:

Filename: entry.ipynb

  {
   "cell_type": "code",
   "id": "4",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2026-02-16T20:04:18.343955Z",
     "start_time": "2026-02-16T20:04:18.335697Z"
    }
   },
   "source": [
    "client = OpenAI(api_key=\"sk-proj-1234TestDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStT1234Test\")\n",
    "\n",
    "MODEL = \"gpt-5.2\""
   ],
   "outputs": [],
   "execution_count": 11
  }

And the following command:

detect-secrets scan --baseline .secrets.baseline

It is completely missed by detect-secrets.

Expected behavior
It should be detected. BTW, the API key was real, not that simple placeholder.

Versions

  • OS: macOS Tahoe 26.3.1 (25D2128)
  • detect-secrets version: 1.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions