
Uno strumento CLI leggero e cross-platform che esplora il tuo filesystem per rilevare segreti esposti, chiavi API e token. Realizzato con Go per massime prestazioni e zero dipendenze.
Scova i segreti esposti con l'astuzia di una volpe!
Uno strumento CLI leggero e cross‑platform che scansiona il tuo filesystem per rilevare segreti esposti, chiavi API e token. Realizzato con Go per massime prestazioni e zero dipendenze.
# macOS Apple Silicon (M1/M2/M3)
curl -L -o kyubisweep https://github.com/tanmayshahane/kyubisweep/releases/latest/kyubisweep-darwin-arm64
chmod +x kyubisweep
# Eseguilo!
./kyubisweep --path /path/to/your/project
# Assicurati che Go 1.21+ sia installato
go version
# Clona e compila
git clone https://github.com/tanmayshahane/kyubisweep.git
cd kyubisweep
go build -o kyubisweep ./cmd/sweep/main.go
# Eseguilo!
./kyubisweep --path .
UTILIZZO:
kyubisweep [OPZIONI]
OPZIONI:
--path <directory> Percorso da scansionare (predefinito: directory corrente)
--verbose Abilita output dettagliato
--all Mostra tutti i livelli di gravità (predefinito: solo ALTO)
--all-files Scansiona tutti i file, non solo quelli di testo
--ext <estensioni> Estensioni aggiuntive da scansionare (separate da virgola)
--json Esporta report come file JSON
--no-report Non salvare il report
--quiet Output minimo, solo riepilogo
--move-to <percorso> Sposta i file con segreti nella directory di quarantena
--help Mostra questo messaggio di aiuto
ESEMPI:
kyubisweep --path ./my-project
kyubisweep --path . --all # Mostra tutte le gravità
kyubisweep --path . --ext log,dat # Aggiungi estensioni personalizzate
kyubisweep --path . --move-to ./vault # Metti in quarantena i file sensibili
kyubisweep --path . --json # Esporta come JSON
╔══════════════════════════════════════════════════════════════════════════╗
║ 🛡️ KYUBISWEEP SCHEDA DI IGIENE DELLA SICUREZZA ║
╚══════════════════════════════════════════════════════════════════════════╝
🚨 PROBLEMI CRITICI TROVATI
📊 ANALISI DEI RISCHI
─────────────────────────────────────────
🚨 CRITICO 9 ████████████████░░░░
🔴 ALTO 2 ███░░░░░░░░░░░░░░░░░
🟡 MEDIO 0 ░░░░░░░░░░░░░░░░░░░░
🔵 BASSO 0 ░░░░░░░░░░░░░░░░░░░░
🔍 DETTAGLI DEI REPERTI
─────────────────────────────────────────
RISCHIO TIPO POSIZIONE
[CRITICO] AWS Access Key ID ~/project/.env:5
[CRITICO] Connessione PostgreSQL ~/project/config.yaml:12
[ALTO] Stripe Secret Key ~/project/payment.js:42
📁 Scansionato: ~/my-project
📄 File analizzati: 2.9K
⏱️ Durata: 1.2s
graph TD
subgraph "Initialization (Main Goroutine)"
A[Start CLI] --> B{Parse Flags};
B -->|--path| C[Init Walker];
B -->|--move-to| D[Init Quarantine Mgr];
C --> E[Create Jobs Channel];
E --> F[Create Results Channel];
end
subgraph "Producer (Goroutine 1)"
G[Walker] -->|Finds Files| E;
style G fill:#f9f,stroke:#333,stroke-width:2px
style E fill:#ccf,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
end
subgraph "Worker Pool (Goroutines 2...N)"
E -->|Read File Path| H[Worker 1];
E -->|Read File Path| I[Worker 2];
E -->|Read File Path| J[Worker N];
H -->|Read Content| K{Analyzer};
I -->|Read Content| K{Analyzer};
J -->|Read Content| K{Analyzer};
K -- No Secret --> L((Discard));
K -- Secret Found --> M[Send Finding];
M --> F;
style K fill:#ff9,stroke:#333,stroke-width:2px
end
subgraph "Consumer & Wrap up (Main Goroutine)"
F -->|Collect Findings| N[Reporter / Table UI];
style F fill:#ccf,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
N --> O{Quarantine Requested?};
O -- Yes --> P[Move Files to Vault];
O -- No --> Q[Exit];
P --> Q;
end
%% Add a WaitGroup visual helper
H -.-> WG[sync.WaitGroup];
I -.-> WG;
J -.-> WG;
WG -.->|All Done| F;
kyubisweep/
├── cmd/
│ └── sweep/
│ └── main.go # Punto di ingresso CLI + pool di worker
├── pkg/
│ ├── analyzer/
│ │ └── analyzer.go # Rilevamento entropia + regex
│ ├── scanner/
│ │ └── walker.go # Scansione concorrente delle directory
│ ├── reporter/
│ │ └── reporter.go # Output della scheda di sicurezza
│ ├── quarantine/
│ │ └── manager.go # Spostamento sicuro dei file
│ └── common/
│ └── colors.go # Utilità condivise per colori ANSI
├── reports/ # Report di scansione generati
├── build/ # Binari cross‑compilati
├── go.mod # Definizione del modulo Go
├── build.sh # Script di compilazione cross‑platform
└── README.md
# Rendi eseguibile lo script di compilazione
chmod +x build.sh
# Compila per tutte le piattaforme
./build.sh
# Output:
# build/kyubisweep-darwin-arm64 (macOS Apple Silicon)
# build/kyubisweep-darwin-amd64 (macOS Intel)
# build/kyubisweep-linux-amd64 (Linux 64-bit)
# build/kyubisweep-linux-arm64 (Linux ARM)
# build/kyubisweep-windows-amd64.exe (Windows 64-bit)
Hai trovato segreti da mettere in sicurezza immediatamente? Usa --move-to per spostare i file:
./kyubisweep --path . --move-to ./secure_vault
Caratteristiche di sicurezza:
I contributi sono benvenuti! Sentiti libero di inviare una Pull Request.
Licenza MIT - sentiti libero di usarlo nei tuoi progetti!
Realizzato con 🦊 da sviluppatori che hanno accidentalmente committato le loro chiavi API una volta di troppo.
| Categoria | Esempi |
|---|
| Credenziali Cloud | Chiavi di accesso AWS, Chiavi API Google, token Azure |
| Sistemi di Pagamento | Chiavi API Stripe (live & test) |
| Strumenti per Sviluppatori | GitHub PAT, token NPM, chiavi API Heroku |
| Comunicazione | Token Slack, token bot Discord, chiavi Twilio |
| Database | Stringhe di connessione PostgreSQL, MongoDB, MySQL |
| Crittografici | Chiavi private RSA/SSH/PGP |
| Generici | Password, chiavi API, token Bearer |