ai-secret-scout 2.4.2 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 devredious
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.fr.md CHANGED
@@ -9,10 +9,18 @@
9
9
  ◈ A I S E C R E T S C O U T ◈
10
10
  </pre>
11
11
 
12
- <h2>AI Secret Scout (<code>aiscout</code>) — v2.4.0</h2>
12
+ <h2>AI Secret Scout (<code>aiscout</code>) — v2.4.4</h2>
13
13
 
14
14
  <p align="center">
15
15
  <!-- Ligne 1 : badges techno & plateforme -->
16
+ <a href="https://github.com/DevRedious/ai-secret-scout/actions/workflows/ci.yml"><img src="https://github.com/DevRedious/ai-secret-scout/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
17
+ <a href="https://www.npmjs.com/package/ai-secret-scout"><img src="https://img.shields.io/npm/v/ai-secret-scout?logo=npm&amp;color=CB3837" alt="npm version"></a>
18
+ <a href="https://www.npmjs.com/package/ai-secret-scout"><img src="https://img.shields.io/npm/dm/ai-secret-scout?logo=npm&amp;color=CB3837" alt="npm downloads"></a>
19
+ <a href="https://socket.dev/npm/package/ai-secret-scout"><img src="https://badge.socket.dev/npm/package/ai-secret-scout" alt="Socket Badge"></a>
20
+ <a href="./LICENSE"><img src="https://img.shields.io/npm/l/ai-secret-scout?color=blue" alt="License MIT"></a>
21
+ </p>
22
+
23
+ <p align="center">
16
24
  <img src="https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&amp;logoColor=white" alt="Python 3.10+">
17
25
  <img src="https://img.shields.io/badge/Interface-TUI%20Plein%20%C3%89cran-06B6D4?logo=gnometerminal&amp;logoColor=white" alt="TUI Plein Écran">
18
26
  <img src="https://img.shields.io/badge/D%C3%A9pendances-Zero%20External-22c55e?logo=python&amp;logoColor=white" alt="Zéro Dépendance">
@@ -178,7 +186,7 @@ Le moteur TUI autonome d'`aiscout` (pure bibliothèque standard Python) s'adapte
178
186
  ### 1. Tableau de bord & Menu d'accueil interactif (Hub central)
179
187
 
180
188
  ```text
181
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
189
+ ◈ AISCOUT v2.4.4 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
182
190
 
183
191
  █████╗ ██╗ ███████╗ ██████╗ ██████╗ ██╗ ██╗████████╗
184
192
  ██╔══██╗██║ ██╔════╝██╔════╝██╔═══██╗██║ ██║╚══██╔══╝
@@ -214,7 +222,7 @@ Le moteur TUI autonome d'`aiscout` (pure bibliothèque standard Python) s'adapte
214
222
  La vue tableau permet de parcourir l'intégralité des fuites identifiées avec pagination fluide, tri multi-critères et recherche plein texte instantanée :
215
223
 
216
224
  ```text
217
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
225
+ ◈ AISCOUT v2.4.4 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
218
226
 
219
227
  📋 EXPLORATEUR DE SECRETS (1/21) — Mode : MASQUÉ 🛡️ │ Tri : Sévérité (🔴 > 🟡 > 🔵)
220
228
 
@@ -235,7 +243,7 @@ La vue tableau permet de parcourir l'intégralité des fuites identifiées avec
235
243
  En appuyant sur `/`, une boîte de saisie inline s'ouvre sur la barre inférieure. Le tableau se met à jour en temps réel (filtre instantané sur la catégorie, l'outil, le projet, le fichier ou la valeur du secret) :
236
244
 
237
245
  ```text
238
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
246
+ ◈ AISCOUT v2.4.4 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
239
247
 
240
248
  📋 EXPLORATEUR DE SECRETS (1/3) — Mode : MASQUÉ 🛡️ │ Tri : Sévérité (🔴 > 🟡 > 🔵)
241
249
  🔍 Recherche active : "github" (3 secrets trouvés) │ [Backspace/Esc] Effacer
@@ -255,7 +263,7 @@ En appuyant sur `/`, une boîte de saisie inline s'ouvre sur la barre inférieur
255
263
  En pressant `Entrée` sur une ligne du tableau, une fiche d'audit chirurgicale s'affiche avec le contexte exact d'usage et l'extrait de log :
256
264
 
257
265
  ```text
258
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
266
+ ◈ AISCOUT v2.4.4 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
259
267
 
260
268
  ╭──────────────────────────────────────────────────────────────────────────────────╮
261
269
  │ FICHE D'AUDIT DU SECRET DÉTECTÉ │
@@ -284,7 +292,7 @@ En pressant `Entrée` sur une ligne du tableau, une fiche d'audit chirurgicale s
284
292
  Lors de l'audit initial, du caviardage ou de l'exportation des dossiers d'audit, une animation à 100ms affiche l'étape en cours et la progression :
285
293
 
286
294
  ```text
287
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
295
+ ◈ AISCOUT v2.4.4 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
288
296
 
289
297
  █████╗ ██╗ ███████╗ ██████╗ ██████╗ ██╗ ██╗████████╗
290
298
  ██╔══██╗██║ ██╔════╝██╔════╝██╔═══██╗██║ ██║╚══██╔══╝
@@ -303,7 +311,7 @@ Lors de l'audit initial, du caviardage ou de l'exportation des dossiers d'audit,
303
311
  Veuillez patienter pendant l'analyse...
304
312
  ```
305
313
 
306
- ### 🌟 Points forts du moteur TUI (v2.4.0)
314
+ ### 🌟 Points forts du moteur TUI
307
315
  * **Gestion des flèches & Entrées multiplateforme** : Décodage non bloquant (`msvcrt` sous Windows, `termios`/`tty`/`select` sous POSIX Linux/macOS) avec lookahead 100ms absorbant toutes les séquences d'échappement ANSI (`\x1b[A`, `\x1b[B`, `\x1bOA`, `\x1bOB`, consoles Linux et modificateurs Shift/Ctrl).
308
316
  * **Layout auto-adaptatif (zéro coupure)** :
309
317
  * Barre supérieure clouée à la **ligne 1**.
@@ -320,7 +328,7 @@ Lors de l'audit initial, du caviardage ou de l'exportation des dossiers d'audit,
320
328
  Le mode **Watchdog** transforme `aiscout` en un gardien silencieux en arrière-plan :
321
329
 
322
330
  ```text
323
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:21
331
+ ◈ AISCOUT v2.4.4 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:21
324
332
 
325
333
  📡 SURVEILLANCE EN TEMPS RÉEL (WATCHDOG) │ 🟢 [VEILLE ACTIVE]
326
334
  Détecte les sessions IA en écriture et notifie instantanément sur le bureau (Linux / Windows)
@@ -351,7 +359,7 @@ Le mode **Watchdog** transforme `aiscout` en un gardien silencieux en arrière-p
351
359
  Le menu `[7]` offre un contrôle absolu sur les fichiers de sauvegarde générés lors des opérations de caviardage :
352
360
 
353
361
  ```text
354
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:22
362
+ ◈ AISCOUT v2.4.4 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:22
355
363
 
356
364
  ↩️ GESTIONNAIRE DES SAUVEGARDES & RESTAURATION (.BAK)
357
365
  Restaurer les fichiers originaux avant caviardage ou purger les sauvegardes.
package/README.md CHANGED
@@ -9,10 +9,18 @@
9
9
  ◈ A I S E C R E T S C O U T ◈
10
10
  </pre>
11
11
 
12
- <h2>AI Secret Scout (<code>aiscout</code>) — v2.4.0</h2>
12
+ <h2>AI Secret Scout (<code>aiscout</code>) — v2.4.4</h2>
13
13
 
14
14
  <p align="center">
15
15
  <!-- Row 1: tech & platform badges -->
16
+ <a href="https://github.com/DevRedious/ai-secret-scout/actions/workflows/ci.yml"><img src="https://github.com/DevRedious/ai-secret-scout/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
17
+ <a href="https://www.npmjs.com/package/ai-secret-scout"><img src="https://img.shields.io/npm/v/ai-secret-scout?logo=npm&amp;color=CB3837" alt="npm version"></a>
18
+ <a href="https://www.npmjs.com/package/ai-secret-scout"><img src="https://img.shields.io/npm/dm/ai-secret-scout?logo=npm&amp;color=CB3837" alt="npm downloads"></a>
19
+ <a href="https://socket.dev/npm/package/ai-secret-scout"><img src="https://badge.socket.dev/npm/package/ai-secret-scout" alt="Socket Badge"></a>
20
+ <a href="./LICENSE"><img src="https://img.shields.io/npm/l/ai-secret-scout?color=blue" alt="License MIT"></a>
21
+ </p>
22
+
23
+ <p align="center">
16
24
  <img src="https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&amp;logoColor=white" alt="Python 3.10+">
17
25
  <img src="https://img.shields.io/badge/Interface-Full--Screen%20TUI-06B6D4?logo=gnometerminal&amp;logoColor=white" alt="Full-Screen TUI">
18
26
  <img src="https://img.shields.io/badge/Dependencies-Zero%20External-22c55e?logo=python&amp;logoColor=white" alt="Zero Dependencies">
@@ -178,7 +186,7 @@ The application automatically switches your terminal to an alternate screen buff
178
186
  ### 1. Central Hub & Dashboard
179
187
 
180
188
  ```text
181
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
189
+ ◈ AISCOUT v2.4.4 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
182
190
 
183
191
  █████╗ ██╗ ███████╗ ██████╗ ██████╗ ██╗ ██╗████████╗
184
192
  ██╔══██╗██║ ██╔════╝██╔════╝██╔═══██╗██║ ██║╚══██╔══╝
@@ -214,7 +222,7 @@ The application automatically switches your terminal to an alternate screen buff
214
222
  The interactive table allows fluid inspection of all detected secrets with multi-criteria sorting and instantaneous full-text filtering:
215
223
 
216
224
  ```text
217
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
225
+ ◈ AISCOUT v2.4.4 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
218
226
 
219
227
  📋 SECRET EXPLORER (1/21) — Mode : MASKED 🛡️ │ Sort : Severity (🔴 > 🟡 > 🔵)
220
228
 
@@ -235,7 +243,7 @@ The interactive table allows fluid inspection of all detected secrets with multi
235
243
  Pressing `/` opens an inline prompt directly in the status bar. The table updates dynamically with every keystroke:
236
244
 
237
245
  ```text
238
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
246
+ ◈ AISCOUT v2.4.4 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
239
247
 
240
248
  📋 SECRET EXPLORER (1/3) — Mode : MASKED 🛡️ │ Sort : Severity (🔴 > 🟡 > 🔵)
241
249
  🔍 Active filter: "github" (3 matching secrets) │ [Backspace/Esc] Clear
@@ -255,7 +263,7 @@ Pressing `/` opens an inline prompt directly in the status bar. The table update
255
263
  Pressing `Enter` on any row displays a full diagnostic modal card highlighting the source file, context, and remediation recommendations:
256
264
 
257
265
  ```text
258
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
266
+ ◈ AISCOUT v2.4.4 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
259
267
 
260
268
  ╭──────────────────────────────────────────────────────────────────────────────────╮
261
269
  │ AUDIT CARD FOR DETECTED SECRET │
@@ -284,7 +292,7 @@ Pressing `Enter` on any row displays a full diagnostic modal card highlighting t
284
292
  During scans, redactions, or reports generation, an animated 100ms spinner displays current scan phase and progress percentage:
285
293
 
286
294
  ```text
287
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
295
+ ◈ AISCOUT v2.4.4 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
288
296
 
289
297
  █████╗ ██╗ ███████╗ ██████╗ ██████╗ ██╗ ██╗████████╗
290
298
  ██╔══██╗██║ ██╔════╝██╔════╝██╔═══██╗██║ ██║╚══██╔══╝
@@ -320,7 +328,7 @@ During scans, redactions, or reports generation, an animated 100ms spinner displ
320
328
  The **Watchdog** mode turns `aiscout` into a background sentinel:
321
329
 
322
330
  ```text
323
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:21
331
+ ◈ AISCOUT v2.4.4 │ User : dev_redious │ Host : workstation 12/09/2026 22:21
324
332
 
325
333
  📡 REAL-TIME MONITORING (WATCHDOG) │ 🟢 [ACTIVE SENTINEL]
326
334
  Detects active AI sessions writing to disk and sends instant desktop alerts
@@ -351,7 +359,7 @@ The **Watchdog** mode turns `aiscout` into a background sentinel:
351
359
  TUI Menu `[7]` provides complete control over backup files created prior to sanitization:
352
360
 
353
361
  ```text
354
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:22
362
+ ◈ AISCOUT v2.4.4 │ User : dev_redious │ Host : workstation 12/09/2026 22:22
355
363
 
356
364
  ↩️ SAFE RESTORE & BACKUP MANAGER (.BAK)
357
365
  Restore original files before redaction or purge stale backup copies.
@@ -41,7 +41,7 @@ else:
41
41
  import termios
42
42
  import tty
43
43
 
44
- VERSION = "2.4.2"
44
+ VERSION = "2.4.4"
45
45
 
46
46
  # --- INTERNATIONALISATION (I18N) ---
47
47
  def detect_default_lang() -> str:
package/bin/aiscout.js CHANGED
@@ -1,36 +1,50 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const { spawn } = require('child_process');
4
- const path = require('path');
5
- const { runCheck } = require('./check-environment');
3
+ const { spawn } = require("node:child_process");
4
+ const path = require("node:path");
5
+ const { runCheck } = require("./check-environment");
6
6
 
7
7
  // Valide la présence et la version de Node (>=16) et Python (>=3.10)
8
- const pyCmd = runCheck(false);
8
+ const pyCmd = runCheck();
9
9
 
10
- const pyScript = path.join(__dirname, '..', 'ai_secret_scout.py');
10
+ const pyScript = path.join(__dirname, "..", "ai_secret_scout.py");
11
11
 
12
12
  const child = spawn(pyCmd, [pyScript, ...process.argv.slice(2)], {
13
- stdio: 'inherit',
14
- env: process.env,
15
- shell: process.platform === 'win32'
13
+ stdio: "inherit",
14
+ env: process.env,
15
+ shell: process.platform === "win32",
16
16
  });
17
17
 
18
- child.on('error', (err) => {
19
- const isFr = (process.env.LANG || process.env.LC_ALL || '').toLowerCase().includes('fr');
20
- if (err.code === 'ENOENT') {
21
- if (isFr) {
22
- console.error('❌ Erreur : Python 3 (python3) est introuvable sur votre machine.');
23
- console.error('AI Secret Scout nécessite Python 3 (bibliothèque standard).');
24
- } else {
25
- console.error('Error: Python 3 (python3) could not be found on your system.');
26
- console.error('AI Secret Scout requires Python 3.10+ (standard library).');
27
- }
28
- } else {
29
- console.error(isFr ? `❌ Erreur lors du lancement d'AI Secret Scout : ${err.message}` : `❌ Error launching AI Secret Scout: ${err.message}`);
30
- }
31
- process.exit(1);
18
+ child.on("error", (err) => {
19
+ const isFr = (process.env.LANG || process.env.LC_ALL || "")
20
+ .toLowerCase()
21
+ .includes("fr");
22
+ if (err.code === "ENOENT") {
23
+ if (isFr) {
24
+ console.error(
25
+ "Erreur : Python 3 (python3) est introuvable sur votre machine.",
26
+ );
27
+ console.error(
28
+ "AI Secret Scout nécessite Python 3 (bibliothèque standard).",
29
+ );
30
+ } else {
31
+ console.error(
32
+ "❌ Error: Python 3 (python3) could not be found on your system.",
33
+ );
34
+ console.error(
35
+ "AI Secret Scout requires Python 3.10+ (standard library).",
36
+ );
37
+ }
38
+ } else {
39
+ console.error(
40
+ isFr
41
+ ? `❌ Erreur lors du lancement d'AI Secret Scout : ${err.message}`
42
+ : `❌ Error launching AI Secret Scout: ${err.message}`,
43
+ );
44
+ }
45
+ process.exit(1);
32
46
  });
33
47
 
34
- child.on('exit', (code) => {
35
- process.exit(code ?? 0);
48
+ child.on("exit", (code) => {
49
+ process.exit(code ?? 0);
36
50
  });
@@ -1,189 +1,173 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const { execSync } = require('child_process');
4
- const fs = require('fs');
3
+ const { execSync } = require("node:child_process");
4
+ const fs = require("node:fs");
5
5
 
6
6
  function isFrenchLocale() {
7
- const envLang = (process.env.LANG || process.env.LC_ALL || process.env.LC_MESSAGES || '').toLowerCase();
8
- return envLang.includes('fr');
7
+ const envLang = (
8
+ process.env.LANG ||
9
+ process.env.LC_ALL ||
10
+ process.env.LC_MESSAGES ||
11
+ ""
12
+ ).toLowerCase();
13
+ return envLang.includes("fr");
9
14
  }
10
15
 
11
16
  function checkNodeVersion() {
12
- const nodeVer = process.version;
13
- const major = parseInt(process.versions.node.split('.')[0], 10);
14
- return {
15
- ok: major >= 16,
16
- version: nodeVer,
17
- major
18
- };
17
+ const nodeVer = process.version;
18
+ const major = parseInt(process.versions.node.split(".")[0], 10);
19
+ return {
20
+ ok: major >= 16,
21
+ version: nodeVer,
22
+ major,
23
+ };
19
24
  }
20
25
 
21
26
  function checkPythonVersion() {
22
- const candidates = process.platform === 'win32'
23
- ? ['python', 'py', 'python3']
24
- : ['python3', 'python'];
25
-
26
- for (const cmd of candidates) {
27
- try {
28
- const output = execSync(`${cmd} -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}')"`, {
29
- encoding: 'utf-8',
30
- stdio: ['pipe', 'pipe', 'ignore'],
31
- timeout: 3000
32
- }).trim();
33
-
34
- const parts = output.split('.').map(n => parseInt(n, 10));
35
- const major = parts[0];
36
- const minor = parts[1];
37
-
38
- if (major === 3 && minor >= 10) {
39
- return {
40
- ok: true,
41
- cmd,
42
- version: output,
43
- tooOld: false
44
- };
45
- } else if (major === 3 || major === 2) {
46
- return {
47
- ok: false,
48
- cmd,
49
- version: output,
50
- tooOld: true
51
- };
52
- }
53
- } catch {
54
- // Ignore and try next candidate
55
- }
56
- }
57
-
58
- return {
59
- ok: false,
60
- cmd: null,
61
- version: null,
62
- tooOld: false
63
- };
27
+ const candidates =
28
+ process.platform === "win32"
29
+ ? ["python", "py", "python3"]
30
+ : ["python3", "python"];
31
+
32
+ for (const cmd of candidates) {
33
+ try {
34
+ const output = execSync(
35
+ `${cmd} -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}')"`,
36
+ {
37
+ encoding: "utf-8",
38
+ stdio: ["pipe", "pipe", "ignore"],
39
+ timeout: 3000,
40
+ },
41
+ ).trim();
42
+
43
+ const parts = output.split(".").map((n) => parseInt(n, 10));
44
+ const major = parts[0];
45
+ const minor = parts[1];
46
+
47
+ if (major === 3 && minor >= 10) {
48
+ return {
49
+ ok: true,
50
+ cmd,
51
+ version: output,
52
+ tooOld: false,
53
+ };
54
+ } else if (major === 3 || major === 2) {
55
+ return {
56
+ ok: false,
57
+ cmd,
58
+ version: output,
59
+ tooOld: true,
60
+ };
61
+ }
62
+ } catch {
63
+ // Ignore and try next candidate
64
+ }
65
+ }
66
+
67
+ return {
68
+ ok: false,
69
+ cmd: null,
70
+ version: null,
71
+ tooOld: false,
72
+ };
64
73
  }
65
74
 
66
75
  function getInstallSuggestion(isFr) {
67
- if (process.platform === 'win32') {
68
- if (isFr) {
69
- return '👉 Sous Windows, vous pouvez installer Python 3.10+ avec winget ou depuis le site officiel :\n winget install Python.Python.3.12\n ou téléchargez l\'installeur : https://www.python.org/downloads/';
70
- }
71
- return '👉 On Windows, you can install Python 3.10+ via winget or from the official website:\n winget install Python.Python.3.12\n or download the installer from: https://www.python.org/downloads/';
72
- }
73
-
74
- let pkgManager = 'apt';
75
- try {
76
- if (fs.existsSync('/etc/os-release')) {
77
- const osRelease = fs.readFileSync('/etc/os-release', 'utf-8');
78
- if (/ID(_LIKE)?=.*(fedora|rhel|centos|nobara)/i.test(osRelease)) {
79
- pkgManager = 'dnf';
80
- } else if (/ID(_LIKE)?=.*(arch|manjaro)/i.test(osRelease)) {
81
- pkgManager = 'pacman';
82
- } else if (/ID(_LIKE)?=.*(suse)/i.test(osRelease)) {
83
- pkgManager = 'zypper';
84
- } else if (/ID(_LIKE)?=.*(alpine)/i.test(osRelease)) {
85
- pkgManager = 'apk';
86
- }
87
- }
88
- } catch {
89
- // Standard fallback
90
- }
91
-
92
- const commands = {
93
- dnf: 'sudo dnf install -y python3',
94
- apt: 'sudo apt update && sudo apt install -y python3',
95
- pacman: 'sudo pacman -S python',
96
- zypper: 'sudo zypper install python3',
97
- apk: 'apk add python3'
98
- };
99
-
100
- const cmd = commands[pkgManager] || 'sudo apt install python3';
101
-
102
- if (isFr) {
103
- return `👉 Commande d'installation recommandée pour votre distribution :\n ${cmd}`;
104
- }
105
- return `👉 Recommended installation command for your distribution:\n ${cmd}`;
76
+ if (process.platform === "win32") {
77
+ if (isFr) {
78
+ return "👉 Sous Windows, vous pouvez installer Python 3.10+ avec winget ou depuis le site officiel :\n winget install Python.Python.3.12\n ou téléchargez l'installeur : https://www.python.org/downloads/";
79
+ }
80
+ return "👉 On Windows, you can install Python 3.10+ via winget or from the official website:\n winget install Python.Python.3.12\n or download the installer from: https://www.python.org/downloads/";
81
+ }
82
+
83
+ let pkgManager = "apt";
84
+ try {
85
+ if (fs.existsSync("/etc/os-release")) {
86
+ const osRelease = fs.readFileSync("/etc/os-release", "utf-8");
87
+ if (/ID(_LIKE)?=.*(fedora|rhel|centos|nobara)/i.test(osRelease)) {
88
+ pkgManager = "dnf";
89
+ } else if (/ID(_LIKE)?=.*(arch|manjaro)/i.test(osRelease)) {
90
+ pkgManager = "pacman";
91
+ } else if (/ID(_LIKE)?=.*(suse)/i.test(osRelease)) {
92
+ pkgManager = "zypper";
93
+ } else if (/ID(_LIKE)?=.*(alpine)/i.test(osRelease)) {
94
+ pkgManager = "apk";
95
+ }
96
+ }
97
+ } catch {
98
+ // Standard fallback
99
+ }
100
+
101
+ const commands = {
102
+ dnf: "sudo dnf install -y python3",
103
+ apt: "sudo apt update && sudo apt install -y python3",
104
+ pacman: "sudo pacman -S python",
105
+ zypper: "sudo zypper install python3",
106
+ apk: "apk add python3",
107
+ };
108
+
109
+ const cmd = commands[pkgManager] || "sudo apt install python3";
110
+
111
+ if (isFr) {
112
+ return `👉 Commande d'installation recommandée pour votre distribution :\n ${cmd}`;
113
+ }
114
+ return `👉 Recommended installation command for your distribution:\n ${cmd}`;
106
115
  }
107
116
 
108
- function runCheck(isPostinstall = false) {
109
- const isFr = isFrenchLocale();
110
- const nodeStatus = checkNodeVersion();
111
- const pyStatus = checkPythonVersion();
112
-
113
- if (isPostinstall) {
114
- // Mode postinstall lors du npm install -g
115
- if (nodeStatus.ok && pyStatus.ok) {
116
- console.log('\x1b[32m✔ AI Secret Scout - Environment check passed:\x1b[0m');
117
- console.log(` • Node.js : ${nodeStatus.version} (OK)`);
118
- console.log(` • Python : ${pyStatus.version} (${pyStatus.cmd} - OK)`);
119
- console.log('\x1b[36m🚀 AI Secret Scout is ready to run! Type: aiscout\x1b[0m\n');
120
- return true;
121
- }
122
-
123
- if (!nodeStatus.ok) {
124
- console.warn(`\x1b[33m⚠️ Warning: Node.js version ${nodeStatus.version} detected. AI Secret Scout recommends Node.js >= 16.0.0.\x1b[0m`);
125
- }
126
-
127
- if (!pyStatus.ok) {
128
- console.warn('\x1b[33m──────────────────────────────────────────────────────────────────\x1b[0m');
129
- if (pyStatus.tooOld) {
130
- console.warn(`\x1b[33m⚠️ Warning: Python ${pyStatus.version} found via '${pyStatus.cmd}', but AI Secret Scout requires Python >= 3.10.\x1b[0m`);
131
- } else {
132
- console.warn('\x1b[33m⚠️ Warning: Python 3 was not detected on your system.\x1b[0m');
133
- }
134
- console.warn(isFr
135
- ? 'AI Secret Scout nécessite Python 3.10+ pour exécuter le moteur d\'analyse TUI.'
136
- : 'AI Secret Scout requires Python 3.10+ to run the core TUI security engine.'
137
- );
138
- console.warn(getInstallSuggestion(isFr));
139
- console.warn('\x1b[33m──────────────────────────────────────────────────────────────────\x1b[0m\n');
140
- }
141
- return true;
142
- }
143
-
144
- // Mode runtime direct (aiscout execution)
145
- if (!nodeStatus.ok) {
146
- console.error(isFr
147
- ? `❌ Erreur : Version de Node.js obsolète (${nodeStatus.version}). Node.js >= 16.0.0 est requis.`
148
- : `❌ Error: Outdated Node.js version (${nodeStatus.version}). Node.js >= 16.0.0 is required.`
149
- );
150
- process.exit(1);
151
- }
152
-
153
- if (!pyStatus.ok) {
154
- console.error('\x1b[31m──────────────────────────────────────────────────────────────────\x1b[0m');
155
- if (pyStatus.tooOld) {
156
- console.error(isFr
157
- ? `❌ Version de Python trop ancienne : ${pyStatus.version} détecté (${pyStatus.cmd}).\n AI Secret Scout requiert Python 3.10 ou supérieur.`
158
- : `❌ Python version too old: ${pyStatus.version} detected (${pyStatus.cmd}).\n AI Secret Scout requires Python 3.10 or higher.`
159
- );
160
- } else {
161
- console.error(isFr
162
- ? '❌ Python 3 (python3) est introuvable sur votre système.'
163
- : '❌ Python 3 (python3) could not be found on your system.'
164
- );
165
- }
166
- console.error('');
167
- console.error(getInstallSuggestion(isFr));
168
- console.error(isFr
169
- ? '💡 Note : Aucun paquet pip externe n\'est requis (seule la bibliothèque standard Python est utilisée).'
170
- : '💡 Note: No pip packages required (uses Python standard library only).'
171
- );
172
- console.error('\x1b[31m──────────────────────────────────────────────────────────────────\x1b[0m');
173
- process.exit(1);
174
- }
175
-
176
- return pyStatus.cmd;
117
+ function runCheck() {
118
+ const isFr = isFrenchLocale();
119
+ const nodeStatus = checkNodeVersion();
120
+ const pyStatus = checkPythonVersion();
121
+
122
+ if (!nodeStatus.ok) {
123
+ console.error(
124
+ isFr
125
+ ? `❌ Erreur : Version de Node.js obsolète (${nodeStatus.version}). Node.js >= 16.0.0 est requis.`
126
+ : `❌ Error: Outdated Node.js version (${nodeStatus.version}). Node.js >= 16.0.0 is required.`,
127
+ );
128
+ process.exit(1);
129
+ }
130
+
131
+ if (!pyStatus.ok) {
132
+ console.error(
133
+ "\x1b[31m──────────────────────────────────────────────────────────────────\x1b[0m",
134
+ );
135
+ if (pyStatus.tooOld) {
136
+ console.error(
137
+ isFr
138
+ ? `❌ Version de Python trop ancienne : ${pyStatus.version} détecté (${pyStatus.cmd}).\n AI Secret Scout requiert Python 3.10 ou supérieur.`
139
+ : `❌ Python version too old: ${pyStatus.version} detected (${pyStatus.cmd}).\n AI Secret Scout requires Python 3.10 or higher.`,
140
+ );
141
+ } else {
142
+ console.error(
143
+ isFr
144
+ ? "❌ Python 3 (python3) est introuvable sur votre système."
145
+ : "❌ Python 3 (python3) could not be found on your system.",
146
+ );
147
+ }
148
+ console.error("");
149
+ console.error(getInstallSuggestion(isFr));
150
+ console.error(
151
+ isFr
152
+ ? "💡 Note : Aucun paquet pip externe n'est requis (seule la bibliothèque standard Python est utilisée)."
153
+ : "💡 Note: No pip packages required (uses Python standard library only).",
154
+ );
155
+ console.error(
156
+ "\x1b[31m──────────────────────────────────────────────────────────────────\x1b[0m",
157
+ );
158
+ process.exit(1);
159
+ }
160
+
161
+ return pyStatus.cmd;
177
162
  }
178
163
 
179
164
  if (require.main === module) {
180
- const isPostinstall = process.argv.includes('--postinstall');
181
- runCheck(isPostinstall);
165
+ runCheck();
182
166
  }
183
167
 
184
168
  module.exports = {
185
- checkNodeVersion,
186
- checkPythonVersion,
187
- getInstallSuggestion,
188
- runCheck
169
+ checkNodeVersion,
170
+ checkPythonVersion,
171
+ getInstallSuggestion,
172
+ runCheck,
189
173
  };
package/package.json CHANGED
@@ -1,41 +1,57 @@
1
1
  {
2
- "name": "ai-secret-scout",
3
- "version": "2.4.2",
4
- "description": "Zero-dependency heuristic secret scanner & redaction tool for AI coding assistants (Claude Code, Antigravity, Codex, Copilot, Cursor)",
5
- "main": "bin/aiscout.js",
6
- "bin": {
7
- "aiscout": "bin/aiscout.js",
8
- "ai-secret-scout": "bin/aiscout.js"
9
- },
10
- "files": [
11
- "bin",
12
- "ai_secret_scout.py",
13
- "README.md",
14
- "README.fr.md"
15
- ],
16
- "scripts": {
17
- "postinstall": "node ./bin/check-environment.js --postinstall",
18
- "start": "node ./bin/aiscout.js"
19
- },
20
- "keywords": [
21
- "security",
22
- "secrets",
23
- "scanner",
24
- "redact",
25
- "ai",
26
- "claude",
27
- "gemini",
28
- "antigravity",
29
- "codex",
30
- "copilot",
31
- "cursor",
32
- "tui",
33
- "cli"
34
- ],
35
- "author": "devredious",
36
- "license": "MIT",
37
- "engines": {
38
- "node": ">=16.0.0"
39
- },
40
- "preferGlobal": true
2
+ "name": "ai-secret-scout",
3
+ "version": "2.4.4",
4
+ "description": "Zero-dependency heuristic secret scanner & redaction tool for AI coding assistants (Claude Code, Antigravity, Codex, Copilot, Cursor)",
5
+ "homepage": "https://github.com/DevRedious/ai-secret-scout#readme",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/DevRedious/ai-secret-scout.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/DevRedious/ai-secret-scout/issues"
12
+ },
13
+ "main": "bin/aiscout.js",
14
+ "bin": {
15
+ "aiscout": "bin/aiscout.js",
16
+ "ai-secret-scout": "bin/aiscout.js"
17
+ },
18
+ "files": [
19
+ "bin",
20
+ "ai_secret_scout.py",
21
+ "README.md",
22
+ "README.fr.md"
23
+ ],
24
+ "scripts": {
25
+ "start": "node ./bin/aiscout.js",
26
+ "test": "node --test",
27
+ "format": "biome format --write .",
28
+ "lint": "biome lint .",
29
+ "check": "biome check --write .",
30
+ "ci": "biome ci .",
31
+ "ci:fix": "biome check --write --unsafe ."
32
+ },
33
+ "keywords": [
34
+ "security",
35
+ "secrets",
36
+ "scanner",
37
+ "redact",
38
+ "ai",
39
+ "claude",
40
+ "gemini",
41
+ "antigravity",
42
+ "codex",
43
+ "copilot",
44
+ "cursor",
45
+ "tui",
46
+ "cli"
47
+ ],
48
+ "author": "devredious",
49
+ "license": "MIT",
50
+ "engines": {
51
+ "node": ">=16.0.0"
52
+ },
53
+ "preferGlobal": true,
54
+ "devDependencies": {
55
+ "@biomejs/biome": "^2.5.13"
56
+ }
41
57
  }