ai-secret-scout 2.4.2 → 2.4.3

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,7 +9,7 @@
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.3</h2>
13
13
 
14
14
  <p align="center">
15
15
  <!-- Ligne 1 : badges techno & plateforme -->
@@ -178,7 +178,7 @@ Le moteur TUI autonome d'`aiscout` (pure bibliothèque standard Python) s'adapte
178
178
  ### 1. Tableau de bord & Menu d'accueil interactif (Hub central)
179
179
 
180
180
  ```text
181
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
181
+ ◈ AISCOUT v2.4.3 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
182
182
 
183
183
  █████╗ ██╗ ███████╗ ██████╗ ██████╗ ██╗ ██╗████████╗
184
184
  ██╔══██╗██║ ██╔════╝██╔════╝██╔═══██╗██║ ██║╚══██╔══╝
@@ -214,7 +214,7 @@ Le moteur TUI autonome d'`aiscout` (pure bibliothèque standard Python) s'adapte
214
214
  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
215
 
216
216
  ```text
217
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
217
+ ◈ AISCOUT v2.4.3 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
218
218
 
219
219
  📋 EXPLORATEUR DE SECRETS (1/21) — Mode : MASQUÉ 🛡️ │ Tri : Sévérité (🔴 > 🟡 > 🔵)
220
220
 
@@ -235,7 +235,7 @@ La vue tableau permet de parcourir l'intégralité des fuites identifiées avec
235
235
  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
236
 
237
237
  ```text
238
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
238
+ ◈ AISCOUT v2.4.3 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
239
239
 
240
240
  📋 EXPLORATEUR DE SECRETS (1/3) — Mode : MASQUÉ 🛡️ │ Tri : Sévérité (🔴 > 🟡 > 🔵)
241
241
  🔍 Recherche active : "github" (3 secrets trouvés) │ [Backspace/Esc] Effacer
@@ -255,7 +255,7 @@ En appuyant sur `/`, une boîte de saisie inline s'ouvre sur la barre inférieur
255
255
  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
256
 
257
257
  ```text
258
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
258
+ ◈ AISCOUT v2.4.3 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
259
259
 
260
260
  ╭──────────────────────────────────────────────────────────────────────────────────╮
261
261
  │ FICHE D'AUDIT DU SECRET DÉTECTÉ │
@@ -284,7 +284,7 @@ En pressant `Entrée` sur une ligne du tableau, une fiche d'audit chirurgicale s
284
284
  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
285
 
286
286
  ```text
287
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
287
+ ◈ AISCOUT v2.4.3 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:30
288
288
 
289
289
  █████╗ ██╗ ███████╗ ██████╗ ██████╗ ██╗ ██╗████████╗
290
290
  ██╔══██╗██║ ██╔════╝██╔════╝██╔═══██╗██║ ██║╚══██╔══╝
@@ -303,7 +303,7 @@ Lors de l'audit initial, du caviardage ou de l'exportation des dossiers d'audit,
303
303
  Veuillez patienter pendant l'analyse...
304
304
  ```
305
305
 
306
- ### 🌟 Points forts du moteur TUI (v2.4.0)
306
+ ### 🌟 Points forts du moteur TUI
307
307
  * **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
308
  * **Layout auto-adaptatif (zéro coupure)** :
309
309
  * Barre supérieure clouée à la **ligne 1**.
@@ -320,7 +320,7 @@ Lors de l'audit initial, du caviardage ou de l'exportation des dossiers d'audit,
320
320
  Le mode **Watchdog** transforme `aiscout` en un gardien silencieux en arrière-plan :
321
321
 
322
322
  ```text
323
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:21
323
+ ◈ AISCOUT v2.4.3 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:21
324
324
 
325
325
  📡 SURVEILLANCE EN TEMPS RÉEL (WATCHDOG) │ 🟢 [VEILLE ACTIVE]
326
326
  Détecte les sessions IA en écriture et notifie instantanément sur le bureau (Linux / Windows)
@@ -351,7 +351,7 @@ Le mode **Watchdog** transforme `aiscout` en un gardien silencieux en arrière-p
351
351
  Le menu `[7]` offre un contrôle absolu sur les fichiers de sauvegarde générés lors des opérations de caviardage :
352
352
 
353
353
  ```text
354
- ◈ AISCOUT v2.4.0 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:22
354
+ ◈ AISCOUT v2.4.3 │ Utilisateur : dev_redious │ Machine : poste-travail 12/09/2026 22:22
355
355
 
356
356
  ↩️ GESTIONNAIRE DES SAUVEGARDES & RESTAURATION (.BAK)
357
357
  Restaurer les fichiers originaux avant caviardage ou purger les sauvegardes.
package/README.md CHANGED
@@ -9,7 +9,7 @@
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.3</h2>
13
13
 
14
14
  <p align="center">
15
15
  <!-- Row 1: tech & platform badges -->
@@ -178,7 +178,7 @@ The application automatically switches your terminal to an alternate screen buff
178
178
  ### 1. Central Hub & Dashboard
179
179
 
180
180
  ```text
181
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
181
+ ◈ AISCOUT v2.4.3 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
182
182
 
183
183
  █████╗ ██╗ ███████╗ ██████╗ ██████╗ ██╗ ██╗████████╗
184
184
  ██╔══██╗██║ ██╔════╝██╔════╝██╔═══██╗██║ ██║╚══██╔══╝
@@ -214,7 +214,7 @@ The application automatically switches your terminal to an alternate screen buff
214
214
  The interactive table allows fluid inspection of all detected secrets with multi-criteria sorting and instantaneous full-text filtering:
215
215
 
216
216
  ```text
217
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
217
+ ◈ AISCOUT v2.4.3 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
218
218
 
219
219
  📋 SECRET EXPLORER (1/21) — Mode : MASKED 🛡️ │ Sort : Severity (🔴 > 🟡 > 🔵)
220
220
 
@@ -235,7 +235,7 @@ The interactive table allows fluid inspection of all detected secrets with multi
235
235
  Pressing `/` opens an inline prompt directly in the status bar. The table updates dynamically with every keystroke:
236
236
 
237
237
  ```text
238
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
238
+ ◈ AISCOUT v2.4.3 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
239
239
 
240
240
  📋 SECRET EXPLORER (1/3) — Mode : MASKED 🛡️ │ Sort : Severity (🔴 > 🟡 > 🔵)
241
241
  🔍 Active filter: "github" (3 matching secrets) │ [Backspace/Esc] Clear
@@ -255,7 +255,7 @@ Pressing `/` opens an inline prompt directly in the status bar. The table update
255
255
  Pressing `Enter` on any row displays a full diagnostic modal card highlighting the source file, context, and remediation recommendations:
256
256
 
257
257
  ```text
258
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
258
+ ◈ AISCOUT v2.4.3 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
259
259
 
260
260
  ╭──────────────────────────────────────────────────────────────────────────────────╮
261
261
  │ AUDIT CARD FOR DETECTED SECRET │
@@ -284,7 +284,7 @@ Pressing `Enter` on any row displays a full diagnostic modal card highlighting t
284
284
  During scans, redactions, or reports generation, an animated 100ms spinner displays current scan phase and progress percentage:
285
285
 
286
286
  ```text
287
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
287
+ ◈ AISCOUT v2.4.3 │ User : dev_redious │ Host : workstation 12/09/2026 22:30
288
288
 
289
289
  █████╗ ██╗ ███████╗ ██████╗ ██████╗ ██╗ ██╗████████╗
290
290
  ██╔══██╗██║ ██╔════╝██╔════╝██╔═══██╗██║ ██║╚══██╔══╝
@@ -320,7 +320,7 @@ During scans, redactions, or reports generation, an animated 100ms spinner displ
320
320
  The **Watchdog** mode turns `aiscout` into a background sentinel:
321
321
 
322
322
  ```text
323
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:21
323
+ ◈ AISCOUT v2.4.3 │ User : dev_redious │ Host : workstation 12/09/2026 22:21
324
324
 
325
325
  📡 REAL-TIME MONITORING (WATCHDOG) │ 🟢 [ACTIVE SENTINEL]
326
326
  Detects active AI sessions writing to disk and sends instant desktop alerts
@@ -351,7 +351,7 @@ The **Watchdog** mode turns `aiscout` into a background sentinel:
351
351
  TUI Menu `[7]` provides complete control over backup files created prior to sanitization:
352
352
 
353
353
  ```text
354
- ◈ AISCOUT v2.4.0 │ User : dev_redious │ Host : workstation 12/09/2026 22:22
354
+ ◈ AISCOUT v2.4.3 │ User : dev_redious │ Host : workstation 12/09/2026 22:22
355
355
 
356
356
  ↩️ SAFE RESTORE & BACKUP MANAGER (.BAK)
357
357
  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.3"
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
8
  const pyCmd = runCheck(false);
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,221 @@
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
117
  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;
118
+ const isFr = isFrenchLocale();
119
+ const nodeStatus = checkNodeVersion();
120
+ const pyStatus = checkPythonVersion();
121
+
122
+ if (isPostinstall) {
123
+ // Mode postinstall lors du npm install -g
124
+ if (nodeStatus.ok && pyStatus.ok) {
125
+ console.log(
126
+ "\x1b[32m✔ AI Secret Scout - Environment check passed:\x1b[0m",
127
+ );
128
+ console.log(` • Node.js : ${nodeStatus.version} (OK)`);
129
+ console.log(` • Python : ${pyStatus.version} (${pyStatus.cmd} - OK)`);
130
+ console.log(
131
+ "\x1b[36m🚀 AI Secret Scout is ready to run! Type: aiscout\x1b[0m\n",
132
+ );
133
+ return true;
134
+ }
135
+
136
+ if (!nodeStatus.ok) {
137
+ console.warn(
138
+ `\x1b[33m⚠️ Warning: Node.js version ${nodeStatus.version} detected. AI Secret Scout recommends Node.js >= 16.0.0.\x1b[0m`,
139
+ );
140
+ }
141
+
142
+ if (!pyStatus.ok) {
143
+ console.warn(
144
+ "\x1b[33m──────────────────────────────────────────────────────────────────\x1b[0m",
145
+ );
146
+ if (pyStatus.tooOld) {
147
+ console.warn(
148
+ `\x1b[33m⚠️ Warning: Python ${pyStatus.version} found via '${pyStatus.cmd}', but AI Secret Scout requires Python >= 3.10.\x1b[0m`,
149
+ );
150
+ } else {
151
+ console.warn(
152
+ "\x1b[33m⚠️ Warning: Python 3 was not detected on your system.\x1b[0m",
153
+ );
154
+ }
155
+ console.warn(
156
+ isFr
157
+ ? "AI Secret Scout nécessite Python 3.10+ pour exécuter le moteur d'analyse TUI."
158
+ : "AI Secret Scout requires Python 3.10+ to run the core TUI security engine.",
159
+ );
160
+ console.warn(getInstallSuggestion(isFr));
161
+ console.warn(
162
+ "\x1b[33m──────────────────────────────────────────────────────────────────\x1b[0m\n",
163
+ );
164
+ }
165
+ return true;
166
+ }
167
+
168
+ // Mode runtime direct (aiscout execution)
169
+ if (!nodeStatus.ok) {
170
+ console.error(
171
+ isFr
172
+ ? `❌ Erreur : Version de Node.js obsolète (${nodeStatus.version}). Node.js >= 16.0.0 est requis.`
173
+ : `❌ Error: Outdated Node.js version (${nodeStatus.version}). Node.js >= 16.0.0 is required.`,
174
+ );
175
+ process.exit(1);
176
+ }
177
+
178
+ if (!pyStatus.ok) {
179
+ console.error(
180
+ "\x1b[31m──────────────────────────────────────────────────────────────────\x1b[0m",
181
+ );
182
+ if (pyStatus.tooOld) {
183
+ console.error(
184
+ isFr
185
+ ? `❌ Version de Python trop ancienne : ${pyStatus.version} détecté (${pyStatus.cmd}).\n AI Secret Scout requiert Python 3.10 ou supérieur.`
186
+ : `❌ Python version too old: ${pyStatus.version} detected (${pyStatus.cmd}).\n AI Secret Scout requires Python 3.10 or higher.`,
187
+ );
188
+ } else {
189
+ console.error(
190
+ isFr
191
+ ? "❌ Python 3 (python3) est introuvable sur votre système."
192
+ : "❌ Python 3 (python3) could not be found on your system.",
193
+ );
194
+ }
195
+ console.error("");
196
+ console.error(getInstallSuggestion(isFr));
197
+ console.error(
198
+ isFr
199
+ ? "💡 Note : Aucun paquet pip externe n'est requis (seule la bibliothèque standard Python est utilisée)."
200
+ : "💡 Note: No pip packages required (uses Python standard library only).",
201
+ );
202
+ console.error(
203
+ "\x1b[31m──────────────────────────────────────────────────────────────────\x1b[0m",
204
+ );
205
+ process.exit(1);
206
+ }
207
+
208
+ return pyStatus.cmd;
177
209
  }
178
210
 
179
211
  if (require.main === module) {
180
- const isPostinstall = process.argv.includes('--postinstall');
181
- runCheck(isPostinstall);
212
+ const isPostinstall = process.argv.includes("--postinstall");
213
+ runCheck(isPostinstall);
182
214
  }
183
215
 
184
216
  module.exports = {
185
- checkNodeVersion,
186
- checkPythonVersion,
187
- getInstallSuggestion,
188
- runCheck
217
+ checkNodeVersion,
218
+ checkPythonVersion,
219
+ getInstallSuggestion,
220
+ runCheck,
189
221
  };
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.3",
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
+ "postinstall": "node ./bin/check-environment.js --postinstall",
26
+ "start": "node ./bin/aiscout.js",
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
  }