Skip to content

Commit b58398c

Browse files
committed
Added v0.0.4
1 parent b579ef6 commit b58398c

File tree

3 files changed

+774
-56
lines changed

3 files changed

+774
-56
lines changed

README.md

Lines changed: 113 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
- 🎯 Filter repositories by creation, update, or push dates
1111
- 🚫 Exclude forked repositories
1212
- 🔔 Send verified secret alerts to Discord
13+
- 🔄 Secret deduplication (prevents duplicate notifications for the same secret)
14+
- 💾 Track detected secrets in `~/.config/gitxpose/detected-secrets.txt`
1315

1416
🎨 **Beautiful Terminal Output**
1517
- Colorized and formatted output
@@ -18,9 +20,16 @@
1820
- Easy-to-read repository listings
1921

2022
**Performance**
21-
- Parallel repository cloning
23+
- **Parallel repository cloning** with auto-scaling based on system resources
24+
- **Parallel API page fetching** for faster repository discovery
25+
- **Parallel repository analysis** (commits, code extraction, vulnerability scanning)
26+
- **Parallel commit processing** within each repository
27+
- **Auto-detection of system resources** (CPU cores, RAM) for optimal performance
28+
- **Configurable parallelism** at multiple levels (API, analysis, commits)
2229
- Configurable request delays
2330
- Efficient credential detection
31+
- Secret deduplication to prevent duplicate notifications
32+
- **Expected speedup:** 4-8x faster for large organizations (200+ repos)
2433

2534
## Prerequisites
2635

@@ -41,9 +50,9 @@ go install github.com/rix4uni/gitxpose@latest
4150

4251
### Option 2: Download prebuilt binaries
4352
```
44-
wget https://github.com/rix4uni/gitxpose/releases/download/v0.0.4/gitxpose-linux-amd64-0.0.4.tgz
45-
tar -xvzf gitxpose-linux-amd64-0.0.4.tgz
46-
rm -rf gitxpose-linux-amd64-0.0.4.tgz
53+
wget https://github.com/rix4uni/gitxpose/releases/download/v0.0.5/gitxpose-linux-amd64-0.0.5.tgz
54+
tar -xvzf gitxpose-linux-amd64-0.0.5.tgz
55+
rm -rf gitxpose-linux-amd64-0.0.5.tgz
4756
mv gitxpose ~/go/bin/gitxpose
4857
```
4958

@@ -89,10 +98,20 @@ discord:
8998
discord_webhook_url: "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
9099
```
91100
101+
**Note:** Secrets are automatically deduplicated. If the same secret is detected multiple times, only the first detection will trigger a Discord notification. All detected secrets are tracked in `~/.config/gitxpose/detected-secrets.txt`.
102+
92103
## Usage
93104

94105
```yaml
95106
Usage of gitxpose:
107+
-analysis-parallel int
108+
Parallelism for repository analysis (0 = auto-detect based on system resources)
109+
-api-parallel int
110+
Parallelism for API requests (default: 1, 0 = auto-detect / 2)
111+
-auto-scale
112+
Enable automatic scaling based on system resources (default: true)
113+
-commit-parallel int
114+
Parallelism for commit processing (0 = auto-detect / 2)
96115
-created string
97116
Filter repos created within duration (e.g., 1h, 7d, 1m, 1y)
98117
-date string
@@ -101,20 +120,27 @@ Usage of gitxpose:
101120
Delay duration between requests (default "-1ns")
102121
-id string
103122
Send verified vulnerabilities to Discord
123+
-max-parallel int
124+
Maximum parallelism (0 = auto-detect based on system resources)
104125
-no-fork
105126
Exclude forked repositories
106127
-output string
107-
Directory to save the output (default "/root/.gitxpose/")
128+
Directory or file to save the output (default: "~/.gitxpose/")
129+
If directory doesn't exist, it will be created automatically
108130
-parallel int
109-
Number of repositories to clone in parallel (default 10)
131+
Number of repositories to clone in parallel (default: 10, 0 = auto-detect)
110132
-pushed string
111133
Filter repos pushed within duration
112134
-scan-repo string
113135
Type of scan: org, member, or user (required)
136+
-silent
137+
Silent mode (suppress banner)
114138
-token string
115-
Path to the file containing GitHub tokens (default "/root/.config/gitxpose/github-token.txt")
139+
Path to the file containing GitHub tokens (default: "~/.config/gitxpose/github-token.txt")
116140
-updated string
117141
Filter repos updated within duration
142+
-version
143+
Print the version of the tool and exit
118144
```
119145

120146
## Examples
@@ -163,11 +189,73 @@ echo "username" | gitxpose --scan-repo user --date 7d
163189
echo "username" | gitxpose --scan-repo user --parallel 20
164190
```
165191

192+
**Custom output directory:**
193+
```yaml
194+
echo "username" | gitxpose --scan-repo user --output my-results/
195+
```
196+
197+
**Auto-scaling performance (uses all CPU cores):**
198+
```yaml
199+
echo "username" | gitxpose --scan-repo user --auto-scale
200+
```
201+
202+
**Manual parallelism control:**
203+
```yaml
204+
echo "username" | gitxpose --scan-repo user --max-parallel 16 --api-parallel 4 --analysis-parallel 8 --commit-parallel 4
205+
```
206+
207+
**Disable auto-scaling and use fixed parallelism:**
208+
```yaml
209+
echo "username" | gitxpose --scan-repo user --auto-scale=false --parallel 5
210+
```
211+
212+
**Silent mode (no banner):**
213+
```yaml
214+
echo "username" | gitxpose --scan-repo user --silent
215+
```
216+
166217
**Combine multiple filters:**
167218
```yaml
168-
echo "username" | gitxpose --scan-repo user --no-fork --updated 30d --date 7d --id allvuln
219+
echo "username" | gitxpose --scan-repo user --no-fork --updated 30d --date 7d --id allvuln --output results/
169220
```
170221

222+
### Performance Tuning
223+
224+
**Auto-scaling (Recommended):**
225+
By default, gitxpose automatically detects your system's CPU cores and scales parallelism accordingly. This is optimal for most use cases:
226+
227+
```yaml
228+
echo "username" | gitxpose --scan-repo user --auto-scale
229+
```
230+
231+
**Manual Control:**
232+
For fine-grained control, you can set parallelism at different levels:
233+
234+
```yaml
235+
# Limit maximum parallelism
236+
echo "username" | gitxpose --scan-repo user --max-parallel 8
237+
238+
# Control specific operations
239+
echo "username" | gitxpose --scan-repo user \
240+
--api-parallel 2 \
241+
--analysis-parallel 4 \
242+
--commit-parallel 2 \
243+
--parallel 4
244+
```
245+
246+
**Disable Auto-scaling:**
247+
To use fixed parallelism values:
248+
249+
```yaml
250+
echo "username" | gitxpose --scan-repo user --auto-scale=false --parallel 5
251+
```
252+
253+
**Performance Tips:**
254+
- For large organizations (100+ repos), enable auto-scaling for best performance
255+
- Use multiple GitHub tokens for better rate limiting
256+
- Increase `--analysis-parallel` for CPU-bound systems
257+
- Increase `--api-parallel` for faster repository discovery (be mindful of rate limits)
258+
171259
### Time Duration Formats
172260

173261
- **Seconds:** `50s`
@@ -181,10 +269,11 @@ echo "username" | gitxpose --scan-repo user --no-fork --updated 30d --date 7d --
181269

182270
## Output Structure
183271

272+
### Default Output (no -output flag)
184273
```yaml
185274
~/.gitxpose/
186275
└── username/
187-
├── fetchrepo.json # Repository metadata
276+
├── username_repo.json # Repository metadata
188277
├── repo1/
189278
│ ├── commits.txt # List of commit hashes
190279
│ ├── code/ # Commit contents
@@ -196,6 +285,21 @@ echo "username" | gitxpose --scan-repo user --no-fork --updated 30d --date 7d --
196285
└── ...
197286
```
198287

288+
### Custom Output Directory (with -output flag)
289+
```yaml
290+
your-output-dir/
291+
└── username/
292+
├── username_repo.json # Repository metadata
293+
├── repo1/
294+
│ ├── commits.txt
295+
│ ├── code/
296+
│ └── vuln/
297+
└── repo2/
298+
└── ...
299+
```
300+
301+
**Note:** When using `-output`, all files (JSON, cloned repos, code, commits, vuln scans) are saved to the specified directory. If the directory doesn't exist, it will be created automatically.
302+
199303
## Output Example
200304

201305
```yaml

banner/banner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
// prints the version message
8-
const version = "v0.0.4"
8+
const version = "v0.0.5"
99

1010
func PrintVersion() {
1111
fmt.Printf("Current gitxpose version %s\n", version)

0 commit comments

Comments
 (0)