
أداة CLI خفيفة الوزن ومتعددة المنصات تقوم بمسح نظام الملفات لديك لكشف الأسرار المكشوفة ومفاتيح API والرموز المميزة. تم بناؤها باستخدام Go لتحقيق أقصى أداء وبدون أي تبعيات.
اصطد الأسرار المكشوفة بمكر الثعلب!
أداة سطر أوامر خفيفة الوزن ومتعددة المنصات تفحص نظام الملفات لديك لكشف الأسرار المكشوفة ومفاتيح API والرموز المميزة. مطوّرة بلغة Go لتحقيق أقصى أداء دون أي تبعيات.
# macOS Apple Silicon (M1/M2/M3)
curl -L -o kyubisweep https://github.com/tanmayshahane/kyubisweep/releases/latest/kyubisweep-darwin-arm64
chmod +x kyubisweep
# قم بتشغيله!
./kyubisweep --path /path/to/your/project
# تأكد من تثبيت Go 1.21+
go version
# استنساخ وبناء
git clone https://github.com/tanmayshahane/kyubisweep.git
cd kyubisweep
go build -o kyubisweep ./cmd/sweep/main.go
# قم بتشغيله!
./kyubisweep --path .
USAGE:
kyubisweep [OPTIONS]
OPTIONS:
--path <directory> Path to scan (default: current directory)
--verbose Enable detailed output
--all Show all severity levels (default: HIGH only)
--all-files Scan all files, not just text-based files
--ext <extensions> Additional extensions to scan (comma-separated)
--json Output report as JSON file
--no-report Don't save report file
--quiet Minimal output, just summary
--move-to <path> Move files with secrets to quarantine directory
--help Show this help message
EXAMPLES:
kyubisweep --path ./my-project
kyubisweep --path . --all # Show all severities
kyubisweep --path . --ext log,dat # Add custom extensions
kyubisweep --path . --move-to ./vault # Quarantine sensitive files
kyubisweep --path . --json # Export as 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;| الفئة | أمثلة |
|---|---|
| بيانات اعتماد السحابة | AWS Access Keys, Google API Keys, Azure tokens |
| أنظمة الدفع | Stripe API keys (live & test) |
| أدوات المطورين | GitHub PATs, NPM tokens, Heroku API keys |
| الاتصالات | Slack tokens, Discord bot tokens, Twilio keys |
| قواعد البيانات | PostgreSQL, MongoDB, MySQL connection strings |
| التشفير | RSA/SSH/PGP private keys |
| عام | Passwords, API keys, Bearer tokens |
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
# اجعل سكريبت البناء قابلاً للتنفيذ
chmod +x build.sh
# بناء لجميع المنصات
./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)
وجدت أسرارًا تحتاج إلى تأمين فوري؟ استخدم --move-to لنقل الملفات:
./kyubisweep --path . --move-to ./secure_vault
ميزات الأمان:
المساهمات مرحب بها! لا تتردد في تقديم طلب سحب (Pull Request).
رخصة MIT - استخدمها بحرية في مشاريعك الخاصة!
مصنوع بـ 🦊 بواسطة مطورين قاموا عن طريق الخطأ بإرسال مفاتيح API الخاصة بهم مرات عديدة جدًا.