File size: 47,650 Bytes
2499ad8
53ea111
 
 
 
fd50d15
53ea111
 
 
 
 
 
 
 
 
 
 
 
 
 
fd50d15
53ea111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd50d15
 
 
53ea111
fd50d15
53ea111
 
 
 
 
 
 
 
 
 
 
 
 
 
2499ad8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Ipynb credential check — check your notebook free</title>
<style>
:root{color-scheme:light}body{margin:0;font:15px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif;background:#faf9f5;color:#1a1512}
.wrap{max-width:960px;margin:0 auto;padding:28px 18px 60px}h1{font-size:26px;margin:0 0 6px}.lede{color:#4a403a;margin:0 0 16px}
textarea{width:100%;min-height:260px;font:13px/1.45 ui-monospace,Menlo,Consolas,monospace;padding:12px;border:1px solid #d9d0c4;border-radius:8px;box-sizing:border-box}
.bar{display:flex;gap:10px;align-items:center;margin:12px 0}button{font:600 15px system-ui;padding:10px 18px;border:0;border-radius:8px;background:#1a1512;color:#fff;cursor:pointer}
input[type=date]{font:14px system-ui;padding:8px;border:1px solid #d9d0c4;border-radius:6px}
table{border-collapse:collapse;width:100%;font-size:14px;margin-top:10px}th,td{text-align:left;padding:8px 10px;border-bottom:1px solid #eee;vertical-align:top}th{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#7a6e65}
.sev.error{color:#a8551f;font-weight:700}.sev.warn,.sev.warning{color:#96691f}.ok{color:#2a6446;font-weight:600}.sum{font-weight:600}
.note{font-size:13px;color:#7a6e65;margin-top:18px}#paid{margin-top:22px;padding:14px 16px;border:1px solid #e2d8cb;border-radius:10px;background:#fffdfa}
</style>
<script data-grow-initializer="">!(function(){window.growMe||((window.growMe=function(e){window.growMe._.push(e);}),(window.growMe._=[]));var e=document.createElement("script");(e.type="text/javascript"),(e.src="https://faves.grow.me/main.js"),(e.defer=!0),e.setAttribute("data-grow-faves-site-id","U2l0ZTphZjljMzgyMC0yMmU5LTRhYjgtYTIxNS03OTRhMGY1N2ExYzM=");var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t);})();</script>
<!--yj-canon-s101--><link rel="canonical" href="https://getreadystack.com/tools/notebook-share-gate"></head>
<body>
<div class="wrap">
<h1>Ipynb credential check — check your notebook free</h1>
<p class="lede">Audits saved .ipynb cell outputs for live credentials, customer personal data and internal hostnames before you share, commit or attach the notebook. Runs entirely in your browser — nothing is uploaded.</p>
<textarea id="src" spellcheck="false">{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Q3 churn model — customer extract\nRun top to bottom, then send to the risk team."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "source": [
    "import os, json\n",
    "print(json.dumps({k: v for k, v in os.environ.items() if \"KEY\" in k or \"TOKEN\" in k}, indent=0))\n"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "{'STRIPE_API_KEY': 'sk-live-9f2Hq4RtVbN0pLxZ7mCe31',\n",
      "'AWS_ACCESS_KEY_ID': 'AKIA7Y3QWXZM4RLPB2VD',\n",
      "'GH_BUILD_TOKEN': 'ghp_8sKd02QmNzVxLa91TrYbUw44JhEoPc7Mi3Zq'}\n"
     ]
    }
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "source": [
    "password = \"Rh7!kappaNord22\"\n",
    "conn = f\"postgresql://analytics:{password}@db-risk-02.corp:5432/customers\"\n",
    "print(\"connecting -&gt;\", conn)\n"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "connecting -&gt; postgresql://analytics:Rh7!kappaNord22@db-risk-02.corp:5432/customers\n"
     ]
    }
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "source": [
    "df = pd.read_sql(\"select * from customers limit 3\", conn)\n",
    "df.head()\n"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "execution_count": null,
     "metadata": {},
     "data": {
      "text/plain": [
       "        name            contact_email                     iban          card_number\n",
       "0  J. Larsson    jonas.larsson@nordbank.de   DE44500105175407324931   4539 8812 7745 1002\n",
       "1   M. Keller     m.keller@heilbronn-gmbh.de  DE02120300000000202051   5425 2334 3010 9903\n",
       "2    A. Dupont       a.dupont@cabinet-ld.fr   FR7630006000011234567890189   4916 7712 3344 5566\n"
      ]
     }
    }
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "source": [
    "r = requests.post(AUTH, data=creds)\n",
    "print(r.json()[\"access_token\"])\n"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzdmMtcmlzay0wMiIsImV4cCI6MTc5MjM0NTYwMH0.Qm4bTpLx91VsKdEa02NcRwZgYhUoJf7M\n"
     ]
    }
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "source": [
    "score = model.predict(features)\n"
   ],
   "outputs": [
    {
     "output_type": "error",
     "ename": "FileNotFoundError",
     "evalue": "[Errno 2] No such file or directory: '/home/jlarsson/risk/model_v7.pkl'",
     "traceback": [
      "Traceback (most recent call last):",
      "  File \"/home/jlarsson/risk/score.py\", line 41, in &lt;module&gt;",
      "  Retrying against fallback host mlflow-01.internal (10.42.7.18)",
      "FileNotFoundError: [Errno 2] No such file or directory: '/home/jlarsson/risk/model_v7.pkl'"
     ]
    }
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "name": "python",
   "version": "3.12.4"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {
     "a1b2": {
      "model_name": "FloatProgressModel",
      "state": {
       "description": "scoring customers"
      }
     }
    },
    "version_major": 2
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}</textarea>
<div class="bar"><button id="go">Check</button><label>as of <input type="date" id="today"></label></div>
<div id="out" aria-live="polite"></div>
<div id="paid"><strong>Free here:</strong> Audit the notebook you have open and name every leaking output cell, line by line.. <strong>In the editor:</strong> Sweep every .ipynb in the workspace and export the dated audit record you keep on file. — that part asks for a licence key.</div>
<p class="note">Same engine as the VS Code extension, byte for byte.</p>
</div>
<script>var NB_RULES = [
  {
    "id": "aws_access_key_id",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 32 / Art. 33",
    "notify_hours": 72,
    "fine_cap": "EUR 20 million or 4 % of total worldwide annual turnover (GDPR Art. 83(5))",
    "pat": "\\bAKIA[0-9A-Z]{16}\\b",
    "msg": "\"{hit}\" is a live AWS access key id sitting in a saved cell output. Rotate it in IAM, then clear the output before the file leaves this machine."
  },
  {
    "id": "aws_secret_access_key",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 32",
    "pat": "aws_secret_access_key['\"]?\\s*[:=]\\s*['\"]?[A-Za-z0-9/+=]{40}",
    "msg": "A 40-character AWS secret access key was printed into an output cell. Rotate the key pair, then clear the output."
  },
  {
    "id": "openai_style_api_key",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 32",
    "pat": "\\bsk-[A-Za-z0-9_-]{20,}\\b",
    "msg": "\"{hit}\" is an API key of the sk- family printed into an output cell. Revoke it in the provider console, then clear the output."
  },
  {
    "id": "github_token",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 32",
    "pat": "\\bgh[pousr]_[A-Za-z0-9]{30,}\\b",
    "msg": "\"{hit}\" is a GitHub token in a saved output. It grants whatever the token's scopes grant to anyone who opens this .ipynb. Revoke and clear."
  },
  {
    "id": "slack_token",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 32",
    "pat": "\\bxox[abprs]-[A-Za-z0-9-]{10,}\\b",
    "msg": "\"{hit}\" is a Slack token in a saved output. Revoke it in the app's OAuth settings, then clear the output."
  },
  {
    "id": "bearer_jwt",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 32",
    "pat": "\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{5,}",
    "msg": "A JWT was printed into an output cell. Anyone reading the notebook can replay it until it expires. Clear the output and shorten the token lifetime."
  },
  {
    "id": "db_url_with_password",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 32",
    "pat": "\\b(?:postgres(?:ql)?|mysql|mariadb|mongodb(?:\\+srv)?|redis|mssql|clickhouse):\\/\\/[^\\s:@'\"]+:[^\\s@'\"]{3,}@[^\\s'\"]+",
    "msg": "\"{hit}\" is a database URL carrying its password in a saved output. Rotate the database credential and clear the output."
  },
  {
    "id": "private_key_block",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 32",
    "pat": "-----BEGIN (?:RSA |EC |DSA |OPENSSH |PGP )?PRIVATE KEY-----",
    "msg": "A private key block was printed into an output cell. Treat the key as compromised, issue a new one, and clear the output."
  },
  {
    "id": "email_in_output",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 4(1) / Art. 33",
    "pat": "\\b[A-Za-z0-9._%+-]+@(?!example\\.(?:com|org|net)\\b)[A-Za-z0-9.-]+\\.(?!corp\\b|internal\\b|intranet\\b|local\\b|lan\\b)[A-Za-z]{2,}\\b",
    "msg": "\"{hit}\" is an email address held in a saved output — personal data under GDPR Art. 4(1). A notebook shared with it is a disclosure you have 72 hours to report under Art. 33. Clear the output or mask the column."
  },
  {
    "id": "iban_in_output",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 9 / Art. 33",
    "pat": "\\b(?:AT|BE|CH|CZ|DE|DK|ES|FI|FR|GB|IE|IT|LU|NL|NO|PL|PT|SE)[0-9]{2}[ ]?(?:[0-9A-Z]{4}[ ]?){3,7}[0-9A-Z]{1,4}\\b",
    "msg": "\"{hit}\" looks like an IBAN sitting in a saved output. Bank account numbers identify a person directly. Clear the output before the notebook is shared."
  },
  {
    "id": "card_pan_in_output",
    "sev": "error",
    "where": "output",
    "law": "PCI DSS 3.3 / GDPR Art. 33",
    "pat": "\\b(?:4[0-9]{3}|5[1-5][0-9]{2})[ -]?[0-9]{4}[ -]?[0-9]{4}[ -]?[0-9]{4}\\b",
    "msg": "\"{hit}\" has the shape of a full card number in a saved output. PCI DSS 3.3 allows at most the first six and last four digits to be displayed. Clear the output."
  },
  {
    "id": "internal_hostname",
    "sev": "warn",
    "where": "output",
    "law": "NIS2 Art. 21 (risk-management measures)",
    "pat": "\\b[a-z0-9][a-z0-9-]{1,40}\\.(?:internal|intranet|corp|lan|local)\\b",
    "msg": "\"{hit}\" is an internal hostname in a saved output. It maps your private network for whoever reads the notebook. Clear the output."
  },
  {
    "id": "private_ip_in_output",
    "sev": "warn",
    "where": "output",
    "law": "NIS2 Art. 21 (risk-management measures)",
    "pat": "\\b(?:10\\.(?:[0-9]{1,3}\\.){2}[0-9]{1,3}|192\\.168\\.[0-9]{1,3}\\.[0-9]{1,3}|172\\.(?:1[6-9]|2[0-9]|3[01])\\.[0-9]{1,3}\\.[0-9]{1,3})\\b",
    "msg": "\"{hit}\" is a private network address in a saved output. Together with a hostname it is a map of your internal estate. Clear the output."
  },
  {
    "id": "local_user_path",
    "sev": "warn",
    "where": "output",
    "law": "GDPR Art. 4(1)",
    "pat": "(?:\\/(?:home|Users)\\/[A-Za-z0-9._-]{2,}\\/)|(?:[Cc]:\\\\Users\\\\[A-Za-z0-9._-]{2,}\\\\)",
    "msg": "\"{hit}\" is a traceback path carrying a named person's home directory. The employee name travels with the notebook. Clear the output."
  },
  {
    "id": "env_secret_dump",
    "sev": "error",
    "where": "output",
    "law": "GDPR Art. 32",
    "pat": "'[A-Z][A-Z0-9_]{2,}_(?:TOKEN|SECRET|PASSWORD|PASSWD|API_KEY|APIKEY|CREDENTIALS)':\\s*'[^']{4,}'",
    "msg": "\"{hit}\" is an environment variable printed with its value — the classic os.environ dump. Rotate what it names and clear the output."
  },
  {
    "id": "hardcoded_secret_in_source",
    "sev": "warn",
    "where": "source",
    "law": "GDPR Art. 32",
    "pat": "\\b(?:api_key|apikey|password|passwd|secret|token|access_key)\\s*=\\s*[\"'][^\"'\\s]{8,}[\"']",
    "msg": "\"{hit}\" hard-codes a credential in the cell source, so clearing outputs will not remove it. Move it to an environment variable or a .env file that is git-ignored."
  },
  {
    "id": "execution_order_regressed",
    "sev": "warn",
    "where": "struct",
    "pat": "",
    "law": "reproducibility",
    "msg": "Cell execution counts run out of order, so the saved outputs were not produced by a top-to-bottom run. Whoever audits this notebook cannot reproduce the numbers it shows. Restart and run all before sharing."
  },
  {
    "id": "widget_state_saved",
    "sev": "warn",
    "where": "struct",
    "pat": "",
    "law": "GDPR Art. 5(1)(c)",
    "msg": "The notebook carries saved ipywidgets state in its metadata. Widget state keeps a copy of values the visible outputs no longer show. Clear widget state before sharing."
  }
]
;</script>
<script>/* Notebook Share Gate — one brain, used by the VS Code extension and by the free web page.
   Rules live in rules.json; this file only decides what counts as a finding in a .ipynb. */
(function (root) {
  'use strict';

  var RULES = (typeof module !== 'undefined' && module.exports)
    ? require('./rules.json')
    : root.NB_RULES;

  function re(src, flags) {
    return new RegExp(src, flags || 'gi');
  }

  function joinSource(v) {
    if (v == null) return '';
    return Array.isArray(v) ? v.join('') : String(v);
  }

  // Everything a saved output can carry: stream text, text/plain, text/html, tracebacks.
  function outputText(out) {
    var parts = [];
    if (!out || typeof out !== 'object') return '';
    parts.push(joinSource(out.text));
    if (Array.isArray(out.traceback)) parts.push(out.traceback.join('\n'));
    if (out.evalue) parts.push(String(out.evalue));
    var data = out.data;
    if (data && typeof data === 'object') {
      Object.keys(data).forEach(function (mime) {
        if (mime.indexOf('text/') === 0 || mime === 'application/json') {
          parts.push(joinSource(data[mime]));
        }
      });
    }
    return parts.filter(Boolean).join('\n');
  }

  // A hit is reported at the raw file line it sits on, so the editor can jump there.
  function lineOf(rawLines, hit, fallback) {
    if (!hit) return fallback;
    var needles = [hit];
    try { needles.push(JSON.stringify(hit).slice(1, -1)); } catch (e) { /* not encodable */ }
    for (var n = 0; n < needles.length; n++) {
      for (var i = 0; i < rawLines.length; i++) {
        if (rawLines[i].indexOf(needles[n]) !== -1) return i + 1;
      }
    }
    return fallback;
  }

  function cellStartLines(rawLines) {
    var starts = [];
    for (var i = 0; i < rawLines.length; i++) {
      if (rawLines[i].indexOf('"cell_type"') !== -1) starts.push(i + 1);
    }
    return starts;
  }

  function short(s) {
    s = String(s).replace(/\s+/g, ' ').trim();
    return s.length > 48 ? s.slice(0, 24) + '…' + s.slice(-12) : s;
  }

  function check(text, opts) {
    opts = opts || {};
    var raw = String(text == null ? '' : text);
    var rawLines = raw.split(/\r?\n/);
    var findings = [];
    var seen = {};

    function add(rule, hit, line) {
      var key = rule.id + '@' + line;
      if (seen[key]) return;
      seen[key] = 1;
      findings.push({
        check: rule.id,
        sev: rule.sev,
        msg: rule.msg.replace('{hit}', short(hit)),
        line: line
      });
    }

    var nb = null;
    try { nb = JSON.parse(raw); } catch (e) { nb = null; }

    // Segments carry their own kind so a rule only reads the part of the notebook it owns.
    var segs = [];
    if (nb && Array.isArray(nb.cells)) {
      var starts = cellStartLines(rawLines);
      nb.cells.forEach(function (cell, idx) {
        var at = starts[idx] || 1;
        segs.push({ kind: 'source', text: joinSource(cell.source), at: at });
        (cell.outputs || []).forEach(function (out) {
          segs.push({ kind: 'output', text: outputText(out), at: at });
        });
      });
    } else {
      // Not parseable as a notebook: read the whole file rather than report nothing.
      segs.push({ kind: 'output', text: raw, at: 1 });
      segs.push({ kind: 'source', text: raw, at: 1 });
    }

    RULES.forEach(function (rule) {
      if (rule.where === 'struct') return;
      var rx = re(rule.pat);
      segs.forEach(function (seg) {
        if (seg.kind !== rule.where || !seg.text) return;
        rx.lastIndex = 0;
        var m, guard = 0;
        while ((m = rx.exec(seg.text)) !== null && guard++ < 200) {
          add(rule, m[0], lineOf(rawLines, m[0], seg.at));
          if (m.index === rx.lastIndex) rx.lastIndex++;
        }
      });
    });

    if (nb) {
      var order = ruleById('execution_order_regressed');
      if (order && Array.isArray(nb.cells)) {
        var starts2 = cellStartLines(rawLines);
        var high = 0;
        for (var i = 0; i < nb.cells.length; i++) {
          var n = nb.cells[i].execution_count;
          if (typeof n !== 'number') continue;
          if (n < high) { add(order, '', starts2[i] || 1); break; }
          high = n;
        }
      }
      var wid = ruleById('widget_state_saved');
      var w = nb.metadata && nb.metadata.widgets;
      if (wid && w && Object.keys(w).length) {
        add(wid, '', lineOf(rawLines, '"widgets"', 1));
      }
    }

    findings.sort(function (a, b) { return a.line - b.line; });
    return { findings: findings };
  }

  function ruleById(id) {
    for (var i = 0; i < RULES.length; i++) if (RULES[i].id === id) return RULES[i];
    return null;
  }

  var api = { engine: { check: check }, RULES: RULES, RULE_COUNT: RULES.length };
  if (typeof module !== 'undefined' && module.exports) module.exports = api;
  root.NBGATE = api;
}(typeof window !== 'undefined' ? window : this));
</script>
<script>// ⛔뼈대 — kit/scaffold.py 가 찍는다 (s143). findings [{check,sev,msg,line?}] → 글/HTML. 같은 파일이 Node 와 브라우저에서 산다.
'use strict';
function escapeHtml(s) { return String(s == null ? '' : s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;'); }
function summaryLine(res) {
  const f = (res && res.findings) || []; const e = f.filter(function (x) { return String(x.sev || 'error').toLowerCase().startsWith('err'); }).length;
  return f.length ? (f.length + ' finding' + (f.length === 1 ? '' : 's') + ' (' + e + ' error' + (e === 1 ? '' : 's') + ')') : 'Clean — no findings.';
}
function toText(res, label) {
  const f = (res && res.findings) || [];
  const lines = ['== ' + (label || '') + ' — ' + summaryLine(res)];
  f.forEach(function (x) { lines.push('  ' + String(x.sev || 'error').toUpperCase().slice(0, 4) + '  ' + (x.line ? 'L' + x.line + '  ' : '') + (x.check || x.id || '') + '  ' + (x.msg || x.message || '')); });
  return lines.join('\n');
}
function toHtml(res) {
  const f = (res && res.findings) || [];
  if (!f.length) return '<p class="ok">' + escapeHtml(summaryLine(res)) + '</p>';
  const rows = f.map(function (x) { return '<tr><td class="sev ' + escapeHtml(String(x.sev || 'error')) + '">' + escapeHtml(String(x.sev || 'error')) + '</td><td>' + (x.line ? 'L' + escapeHtml(x.line) : '') + '</td><td><code>' + escapeHtml(x.check || x.id || '') + '</code></td><td>' + escapeHtml(x.msg || x.message || '') + '</td></tr>'; }).join('');
  return '<p class="sum">' + escapeHtml(summaryLine(res)) + '</p><table><thead><tr><th>Level</th><th>Line</th><th>Check</th><th>What</th></tr></thead><tbody>' + rows + '</tbody></table>';
}
var NBREPORT = { escapeHtml: escapeHtml, summaryLine: summaryLine, toText: toText, toHtml: toHtml };
if (typeof module !== 'undefined' && module.exports) module.exports = NBREPORT;
else window.NBREPORT = NBREPORT;
</script>
<script>
(function(){
  var src=document.getElementById('src'), out=document.getElementById('out'), go=document.getElementById('go'), today=document.getElementById('today');
  today.value=new Date().toISOString().slice(0,10);
  function run(){ try { var res=window.NBGATE.engine.check(src.value,{today:today.value}); out.innerHTML=window.NBREPORT.toHtml(res); } catch(e){ out.innerHTML='<p class="sev error">Could not run: '+String(e.message||e)+'</p>'; } }
  go.onclick=run; if (src.value.trim()) run();
})();
</script>


<section data-yj-install="free" style="margin:2rem auto 1rem;max-width:46rem;padding:1.25rem 1.25rem;border:1px solid #cfe3d6;border-radius:12px;background:#f6fbf8;font:16px/1.6 system-ui,-apple-system,Segoe UI,sans-serif"><h2 style="margin:0 0 .4rem;font-size:1.2rem">Install free</h2><p style="margin:0 0 .8rem;color:#41505f">Free for the file open in your editor - no key, no limit. The workspace sweep and the report ask for a key.</p><a href="https://www.npmjs.com/package/@readystack/notebook-share-gate" rel="noopener" data-yj-install-door="npm" onclick="try{navigator.sendBeacon('/api/ev',new Blob([JSON.stringify({t:'install',slug:'notebook-share-gate',src:'npm',path:location.pathname})],{type:'application/json'}))}catch(e){}" style="display:inline-block;margin:0 .5rem .5rem 0;padding:.6rem 1rem;border-radius:8px;background:#0f7b3f;color:#fff;text-decoration:none;font-weight:600">npm</a><a href="https://hub.docker.com/r/getreadystack/notebook-share-gate" rel="noopener" data-yj-install-door="docker" onclick="try{navigator.sendBeacon('/api/ev',new Blob([JSON.stringify({t:'install',slug:'notebook-share-gate',src:'docker',path:location.pathname})],{type:'application/json'}))}catch(e){}" style="display:inline-block;margin:0 .5rem .5rem 0;padding:.6rem 1rem;border-radius:8px;background:#0f7b3f;color:#fff;text-decoration:none;font-weight:600">Docker Hub</a><pre style="margin:.5rem 0 0;padding:.6rem .8rem;background:#f3f5f8;border-radius:8px;font-size:.9rem;overflow:auto">npx @readystack/notebook-share-gate &lt;file&gt;
docker run --rm -v &quot;$PWD:/w&quot; getreadystack/notebook-share-gate /w</pre><p style="margin:.6rem 0 0;font-size:.92rem;color:#41505f"><a href="https://getreadystack.com/api/buy/team" rel="nofollow" style="color:#0f7b3f;text-decoration:underline">Team? One key for every ReadyStack linter, 5 seats, $149 once</a></p></section>
<section data-yj-alert="rule" style="margin:1rem auto 1.5rem;max-width:46rem;padding:1.1rem 1.25rem;border:1px solid #d9dee6;border-radius:12px;background:#fbfcfd;font:15px/1.55 system-ui,-apple-system,Segoe UI,sans-serif"><b style="font-size:1.05rem">Get the full rule table as a PDF</b><div style="opacity:.78;margin:.35rem 0 .8rem">All 18 rules Notebook Share Gate checks, each with its source and date, on printable pages you can hand to your team or auditor. We email it now, and once more only if a rule changes. No newsletter.</div><div style="display:flex;gap:8px;flex-wrap:wrap"><input id="yjae" type="email" placeholder="you@example.com" style="flex:1;min-width:210px;padding:11px 13px;border:1px solid rgba(140,150,165,.34);border-radius:8px;background:#fff;color:inherit"><button id="yjab" style="padding:11px 18px;border-radius:8px;border:0;cursor:pointer;background:#0f7b3f;color:#fff;font:600 15px system-ui,sans-serif">Email me the PDF</button></div><div id="yjao" hidden style="margin-top:.6rem;color:#0f7b3f">Sent. It arrives within the hour - check spam too.</div><script>(function(){var b=document.getElementById("yjab"),e=document.getElementById("yjae");if(!b||!e)return;b.addEventListener("click",function(){var v=e.value.trim();if(!/.+@.+\..+/.test(v))return;try{localStorage.setItem("yj_em","1");}catch(_){}fetch(location.origin+"/api/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:v,slug:"notebook-share-gate",lang:"en",source:"rule_table"+((b.closest&&b.closest("section")&&b.closest("section").getAttribute("data-yj-moved"))?"_at_result":"")})}).then(function(r){var o=document.getElementById("yjao");o.hidden=false;if(!r.ok){o.textContent="Could not save - please try again.";}}).catch(function(){var o=document.getElementById("yjao");o.hidden=false;o.textContent="Could not save - please try again.";});});})();</script><script>(function(){var e=document.getElementById("yjae"),s=e&&e.closest?e.closest("section"):null,o=document.getElementById("out");if(!s||!o)return;var d=false;function mv(ev){if(d)return;if(ev&&ev.target&&s.contains(ev.target))return;d=true;var b=o;while(b.parentNode&&b.parentNode!==document.body&&b.parentNode.tagName!=="MAIN"&&b.parentNode.tagName!=="ARTICLE")b=b.parentNode;if(!b.parentNode||b===s||b.contains(s))return;try{b.parentNode.insertBefore(s,b.nextSibling);s.setAttribute("data-yj-moved","1");}catch(_){}}document.addEventListener("input",mv,true);document.addEventListener("change",mv,true);})();</script></section>

<section data-yj-cta="paid" style="margin:3rem auto;max-width:46rem;padding:1.5rem 1.25rem;border:1px solid #d8dee9;border-radius:12px;background:#fbfcfe;font:16px/1.6 system-ui,-apple-system,Segoe UI,sans-serif"><h2 style="margin:0 0 .5rem;font-size:1.25rem">Get the complete version <span class="yj-price">$29</span></h2><p style="margin:.25rem 0 1rem;color:#41505f">This page is the working piece. The full pack has everything below.</p><p style="margin:0 0 1rem;color:#41505f">18 rules that read saved .ipynb outputs — 23 findings in the 6-cell sample notebook, 0 in the cleared one</p><p style="margin:0 0 1rem;color:#5b6b7c;font-size:.94rem">Hand-checking one notebook means reopening every saved output cell; GDPR Art. 83(5) caps the fine for missing one at EUR 20 million or 4 % of total worldwide annual turnover.</p><a href="https://getreadystack.com/api/buy/cl/polar_cl_UD1n6ljLUOrZtnOT9UfRLSi9NjUk6UvFwZB0a0Zgads" rel="nofollow" style="display:inline-block;padding:.7rem 1.3rem;border-radius:8px;background:#1b64f2;color:#fff;text-decoration:none;font-weight:600">Buy the full version — $29</a></section>
<!--yj-share-s101--><div style="margin:28px 0 8px;text-align:center"><button id="yjcp" type="button" style="font:inherit;padding:10px 18px;border:1px solid #8884;border-radius:10px;background:transparent;cursor:pointer">Copy link</button><button id="yjimg" type="button" style="font:inherit;padding:10px 18px;margin-left:8px;border:1px solid #8884;border-radius:10px;background:transparent;cursor:pointer">Save result as image</button></div><script>(function(){var b=document.getElementById("yjimg");if(!b)return;b.addEventListener("click",function(){var o=document.getElementById("out");var txt=(o&&(o.innerText||o.textContent)||"").trim();if(!txt){b.textContent="(no result yet)";setTimeout(function(){b.textContent="Save result as image";},1500);return;}var lines=txt.split(String.fromCharCode(10)).filter(function(x){return x.trim();}).slice(0,10);var W=1200,P=56,c=document.createElement("canvas");c.width=W;var lh=38,H=P*2+70+lines.length*lh+60;c.height=H;var x=c.getContext("2d");x.fillStyle="#1a1512";x.fillRect(0,0,W,H);x.fillStyle="#f3e9d2";x.font="600 34px system-ui,Segoe UI,Arial";var t=(document.title||"").split("|")[0].trim();x.fillText(t.slice(0,54),P,P+34);x.font="22px ui-monospace,Menlo,Consolas,monospace";x.fillStyle="#e8dcc4";for(var i=0;i<lines.length;i++){x.fillText(lines[i].slice(0,88),P,P+70+i*lh+22);}x.font="600 22px system-ui,Segoe UI,Arial";x.fillStyle="#c9a227";var d=location.hostname.replace("www.","");x.fillText(d,W-P-x.measureText(d).width,H-P+6);c.toBlob(function(bl){var u=URL.createObjectURL(bl),a=document.createElement("a");a.href=u;a.download=(t||"result").replace(/[^a-z0-9]+/gi,"-").toLowerCase()+"-"+d+".png";document.body.appendChild(a);a.click();setTimeout(function(){URL.revokeObjectURL(u);a.remove();},2000);},"image/png");});})();</script><script>(function(){var b=document.getElementById("yjcp");if(!b)return;var t=b.textContent;b.addEventListener("click",function(){var u=location.href.split("#")[0];function d(){b.textContent="Link copied";setTimeout(function(){b.textContent=t;},1800);}if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(u).then(d,function(){prompt("",u);});}else{prompt("",u);}});})();</script>
<script data-yj="yj-view-beacon">(function(){try{var p=location.pathname;var k='yjv:'+p;if(sessionStorage.getItem(k))return;sessionStorage.setItem(k,'1');fetch('/api/ev',{method:'POST',keepalive:true,headers:{'Content-Type':'application/json'},body:JSON.stringify({path:p,lang:"en",ref:(document.referrer||''),src:(function(){try{return (new URLSearchParams(location.search).get('ref')||'').replace(/[^a-z_]/g,'').slice(0,12)}catch(e){return ''}})()})}).catch(function(){});}catch(e){}})();</script>

<script data-yj="yj-use-beacon">(function(){try{var o=document.getElementById('out');if(!o)return;var p=location.pathname,k='yju:'+p,sent=false;function fire(){if(sent||sessionStorage.getItem(k))return;if(!(o.textContent||'').replace(/\s+/g,'').length)return;sent=true;sessionStorage.setItem(k,'1');fetch('/api/ev',{method:'POST',keepalive:true,headers:{'Content-Type':'application/json'},body:JSON.stringify({path:p,lang:"en",t:'use',src:(function(){try{return (new URLSearchParams(location.search).get('ref')||'').replace(/[^a-z_]/g,'').slice(0,12)}catch(e){return ''}})()})}).catch(function(){});}var mo=new MutationObserver(function(){fire();if(sent)mo.disconnect();});mo.observe(o,{childList:true,characterData:true,subtree:true});}catch(e){}})();</script><div class="yj-home-find"><div class="yj-lgbar"><a href="/" class="yj-lg on">EN</a><a href="/de/" class="yj-lg">DE</a><a href="/ja/" class="yj-lg">JA</a><a href="/es/" class="yj-lg">ES</a><a href="/pt/" class="yj-lg">PT</a></div><section class="yj-find"><h2>Find a tool</h2><input id="yjq" type="search" autocomplete="off" placeholder="Type a product name, format or task"><div id="yjr"></div></section><style>.yj-lgbar{position:absolute;top:14px;right:18px;display:flex;gap:6px;z-index:60}.yj-lg{font:600 12px/1 system-ui,sans-serif;padding:6px 9px;border-radius:4px;text-decoration:none;color:#8b96a3;border:1px solid rgba(140,150,165,.28)}.yj-lg:hover{color:#e8eaed;border-color:rgba(160,175,195,.6)}.yj-lg.on{color:#0e1116;background:#cfd6de;border-color:#cfd6de}.yj-find{max-width:760px;margin:34px auto 8px;padding:0 20px}.yj-find h2{font:600 20px/1.3 system-ui,sans-serif;margin:0 0 10px}#yjq{width:100%;box-sizing:border-box;padding:13px 15px;font:400 15.5px system-ui,sans-serif;border:1px solid rgba(140,150,165,.34);border-radius:8px;background:rgba(255,255,255,.04);color:inherit}#yjq:focus{outline:none;border-color:#7FD1C4}#yjr{margin-top:10px;display:flex;flex-direction:column;gap:6px}#yjr a{display:flex;justify-content:space-between;gap:12px;padding:11px 14px;border:1px solid rgba(140,150,165,.22);border-radius:6px;text-decoration:none;font:400 14.5px/1.4 system-ui,sans-serif;color:inherit}#yjr a:hover{border-color:#7FD1C4}#yjr .pr{font:600 13px system-ui,sans-serif;color:#5fbf9a;white-space:nowrap}</style><script>(function(){var q=document.getElementById("yjq"),r=document.getElementById("yjr"),D=null;function load(){if(D)return Promise.resolve(D);return fetch("/search-index.json").then(function(x){return x.json();}).then(function(j){D=j;return j;}).catch(function(){D=[];return D;});}function esc(t){return String(t).replace(/[&<>"]/g,function(c){return {"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[c];});}function run(){var v=q.value.trim().toLowerCase();if(v.length<2){r.innerHTML="";return;}load().then(function(j){var w=v.split(/\s+/),o=[];for(var i=0;i<j.length&&o.length<12;i++){var t=j[i].t.toLowerCase();var ok=true;for(var k=0;k<w.length;k++){if(t.indexOf(w[k])<0){ok=false;break;}}if(ok)o.push(j[i]);}r.innerHTML=o.length?o.map(function(x){return "<a href=\""+esc(x.u)+"\">"+"<span>"+esc(x.t)+"</span>"+(x.p?"<span class=\"pr\">$"+x.p+"</span>":"")+"</a>";}).join(""):"";});}q.addEventListener("input",run);q.addEventListener("focus",load);})();</script></div><section data-yj="yj-facts-v1" style="max-width:920px;margin:48px auto 0;padding:0 20px;font-family:system-ui,sans-serif"><style>.yj-article p{font:400 15.5px/1.7 system-ui,sans-serif;color:#26313b;margin:0 0 12px;max-width:72ch}.yj-article h2,.yj-article h3,.yj-article h4{font:600 17px/1.35 system-ui,sans-serif;color:#1b1f24;margin:22px 0 8px}.yj-article table{border-collapse:collapse;margin:10px 0 16px;font:14px/1.45 system-ui,sans-serif}.yj-article th,.yj-article td{border:1px solid #e2e6ea;padding:6px 10px;text-align:left}.yj-article th{background:#f4f6f8}.yj-article pre{background:#0f1720;color:#e6edf3;padding:12px 14px;border-radius:8px;overflow:auto;font:13px/1.5 ui-monospace,Menlo,monospace}.yj-article code{font:13px ui-monospace,Menlo,monospace;background:#f1f3f5;padding:1px 4px;border-radius:3px}.yj-article pre code{background:none;padding:0}.yj-article ul,.yj-article ol{font:15px/1.6 system-ui,sans-serif;color:#26313b}</style><p style="font:400 13px/1.5 system-ui,sans-serif;color:#6b7680;margin:0 0 14px"><time datetime="2026-09-19">Updated 2026-09-19</time> · ReadyStack</p><script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","dateModified":"2026-09-19","author":{"@type":"Organization","name":"ReadyStack"}}</script><h2 style="font:600 21px/1.3 system-ui,sans-serif;margin:0 0 6px;color:#1b1f24">Worked example</h2><p style="font:400 14.5px/1.5 system-ui,sans-serif;margin:0 0 16px;color:#5b6570">Real numbers from this tool, line by line.</p><div class="yj-article"><p><img src="https://getreadystack.com/img/promo/sku133989_result_card.jpg" alt="Notebook Share Gate" loading="lazy" style="max-width:100%;border-radius:6px"></p>
<p>Twenty-three findings rode along in the notebook a Berlin fintech data scientist attached to a risk ticket last Tuesday — 18 rules over one six-cell .ipynb, and every finding sat in a saved output rather than in the code. The code was fine. The code was never the problem.</p>
<p>A .ipynb is not source code. It is source code plus a saved copy of everything the code printed. Open one in a text editor and the JSON has two halves: the cells you wrote, and an outputs array holding the stdout, the rendered dataframe, the error value and every line of the traceback from the last time the cell ran. You stop looking at outputs about four seconds after you read the number you wanted. The file keeps them forever.</p>
<p>In the sample notebook shipped with Notebook Share Gate, the first cell dumps os.environ filtered to keys and tokens. The output holds a live sk- API key, an AWS access key id and a GitHub token, in full. The second cell builds a connection string and prints it to confirm the host — password included. The third calls df.head() on three real customers and saves their email addresses, their IBANs and their full card numbers into the file. The fifth fails, and the traceback names a home directory, an internal ML host and a private network address. That is 23 findings: 16 error, 7 warn, 15 distinct rules out of 18.</p>
<p>The cleared version of the same notebook, same analysis, outputs emptied and the PII columns masked, reports 0.</p>
<p>Six classes of leak live in that output blob. Live credentials. Customer identity. Payment data. Internal estate. Employee identity — a traceback path is a person&#x27;s name. And unreproducible runs, where the execution counts jump from 7 back to 4, meaning the saved numbers were never produced by a top-to-bottom run and the auditor reading them cannot reproduce a single one.</p>
<p>The obvious objection is that a secret scanner already handles this. It does not, and for a structural reason. Scanners and pre-commit hooks read the code in a diff. The notebook keeps what the code printed in a separate JSON array, line-escaped, sometimes base64, and a rule written for a .py file walks straight past it. A chatbot cannot help either: it can only read the file you paste into it, which means pasting the secrets somewhere new.</p>
<p>The clock matters more than the embarrassment. GDPR Art. 33 gives you 72 hours from becoming aware of a personal-data breach to notify the supervisory authority. Art. 83(5) caps the administrative fine for that class of infringement at EUR 20 million or 4 % of total worldwide annual turnover, whichever is higher. A notebook with three customers&#x27; IBANs in it, sent to a colleague outside the team, is a disclosure. The awareness clock starts when someone notices — which is usually when someone else notices.</p>
<p>Notebook Share Gate reads the parts a linter does not open: stream text, text/plain and text/html results, evalue, every traceback line, the cell source, and metadata.widgets, where saved widget state keeps values the visible outputs no longer show. Eighteen rules, each reporting the rule name, the severity and the line in the file, so you can jump to it and clear it.</p>
<p>Free, with no key: audit the notebook you have open. That job finishes. The licensed layer moves to a different axis — scope and the record. It sweeps every .ipynb in the workspace in one pass and exports a dated audit record you keep on file, which is the artefact you want before an auditor asks which notebooks touched customer data.</p>
<p>The same engine.js runs in the browser on the free web page. Paste a notebook, get the same findings, nothing uploaded.</p></div><h2 style="font:600 21px/1.3 system-ui,sans-serif;margin:34px 0 6px;color:#1b1f24">Questions people ask</h2><details style="border-bottom:1px solid #e6e9ed;padding:10px 0"><summary style="cursor:pointer;font:600 15px/1.4 system-ui,sans-serif;color:#1b1f24">What does Notebook Share Gate actually check?</summary><p style="margin:8px 0 2px;font:400 14.5px/1.6 system-ui,sans-serif;color:#33404b">It reads the saved outputs inside a .ipynb file — stream text, text/plain and text/html results, error values and stored tracebacks — plus cell source and notebook metadata. Eighteen rules flag live credentials, customer emails, IBANs, full card numbers, internal hostnames, private addresses, out-of-order execution and saved widget state.</p></details><details style="border-bottom:1px solid #e6e9ed;padding:10px 0"><summary style="cursor:pointer;font:600 15px/1.4 system-ui,sans-serif;color:#1b1f24">Who is this for?</summary><p style="margin:8px 0 2px;font:400 14.5px/1.6 system-ui,sans-serif;color:#33404b">Data scientists and analytics engineers who hand notebooks to other people: attaching an .ipynb to a Jira ticket, pushing it to a shared repo, sending it to a risk or audit team. It is aimed at teams handling customer records in the EU and UK, where a shared output cell is a personal-data disclosure.</p></details><details style="border-bottom:1px solid #e6e9ed;padding:10px 0"><summary style="cursor:pointer;font:600 15px/1.4 system-ui,sans-serif;color:#1b1f24">Why will a free secret scanner not catch this?</summary><p style="margin:8px 0 2px;font:400 14.5px/1.6 system-ui,sans-serif;color:#33404b">Secret scanners and pre-commit hooks read the code in a diff. A notebook keeps what the code printed in a separate JSON output blob, base64 and escaped strings included, and a chatbot cannot read a file you have not pasted into it. This engine walks the notebook structure itself and reports the file line.</p></details><details style="border-bottom:1px solid #e6e9ed;padding:10px 0"><summary style="cursor:pointer;font:600 15px/1.4 system-ui,sans-serif;color:#1b1f24">What is free and what needs a key?</summary><p style="margin:8px 0 2px;font:400 14.5px/1.6 system-ui,sans-serif;color:#33404b">Free and keyless: audit the notebook you have open, with every finding named by rule, severity and line number. That job finishes on its own. The licensed layer changes scope and ownership — it sweeps every .ipynb in the workspace in one pass and exports a dated audit record you keep on file.</p></details><details style="border-bottom:1px solid #e6e9ed;padding:10px 0"><summary style="cursor:pointer;font:600 15px/1.4 system-ui,sans-serif;color:#1b1f24">What does getting this wrong cost?</summary><p style="margin:8px 0 2px;font:400 14.5px/1.6 system-ui,sans-serif;color:#33404b">GDPR Art. 33 gives you 72 hours from becoming aware of a personal-data breach to notify the supervisory authority, and Art. 83(5) caps the administrative fine for this class of infringement at EUR 20 million or 4 % of total worldwide annual turnover, whichever is higher. The extension is $29 once.</p></details><details style="border-bottom:1px solid #e6e9ed;padding:10px 0"><summary style="cursor:pointer;font:600 15px/1.4 system-ui,sans-serif;color:#1b1f24">Why not just ask ChatGPT or another AI chat?</summary><p style="margin:8px 0 2px;font:400 14.5px/1.6 system-ui,sans-serif;color:#33404b">A general AI chat answers from training data with a cutoff date, cannot read your repository and names no rule version. Notebook Share Gate checks the file you open against 18 rules, each naming its legal or official basis, from a rule set dated 2026-09-20, and points at the exact line. For a filing, an audit or a client you need that dated result on your own files.</p></details><script type="application/ld+json" data-yj="yj-faq-ld">{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "What does Notebook Share Gate actually check?", "acceptedAnswer": {"@type": "Answer", "text": "It reads the saved outputs inside a .ipynb file — stream text, text/plain and text/html results, error values and stored tracebacks — plus cell source and notebook metadata. Eighteen rules flag live credentials, customer emails, IBANs, full card numbers, internal hostnames, private addresses, out-of-order execution and saved widget state."}}, {"@type": "Question", "name": "Who is this for?", "acceptedAnswer": {"@type": "Answer", "text": "Data scientists and analytics engineers who hand notebooks to other people: attaching an .ipynb to a Jira ticket, pushing it to a shared repo, sending it to a risk or audit team. It is aimed at teams handling customer records in the EU and UK, where a shared output cell is a personal-data disclosure."}}, {"@type": "Question", "name": "Why will a free secret scanner not catch this?", "acceptedAnswer": {"@type": "Answer", "text": "Secret scanners and pre-commit hooks read the code in a diff. A notebook keeps what the code printed in a separate JSON output blob, base64 and escaped strings included, and a chatbot cannot read a file you have not pasted into it. This engine walks the notebook structure itself and reports the file line."}}, {"@type": "Question", "name": "What is free and what needs a key?", "acceptedAnswer": {"@type": "Answer", "text": "Free and keyless: audit the notebook you have open, with every finding named by rule, severity and line number. That job finishes on its own. The licensed layer changes scope and ownership — it sweeps every .ipynb in the workspace in one pass and exports a dated audit record you keep on file."}}, {"@type": "Question", "name": "What does getting this wrong cost?", "acceptedAnswer": {"@type": "Answer", "text": "GDPR Art. 33 gives you 72 hours from becoming aware of a personal-data breach to notify the supervisory authority, and Art. 83(5) caps the administrative fine for this class of infringement at EUR 20 million or 4 % of total worldwide annual turnover, whichever is higher. The extension is $29 once."}}, {"@type": "Question", "name": "Why not just ask ChatGPT or another AI chat?", "acceptedAnswer": {"@type": "Answer", "text": "A general AI chat answers from training data with a cutoff date, cannot read your repository and names no rule version. Notebook Share Gate checks the file you open against 18 rules, each naming its legal or official basis, from a rule set dated 2026-09-20, and points at the exact line. For a filing, an audit or a client you need that dated result on your own files."}}]}</script><div id="yj-ask" style="margin:36px 0 0;padding:18px 18px 16px;border:1px solid #e2e6ea;border-radius:10px;background:#fbfbfc"><h2 style="font:600 19px/1.3 system-ui,sans-serif;margin:0 0 4px;color:#1b1f24">Ask about this tool</h2><p style="font:400 13.5px/1.5 system-ui,sans-serif;margin:0 0 12px;color:#5b6570">One question, answered by the person who built it. Your email only if you want the answer sent.</p><form onsubmit="return yjAsk(event)" style="display:grid;gap:8px"><textarea name="question" required minlength="10" maxlength="2000" rows="3" placeholder="Your question" style="font:14px/1.5 system-ui,sans-serif;padding:10px;border:1px solid #cfd6dd;border-radius:6px"></textarea><div style="display:flex;gap:8px;flex-wrap:wrap"><input type="email" name="email" placeholder="Email (optional)" style="flex:1;min-width:200px;font:14px system-ui,sans-serif;padding:9px 10px;border:1px solid #cfd6dd;border-radius:6px"><button type="submit" style="font:600 14px system-ui,sans-serif;padding:9px 18px;border:0;border-radius:6px;background:#1b1f24;color:#fff;cursor:pointer">Send</button></div><p id="yj-ask-msg" style="font:13px system-ui,sans-serif;margin:2px 0 0;color:#0a6238;min-height:1em"></p></form><script>function yjAsk(e){e.preventDefault();var f=e.target,m=document.getElementById("yj-ask-msg");m.style.color="#0a6238";fetch(location.origin+"/api/ask",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sku:133989,slug:"notebook-share-gate",lang:"en",question:f.question.value,email:f.email.value,page:location.pathname})}).then(function(r){if(!r.ok)throw 0;m.textContent="Thanks \u2014 noted. Answers land on this page and, if you left an email, in your inbox.";f.question.value="";}).catch(function(){m.style.color="#a8551f";m.textContent="Could not send. Please try again in a minute.";});return false;}</script></div></section><section class="yj-related" style="max-width:920px;margin:56px auto 40px;padding:0 20px"><h2 style="font:600 21px/1.3 system-ui,sans-serif;margin:0 0 6px;color:#1b1f24">Same job, next tool</h2><p style="font:400 14.5px/1.5 system-ui,sans-serif;margin:0 0 20px;color:#5b6570">Free in the browser. The full version is a one-time licence.</p><div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px"><a class="yj-rel-c" href="https://getreadystack.com/tools/dotnet-eol-support-gate"><span class="yj-rel-t">.NET EOL &amp; CRA Support Window Gate</span><span class="yj-rel-p">$29</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/robots-txt-ai-crawler-audit"><span class="yj-rel-t">AI Crawler Rules - robots.txt Audit for AI Search</span><span class="yj-rel-p">$29</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/age-gate-lint"><span class="yj-rel-t">Age Gate Lint — UK Online Safety Act</span><span class="yj-rel-p">$29</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/bulk-sender-lint"><span class="yj-rel-t">Bulk Sender Lint - the Gmail, Yahoo and Outlook.com rules, checked in your mai</span><span class="yj-rel-p">$29</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/cms-0057-api-gate"><span class="yj-rel-t">CMS-0057 API Gate</span><span class="yj-rel-p">$29</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/cargo-publish-gate"><span class="yj-rel-t">Cargo.toml Publish Gate - crates.io</span><span class="yj-rel-p">$29</span></a></div><style>.yj-rel-c{display:flex;flex-direction:column;gap:8px;padding:15px 16px;border:1px solid #e2e6ea;border-radius:6px;text-decoration:none;background:#fff}.yj-rel-c:hover{border-color:#b9c2cb;background:#fafbfc}.yj-rel-t{font:500 14.5px/1.42 system-ui,sans-serif;color:#1b1f24}.yj-rel-p{font:600 13px system-ui,sans-serif;color:#0a6238}</style></section></body>
</html>