|
1 | 1 | # EXC Analyzer |
| 2 | +<<<<<<< HEAD |
2 | 3 | [](https://github.com/exc-analyzer/exc/releases) |
4 | 5 | [](https://pepy.tech/projects/exc-analyzer) |
5 | 6 | [](https://github.com/exc-analyzer/exc/releases) |
6 | 7 | [](https://pypi.org/project/exc-analyzer/) |
7 | 8 | [](https://github.com/exc-analyzer/exc) |
8 | 9 | [](https://badge.socket.dev/pypi/package/exc-analyzer/1.2.1?artifact_id=tar-gz) |
| 10 | +======= |
9 | 11 |
|
| 12 | +[](https://github.com/exc-analyzer/exc/releases) |
| 13 | +[](https://pepy.tech/projects/exc-analyzer) |
| 14 | +[](https://github.com/exc-analyzer/exc/releases) |
| 15 | +[](https://pypi.org/project/exc-analyzer/) |
| 16 | +[](https://github.com/exc-analyzer/exc) |
| 17 | +[](https://badge.socket.dev/pypi/package/exc-analyzer/1.3.0?artifact_id=tar-gz) |
| 18 | +>>>>>>> ba1aa21 (chore: prepare release v1.3.0 with automated workflow) |
10 | 19 |
|
11 | | -EXC-Analyzer is a professional command-line tool for advanced GitHub repository and user analysis, security auditing, and secret scanning. Designed for penetration testers, security researchers, and open-source maintainers, EXC-Analyzer provides deep insights into repository health, contributor activity, and potential security risks. |
12 | | - |
| 20 | +**EXC Analyzer** is a professional command-line tool for advanced GitHub repository intelligence, security auditing, and content analysis. Designed for security researchers, penetration testers, and open-source maintainers, it bridges the gap between simple metadata and deep, actionable insights. |
13 | 21 |
|
14 | 22 | ## Table of Contents |
15 | | -- [Website](https://exc-analyzer.web.app/) |
16 | 23 | - [Features](#features) |
17 | 24 | - [Installation](#installation) |
| 25 | +- [Authentication](#authentication) |
18 | 26 | - [Quick Start](#quick-start) |
| 27 | +- [Command Reference](#command-reference) |
| 28 | +- [Output & Reports](#output--reports) |
19 | 29 | - [Localization](#localization) |
20 | | -- [Debian/Kali Packaging](#debiankali-packaging) |
21 | | -- [Command Overview](#command-overview) |
22 | | -- [Detailed Command Reference](#detailed-command-reference) |
23 | | -- [API Key Management](#api-key-management) |
24 | 30 | - [Troubleshooting](#troubleshooting) |
25 | | -- [Disclaimer](#disclaimer) |
26 | 31 | - [License](#license) |
27 | 32 |
|
28 | | - |
29 | 33 | ## Features |
30 | | -- Repository Analysis: Extracts repository metadata, statistics, language usage, and contributor breakdown. |
31 | | -- User Analysis: Profiles GitHub users, including activity, top repositories, and contribution patterns. |
32 | | -- Secret Scanning: Detects API keys, tokens, and sensitive data in recent commits and files. |
33 | | -- File History: Displays granular commit history for any file in a repository. |
34 | | -- Contributor Impact: Quantifies individual contributor impact based on code changes. |
35 | | -- Security Scoring: Evaluates repository security posture (branch protection, code scanning, etc.). |
36 | | -- Workflow & Content Auditing: Audits repository documentation, policies, and CI/CD workflows for best practices. |
37 | | -- API Key Security: Stores GitHub tokens securely with strict file permissions. |
38 | | -- Intelligent Rate-Limit Handling: Automatically pauses and retries when GitHub API quotas are hit. |
39 | 34 |
|
| 35 | +* **Intelligence Gathering:** Deep-dive into repository metadata, contributor impact, and historical anomalies. |
| 36 | +* **Security Auditing:** Score repository security posture, audit GitHub Actions workflows, and scan for secrets in commits/files. |
| 37 | +* **Dork Scanning:** Powerfully search public code using GitHub dorks to find sensitive exposures. |
| 38 | +* **User Profiling:** Analyze user activity patterns, potential anomalies, and contributions. |
| 39 | +* **Smart Rate-Limiting:** Handles API quotas automatically with intelligent pausing and retries. |
| 40 | +* **Localization:** Localization is currently available in English and Turkish, but the infrastructure is ready to expand to a wider range of languages through community contributions. |
40 | 41 |
|
41 | 42 | ## Installation |
42 | 43 |
|
43 | | -### On Kali Linux / Debian / Ubuntu |
44 | | - |
45 | | -**Recommended (Global) Installation:** |
46 | | -Install globally using [pipx](https://pypa.github.io/pipx/): |
| 44 | +### Kali Linux / Debian |
| 45 | +Download the latest `.deb` from [Releases](https://github.com/exc-analyzer/exc/releases) and run: |
| 46 | +```bash |
| 47 | +sudo dpkg -i exc-analyzer_1.3.0-1_all.deb |
| 48 | +sudo apt-get install -f # Fix dependencies if needed |
| 49 | +``` |
47 | 50 |
|
48 | | -```sh |
49 | | -python3 -m pip install pipx |
50 | | -python3 -m pipx ensurepath |
51 | | -pipx install exc-analyzer |
| 51 | +### Windows |
| 52 | +```bash |
| 53 | +pip install exc-analyzer |
52 | 54 | ``` |
| 55 | +*(Requires Python 3.7+)* |
53 | 56 |
|
54 | | -**Alternative (Local/Virtual Environment) Installation:** |
| 57 | +## Authentication |
55 | 58 |
|
56 | | -If you prefer to install only in your current directory (not globally), use a Python virtual environment: |
| 59 | +1. **Login:** |
| 60 | + ```bash |
| 61 | + exc login |
| 62 | + ``` |
| 63 | +2. **Authorize:** The tool will provide a code (and copy it to your clipboard). It will open your browser to GitHub activation. |
| 64 | +3. **Ready:** Paste the code, approve the permissions, and you are done! |
57 | 65 |
|
58 | | -```sh |
59 | | -python3 -m venv env |
60 | | -source env/bin/activate |
61 | | -pip install exc-analyzer |
62 | | -``` |
| 66 | +The token behaves like a standard GitHub App connection and is stored securely in your OS credential manager. |
63 | 67 |
|
64 | | -### On Windows |
65 | | -```sh |
66 | | -pip install exc-analyzer |
| 68 | +## Quick Start |
| 69 | + |
| 70 | +**1. Analyze a Repository:** |
| 71 | +```bash |
| 72 | +exc analysis torvalds/linux |
| 73 | +``` |
| 74 | +**2. Search for Sensitive Data (Dorks) (User's responsibility):** |
| 75 | +```bash |
| 76 | +exc dork-scan "filename:config.php 'db_password'" |
67 | 77 | ``` |
68 | 78 |
|
69 | | -### On macOS |
70 | | -```sh |
71 | | -brew install python3 |
72 | | -pip3 install exc-analyzer |
| 79 | +**3. Scan for Secrets:** |
| 80 | +```bash |
| 81 | +exc scan-secrets microsoft/vscode -l 20 |
73 | 82 | ``` |
74 | 83 |
|
75 | | -## Quick Start |
76 | | -1. Obtain a GitHub Personal Access Token ([instructions](https://github.com/settings/tokens)). |
77 | | - > **Note:** To avoid issues during analysis, ensure you grant all available permissions to the token. Insufficient permissions may cause errors or incomplete results. |
78 | | -2. Initialize your API key: |
79 | | - ```sh |
80 | | - exc key |
81 | | - ``` |
82 | | -3. Run your first analysis: |
83 | | - ```sh |
84 | | - exc analysis owner/repo |
85 | | - ``` |
| 84 | +### Information Gathering |
| 85 | +* **`analysis <owner>/<repo>`** - Get a comprehensive overview of repository health, stats, and top contributors. |
| 86 | +* **`user-a <username>`** - Analyze public profile, top languages, and activity summary. |
| 87 | +* **`contrib-impact <owner>/<repo>`** - Calculate impact scores for individual contributors to identify key maintainers. |
| 88 | +* **`file-history <owner>/<repo> <path>`** - View granular commit history for a specific file. |
| 89 | +
|
| 90 | +### Security & Auditing |
| 91 | +* **`security-score <owner>/<repo>`** - Evaluate repository security (branch protection, code scanning, security policies). |
| 92 | +* **`actions-audit <owner>/<repo>`** - Audit GitHub Actions workflows for dangerous triggers and insecure practices. |
| 93 | +* **`scan-secrets <owner>/<repo>`** - Fast scan of recent commits for credentials and tokens. |
| 94 | +* **`advanced-secrets <owner>/<repo>`** - Deep scan of current file contents and history for high-entropy secrets. |
| 95 | +* **`dork-scan <query>`** - Search GitHub for sensitive sensitive code patterns (dorks). Supports export. |
| 96 | +
|
| 97 | +### Anomaly Detection |
| 98 | +* **`commit-anomaly <owner>/<repo>`** - Detect suspicious commit times, mass deletions, or unusual messages. |
| 99 | +* **`user-anomaly <username>`** - Identify irregular activity spikes or behavioral outliers for a user. |
| 100 | +
|
| 101 | +### Content Audit |
| 102 | +* **`content-audit <owner>/<repo>`** - Check for essential community standards (LICENSE, CODE_OF_CONDUCT, CONTRIBUTING.md). |
| 103 | +
|
| 104 | +### Utilities |
| 105 | +* **`login`** - Log in with your GitHub account to start analyzing. |
| 106 | +* **`logout`** - Log out from your GitHub account. |
| 107 | +
|
| 108 | +## Output & Reports |
| 109 | +
|
| 110 | +Most commands support the `-o` or `--output` flag to save results to a file: |
| 111 | +
|
| 112 | +```bash |
| 113 | +# Save to a generated filename (e.g., analysis_owner_repo_date.txt) |
| 114 | +exc analysis owner/repo -o |
| 115 | +
|
| 116 | +# Save to a specific file |
| 117 | +exc dork-scan "password" -o results.txt |
| 118 | +``` |
86 | 119 |
|
87 | 120 | ## Localization |
88 | | -- EXC Analyzer currently ships with English (`en`) and Turkish (`tr`) interface strings. English remains the default when no preference is set. |
89 | | -- Override the language per invocation (and persist the choice) with `exc --lang tr ...` or `exc -L en ...`. |
90 | | -- Alternatively set `EXC_LANG=tr` (or rely on your shell's `LANG` variable) to influence the default without adding CLI flags. |
91 | | -- Language preferences are stored in `~/.exc/settings.json`. Delete or edit this file if you want to reset the remembered language. |
92 | | -- Missing translations automatically fall back to English so the CLI remains usable even if a key is not localized yet. |
| 121 | +
|
| 122 | +Switch languages dynamically using `--lang` or the environment variable: |
| 123 | +
|
| 124 | +* **English (Default):** `exc --lang en analysis owner/repo` |
| 125 | +* **Turkish:** `exc --lang tr analysis owner/repo` |
| 126 | +
|
| 127 | +*(Selection is remembered for future commands.)* |
93 | 128 |
|
94 | 129 | ## Debian/Kali Packaging |
95 | 130 | 1. Prerequisites (on Debian/Ubuntu/Kali): |
@@ -259,17 +294,11 @@ Note on storage and security: |
259 | 294 | - If OS credential storage is not available, EXC falls back to storing the token in a local file: `~/.exc/build.sec` (Linux/macOS) or `%USERPROFILE%\\.exc\\build.sec` (Windows). The app will attempt to set strict file permissions (0600) on Unix-like systems. |
260 | 295 | - Important: base64 is used for a simple file-obfuscation fallback and is not a replacement for proper encryption. File permission protections (0600) reduce exposure, but the most robust option is OS credential storage; EXC will prefer that when possible. |
261 | 296 |
|
262 | | - |
263 | 297 | ## Troubleshooting |
264 | | -- API Rate Limits: If you hit GitHub API rate limits, wait and retry later. Use a personal access token with sufficient permissions. |
265 | | -- Missing Output or Slow Results: Large repositories or high API usage may cause delays. Try reducing the number of results or commit range. |
266 | | -- Color Output Issues: If you do not see colored output, ensure your terminal supports ANSI colors (e.g., use modern terminals on Windows or Linux). |
267 | | -- Permission Errors: Ensure you have write access to your home directory for API key storage. |
268 | | - |
269 | | - |
270 | | -## Disclaimer |
271 | | -This tool is intended for professional security auditing, research, and authorized analysis only. Unauthorized use on systems or repositories you do not own or have explicit permission to analyze is strictly prohibited. The author assumes no liability for misuse or damage caused by this tool. |
272 | 298 |
|
| 299 | +* **Rate Limits:** If you hit API limits, the tool will automatically pause and retry. Using an authenticated token (`exc login`) increases your quota significantly. |
| 300 | +* **Colors:** If output looks strange, ensure your terminal supports ANSI colors. |
273 | 301 |
|
274 | 302 | ## License |
275 | | -See the [LICENSE](LICENSE) file for details. |
| 303 | +
|
| 304 | +MIT License. See `LICENSE` file for details. |
0 commit comments