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
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:
It is completely missed by
detect-secrets.Expected behavior
It should be detected. BTW, the API key was real, not that simple placeholder.
Versions
detect-secretsversion: 1.5.0