55![ Version: 1.0.0] ( https://img.shields.io/badge/version-1.0.0-blue )
66![ License: MIT] ( https://img.shields.io/badge/License-MIT-blue )
77
8- Tool CLI in Rust per scansionare file di log e individuare segreti esposti (
9- token, chiavi API, credenziali) tramite regole regex configurabili in formato
10- TOML.
8+ A Rust CLI tool to scan log files and detect exposed secrets (tokens, API keys,
9+ credentials) using configurable regex rules in TOML format.
1110
12- ## Funzionalità
11+ ## Features
1312
14- - Scansione riga per riga di file di log arbitrari
15- - Regole di rilevamento definite in file TOML, facilmente estendibili
16- - Supporto a regex avanzate (lookahead/lookbehind) tramite ` fancy-regex `
17- - Livelli di severità : ` critical ` , ` high ` , ` medium ` , ` low `
18- - Output formattato in tabella con colori per severità
19- - Risultati ordinati per severità decrescente
13+ - Line-by-line scanning of arbitrary log files
14+ - Detection rules defined in TOML files, easily extensible
15+ - Advanced regex support (lookahead/lookbehind) via ` fancy-regex `
16+ - Severity levels : ` critical ` , ` high ` , ` medium ` , ` low `
17+ - Formatted table output with color-coded severity
18+ - Results sorted by descending severity
2019
21- ## Regole incluse
20+ ## Included Rules
2221
23- Il ruleset di default (` rulesets/default.toml ` ) rileva :
22+ The default ruleset (` rulesets/default.toml ` ) detects :
2423
25- | Segreto | Severità |
24+ | Secret | Severity |
2625| ------------------------------| ----------|
2726| GitHub Personal Access Token | critical |
2827| AWS Secret Access Key | critical |
@@ -33,7 +32,7 @@ Il ruleset di default (`rulesets/default.toml`) rileva:
3332| MySQL Connection String | high |
3433| JWT Token | high |
3534
36- ## Requisiti
35+ ## Requirements
3736
3837- Rust 1.70+
3938
@@ -43,67 +42,66 @@ Il ruleset di default (`rulesets/default.toml`) rileva:
4342cargo build --release
4443```
4544
46- Il binario viene generato in ` target/release/log-security-analyzer ` .
45+ The binary is generated at ` target/release/log-security-analyzer ` .
4746
48- ## Utilizzo
47+ ## Usage
4948
5049``` bash
5150log-security-analyzer < log_file> < rules_file>
5251```
5352
54- Esempio con i file inclusi nel repository:
53+ Example with the files included in the repository:
5554
5655``` bash
5756cargo run -- logs/app.log rulesets/default.toml
5857```
5958
60- ### Logging di debug
59+ ### Debug Logging
6160
62- Il tool usa ` env_logger ` . Per abilitare i log interni :
61+ The tool uses ` env_logger ` . To enable internal logs :
6362
6463``` bash
6564RUST_LOG=info cargo run -- logs/app.log rulesets/default.toml
6665```
6766
68- ## Creare regole personalizzate
67+ ## Creating Custom Rules
6968
70- Creare un file ` .toml ` con la seguente struttura :
69+ Create a ` .toml ` file with the following structure :
7170
7271``` toml
7372[[rules ]]
7473id = " my-rule"
75- description = " Descrizione del segreto "
74+ description = " Description of the secret "
7675regex = ''' pattern_regex'''
7776tags = [" tag1" , " tag2" ]
7877severity = " high"
7978```
8079
81- Valori validi per ` severity ` : ` critical ` , ` high ` , ` medium ` , ` low ` .
80+ Valid values for ` severity ` : ` critical ` , ` high ` , ` medium ` , ` low ` .
8281
83- ## Struttura del progetto
82+ ## Project Structure
8483
8584```
8685src/
87- main.rs # Entry point CLI
88- lib.rs # Interfaccia pubblica della libreria
89- rules.rs # Parsing delle regole da TOML
90- scanner.rs # Logica di scansione e output tabellare
91- severity.rs # Enum dei livelli di severità
86+ main.rs # CLI entry point
87+ lib.rs # Public library interface
88+ rules.rs # Rule parsing from TOML
89+ scanner.rs # Scanning logic and table output
90+ severity.rs # Severity level enum
9291rulesets/
93- default.toml # Ruleset predefinito
92+ default.toml # Default ruleset
9493logs/
95- app.log # File di log di esempio
94+ app.log # Sample log file
9695```
9796
98- ## Test
97+ ## Testing
9998
10099``` bash
101100cargo test
102101```
103102
104- ## Licenza
103+ ## License
105104
106- Questo progetto è distribuito sotto licenza MIT. Consulta il file [ LICENSE] ( LICENSE ) per i dettagli completi .
105+ This project is licensed under the MIT License. See the [ LICENSE] ( LICENSE ) file for full details .
107106
108107Copyright (c) 2026 Luca Dello Russo
109-
0 commit comments