
Un outil CLI léger et multiplateforme qui analyse votre système de fichiers pour détecter les secrets exposés, les clés API et les jetons. Conçu avec Go pour des performances maximales et zéro dépendance.
Traquez les secrets exposés avec la ruse d'un renard !
Un outil CLI léger et multiplateforme qui scanne votre système de fichiers pour détecter les secrets exposés, clés API et jetons. Construit avec Go pour des performances maximales et zéro dépendance.
# macOS Apple Silicon (M1/M2/M3)
curl -L -o kyubisweep https://github.com/tanmayshahane/kyubisweep/releases/latest/kyubisweep-darwin-arm64
chmod +x kyubisweep
# Run it!
./kyubisweep --path /path/to/your/project
# Ensure Go 1.21+ is installed
go version
# Clone and build
git clone https://github.com/tanmayshahane/kyubisweep.git
cd kyubisweep
go build -o kyubisweep ./cmd/sweep/main.go
# Run it!
./kyubisweep --path .
USAGE:
kyubisweep [OPTIONS]
OPTIONS:
--path <directory> Chemin à analyser (par défaut : répertoire courant)
--verbose Activer la sortie détaillée
--all Afficher tous les niveaux de gravité (par défaut : ÉLEVÉ uniquement)
--all-files Analyser tous les fichiers, pas seulement les fichiers texte
--ext <extensions> Extensions supplémentaires à analyser (séparées par des virgules)
--json Sortir le rapport sous forme de fichier JSON
--no-report Ne pas enregistrer le fichier de rapport
--quiet Sortie minimale, juste le résumé
--move-to <path> Déplacer les fichiers contenant des secrets vers le répertoire de quarantaine
--help Afficher ce message d'aide
EXEMPLES :
kyubisweep --path ./my-project
kyubisweep --path . --all # Afficher toutes les gravités
kyubisweep --path . --ext log,dat # Ajouter des extensions personnalisées
kyubisweep --path . --move-to ./vault # Mettre en quarantaine les fichiers sensibles
kyubisweep --path . --json # Exporter au format JSON
╔══════════════════════════════════════════════════════════════════════════╗
║ 🛡️ KYUBISWEEP SECURITY HYGIENE SCORECARD ║
╚══════════════════════════════════════════════════════════════════════════╝
🚨 CRITICAL ISSUES FOUND
📊 RISK BREAKDOWN
─────────────────────────────────────────
🚨 CRITICAL 9 ████████████████░░░░
🔴 HIGH 2 ███░░░░░░░░░░░░░░░░░
🟡 MEDIUM 0 ░░░░░░░░░░░░░░░░░░░░
🔵 LOW 0 ░░░░░░░░░░░░░░░░░░░░
🔍 FINDINGS DETAIL
─────────────────────────────────────────
RISK TYPE LOCATION
[CRITICAL] AWS Access Key ID ~/project/.env:5
[CRITICAL] PostgreSQL Connection ~/project/config.yaml:12
[HIGH] Stripe Secret Key ~/project/payment.js:42
📁 Scanned: ~/my-project
📄 Files analyzed: 2.9K
⏱️ Duration: 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;| Catégorie | Exemples |
|---|---|
| Cloud Credentials | Clés d'accès AWS, Clés API Google, Jetons Azure |
| Payment Systems | Clés API Stripe (production et test) |
| Developer Tools | PAT GitHub, Jetons NPM, Clés API Heroku |
| Communication | Jetons Slack, Jetons de bot Discord, Clés Twilio |
| Databases | Chaînes de connexion PostgreSQL, MongoDB, MySQL |
| Cryptographic | Clés privées RSA/SSH/PGP |
| Generic | Mots de passe, clés API, jetons Bearer |
kyubisweep/
├── cmd/
│ └── sweep/
│ └── main.go # CLI entry point + worker pool
├── pkg/
│ ├── analyzer/
│ │ └── analyzer.go # Entropy + regex detection
│ ├── scanner/
│ │ └── walker.go # Concurrent directory walker
│ ├── reporter/
│ │ └── reporter.go # Security Scorecard output
│ ├── quarantine/
│ │ └── manager.go # Secure file relocation
│ └── common/
│ └── colors.go # Shared ANSI color utilities
├── reports/ # Generated scan reports
├── build/ # Cross-compiled binaries
├── go.mod # Go module definition
├── build.sh # Cross-platform build script
└── README.md
# Make the build script executable
chmod +x build.sh
# Build for all platforms
./build.sh
# Outputs:
# 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)
Vous avez trouvé des secrets que vous devez sécuriser immédiatement ? Utilisez --move-to pour déplacer les fichiers :
./kyubisweep --path . --move-to ./secure_vault
Fonctionnalités de sécurité :
Les contributions sont les bienvenues ! N'hésitez pas à soumettre une Pull Request.
Licence MIT - n'hésitez pas à l'utiliser dans vos propres projets !
Fait avec 🦊 par des développeurs qui ont accidentellement commit leurs clés API une fois de trop.