securegit 0.8.5

Zero-trust git replacement with 12 built-in security scanners, LLM redteam bridge, universal undo, durable backups, and a 50-tool MCP server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
# User Guide: Plugin Management

## Quick Start

### Install a Plugin

```bash
# From community registry
securegit plugin install gitleaks

# From GitHub URL
securegit plugin install https://github.com/securegit-plugins/gitleaks.git

# From local path
securegit plugin install ./my-custom-plugin
```

### Check for Updates

```bash
# Check all plugins
securegit plugin check-updates

# Check specific plugin
securegit plugin check-updates gitleaks
```

### Update Plugins

```bash
# Update all plugins
securegit plugin update --all

# Update specific plugin
securegit plugin update gitleaks

# Update security fixes only
securegit plugin update --security-only
```

## Understanding Plugin Versions

### Version Display

```bash
# List installed plugins with versions
securegit plugin list
```

**Output:**
```
Installed Plugins:

Built-in Plugins (5):
  ✓ secrets       1.0.0  Hardcoded secret detection
  ✓ patterns      1.0.0  Dangerous code patterns
  ✓ entropy       1.0.0  High entropy content detection
  ✓ binary        1.0.0  Binary file detection
  ✓ git-internals 1.0.0  Git repository threat scanning

External Plugins (4):
  ✓ gitleaks       8.22.0   (up to date)
    Secret detection with gitleaks
    Updated: 2 days ago

  ⚠ trivy-config   0.58.2   (update available: 0.60.0)
    Container/IaC misconfiguration scanner
    Updated: 15 days ago
    Behind: 12 commits

  🚨 semgrep        1.45.0   (SECURITY UPDATE: 1.52.0)
    Multi-language SAST scanner
    Updated: 45 days ago
    Behind: 87 commits
    Security: CVE-2026-1234 (HIGH)

  ✓ todo-scanner   1.0.0    (up to date)
    Development comment detection
    Updated: 1 day ago
```

### Version Information

```bash
# Detailed version info for a plugin
securegit plugin info gitleaks
```

**Output:**
```
Plugin: gitleaks

Current Version: 8.22.0
Latest Version:  8.22.0
Status:          Up to date ✓

Description:     Detect hardcoded secrets using gitleaks
Author:          SecureGit Community
License:         MIT
Repository:      https://github.com/securegit-plugins/gitleaks.git
Homepage:        https://github.com/gitleaks/gitleaks

Installed:       2026-01-27 (2 days ago)
Last Checked:    2026-01-29 (Today)
Last Updated:    2026-01-27 (2 days ago)

Git Information:
  Commit:        a1b2c3d4
  Branch:        main
  Remote:        https://github.com/securegit-plugins/gitleaks.git

Capabilities:
  File Types:    All text files
  Languages:     All
  Scan Phase:    Post-extract
  Severity:      Critical findings
  Performance:   ~50ms per file

Statistics:
  Total Scans:   142
  Findings:      23
  Last Run:      2026-01-29 10:30:00
```

## Staying Up to Date

### Daily Workflow

**Morning routine:**
```bash
# Start your day with a quick check
securegit plugin check-updates

# If updates available:
securegit plugin update --all
```

### Enable Automatic Checks

Edit `~/.config/securegit/config.toml`:

```toml
[plugins]
auto_update_check = true              # Check on startup
update_check_interval_hours = 24      # Once per day
notify_updates_available = true       # Show notification
```

With this enabled:
```bash
# Any securegit command shows update notifications
securegit scan /path/to/code

SecureGit Security Scan

ℹ 2 plugin updates available (1 security-critical)
  Run 'securegit plugin check-updates' for details

[Scan continues...]
```

### Security Update Alerts

Get immediate alerts for security-critical updates:

```toml
[plugins]
notify_security_advisories = true
block_scan_with_vulnerable_plugins = false  # Set to true to enforce updates
```

**With blocking enabled:**
```bash
securegit scan /path/to/code

❌ ERROR: Cannot scan with vulnerable plugins

Plugin 'semgrep' has a critical security vulnerability:
  CVE-2026-1234 (HIGH severity)
  Your version: 1.45.0
  Fixed in:     1.50.0

Update required before scanning:
  securegit plugin update semgrep

To scan anyway (not recommended):
  securegit scan --allow-vulnerable-plugins /path/to/code
```

## Understanding Changelogs

### View What Changed

```bash
# See what's new in an update
securegit plugin changelog semgrep
```

**Output:**
```
Changelog: semgrep 1.45.0 → 1.52.0

You are 87 commits behind the latest version.

🚨 CRITICAL SECURITY UPDATES (2):

  v1.50.0 (2026-01-25)
    CVE-2026-1234: Remote code execution via malicious rules
    ⚠ HIGH severity - Update immediately

    Impact: Malicious rule files could execute arbitrary code
    during parsing, potentially compromising your system.

    Mitigation: Upgrade to v1.50.0 or later.

  v1.48.0 (2026-01-20)
    CVE-2026-1235: Path traversal in rule loading
    ⚠ MEDIUM severity

✨ NEW FEATURES (8):

  v1.52.0 - Added 60 new JavaScript security rules
    • React hooks security patterns
    • Next.js API route vulnerabilities
    • Express.js input validation

  v1.51.0 - Parallel scanning (60% faster)
    • Multi-core utilization
    • Configurable worker count

  v1.49.0 - Python 3.12 support
    • New syntax patterns
    • Type hint security checks

  [Show 5 more features...]

🐛 BUG FIXES (15):

  v1.52.0 - Fixed false positives in React hooks
  v1.51.0 - Corrected regex matching edge cases
  v1.50.0 - Fixed crash when scanning binary files
  [Show 12 more fixes...]

⚡ PERFORMANCE IMPROVEMENTS (3):

  v1.51.0 - 60% faster on large codebases
    • Optimized pattern matching
    • Reduced memory allocations

  v1.49.0 - 35% memory usage reduction
    • Improved rule caching
    • Lazy loading of patterns

  v1.46.0 - Faster rule compilation

Recommendation: UPDATE IMMEDIATELY (security vulnerabilities)

Update command:
  securegit plugin update semgrep

Full git history:
  cd ~/.config/securegit/plugins/semgrep
  git log v1.45.0..v1.52.0
```

### Smart Changelog Summaries

SecureGit categorizes and prioritizes changes:

1. **Security fixes** - Always shown first, highlighted
2. **Breaking changes** - Important for CI/CD
3. **New features** - What you gain from updating
4. **Bug fixes** - What problems are resolved
5. **Performance** - Speed/memory improvements

### Get More Details

```bash
# Full git commit history
cd ~/.config/securegit/plugins/semgrep
git log

# Specific version range
git log v1.45.0..v1.52.0

# One-line summary
git log --oneline v1.45.0..v1.52.0

# Show file changes
git log --stat v1.45.0..v1.52.0
```

## Handling Updates

### Safe Update Process

**1. Check what will change:**
```bash
securegit plugin changelog semgrep
```

**2. Test in a sandbox first:**
```bash
# Create test directory
mkdir /tmp/plugin-test

# Update in test environment
SECUREGIT_CONFIG_DIR=/tmp/plugin-test securegit plugin update semgrep

# Test the update
SECUREGIT_CONFIG_DIR=/tmp/plugin-test securegit scan /path/to/test/code

# If successful, update production
securegit plugin update semgrep
```

**3. Update with confirmation:**
```bash
# Interactive mode (prompts before updating)
securegit plugin update --interactive
```

**Output:**
```
Update available for semgrep

Changes (1.45.0 → 1.52.0):
  🚨 2 security fixes (including CVE-2026-1234)
  ✨ 8 new features
  🐛 15 bug fixes
  ⚡ 60% faster performance

This update includes critical security fixes.

Proceed with update? [Y/n]: y

Updating semgrep...
✓ Downloaded v1.52.0
✓ Installed successfully
✓ Verified plugin integrity

Successfully updated semgrep to 1.52.0

Test the update:
  securegit scan --plugin semgrep /path/to/test
```

### Rollback if Needed

If an update causes problems:

```bash
# Rollback to previous version
securegit plugin rollback semgrep

# Rollback to specific version
securegit plugin rollback semgrep --to 1.45.0

# List available versions
securegit plugin versions semgrep
```

**Output:**
```
Rolling back semgrep from 1.52.0 to 1.45.0...

⚠ Warning: Version 1.45.0 has known security vulnerability CVE-2026-1234

Are you sure you want to rollback? [y/N]: y

Checking out version 1.45.0...
✓ Rollback complete

Reason for rollback (optional): New version causes false positives in our codebase

Rollback recorded for feedback to plugin maintainer.

Note: You are now running an outdated version with known vulnerabilities.
Consider reporting the issue and waiting for a fix rather than staying on old version.
```

## CI/CD Best Practices

### Pin Versions in CI

For reproducible builds, pin plugin versions:

**~/.config/securegit/config.toml** (in CI):
```toml
[plugins.gitleaks]
enabled = true
version = "8.22.0"            # Specific version
allow_auto_update = false     # Don't auto-update in CI

[plugins.semgrep]
enabled = true
version = "1.52.0"
allow_auto_update = false
```

**In CI pipeline:**
```yaml
# .github/workflows/security-scan.yml
- name: Security Scan
  run: |
    # Install specific versions
    securegit plugin install gitleaks --version 8.22.0
    securegit plugin install semgrep --version 1.52.0

    # Scan (won't auto-update)
    securegit scan . --fail-on high
```

### Update Pins Regularly

Don't let pinned versions get too old:

```bash
# Check how old your pins are
securegit plugin check-updates --show-pinned
```

**Output:**
```
Pinned Plugin Versions:

⚠ gitleaks pinned to 8.22.0
  Latest: 8.25.0
  Age: 45 days
  Status: 3 versions behind, no security issues

🚨 semgrep pinned to 1.52.0
  Latest: 1.60.0
  Age: 60 days
  Status: 8 versions behind, 1 SECURITY UPDATE

  CVE-2026-5678 (MEDIUM) fixed in v1.58.0
  Recommendation: Update pin to 1.60.0 or later

Update your pin in config.toml:
  [plugins.semgrep]
  version = "1.60.0"
```

### Scheduled CI Updates

Weekly job to check for updates:

```yaml
# .github/workflows/plugin-updates.yml
name: Check Plugin Updates
on:
  schedule:
    - cron: '0 9 * * 1'  # Monday 9am

jobs:
  check-updates:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Check for plugin updates
        run: |
          securegit plugin check-updates --json > updates.json

      - name: Create issue if security updates available
        if: contains(steps.check.outputs.*, 'security')
        uses: actions/github-script@v6
        with:
          script: |
            const updates = require('./updates.json');
            const security = updates.filter(u => u.security_advisory);

            if (security.length > 0) {
              github.rest.issues.create({
                owner: context.repo.owner,
                repo: context.repo.repo,
                title: `🚨 Security Updates Available for ${security.length} Plugin(s)`,
                body: formatUpdates(security),
                labels: ['security', 'dependencies']
              });
            }
```

## Troubleshooting Updates

### Update Fails

**Problem: Update download fails**
```
Error: Failed to download plugin update
Connection timeout
```

**Solution:**
```bash
# Check network connectivity
curl -I https://github.com

# Try with different mirror
securegit plugin update gitleaks --mirror https://mirror.example.com

# Manual download and install
curl -L https://github.com/gitleaks/gitleaks/releases/download/v8.22.0/gitleaks_8.22.0_linux_x64.tar.gz -o gitleaks.tar.gz
securegit plugin install ./gitleaks.tar.gz
```

**Problem: Checksum verification fails**
```
Error: Checksum mismatch
Expected: abc123...
Got:      def456...
```

**Solution:**
```bash
# Download may be corrupted, try again
securegit plugin update gitleaks --force-download

# If persistent, check for man-in-the-middle
curl -v https://github.com | grep -i ssl

# Verify checksum manually
sha256sum ~/.config/securegit/plugins/gitleaks/gitleaks
```

**Problem: Update breaks existing scans**
```
Error: Plugin execution failed
semgrep: invalid rule format
```

**Solution:**
```bash
# Rollback immediately
securegit plugin rollback semgrep

# Check if it's a configuration issue
securegit plugin verify semgrep

# Report bug to plugin maintainer
securegit plugin report-issue semgrep "Update to 1.52.0 breaks rule format"
```

### Version Conflicts

**Problem: Two plugins require different versions of a tool**
```
⚠ Version conflict detected

Plugin 'semgrep-custom' requires semgrep >= 1.50.0
Plugin 'legacy-scanner' requires semgrep <= 1.45.0

Cannot satisfy both requirements.
```

**Solution:**
```bash
# Option 1: Update legacy plugin
securegit plugin update legacy-scanner

# Option 2: Disable one plugin
securegit plugin disable legacy-scanner

# Option 3: Use plugin profiles
securegit scan --profile modern  # Uses semgrep 1.50.0+
securegit scan --profile legacy  # Uses semgrep 1.45.0
```

## Plugin Health Monitoring

### Check Plugin Health

```bash
securegit plugin health
```

**Output:**
```
Plugin Health Report

Overall Status: ⚠ Attention Needed

Built-in Plugins: ✓ Healthy (5/5)
External Plugins: ⚠ Issues (2/4)

Detailed Status:

✓ gitleaks
  Version: 8.22.0 (current)
  Last scan: 2 hours ago
  Success rate: 100% (142/142 scans)
  Avg execution time: 45ms

⚠ trivy-config
  Version: 0.58.2 (update available: 0.60.0)
  Last scan: 1 day ago
  Success rate: 98% (95/97 scans)
  Avg execution time: 120ms
  Note: 2 failed scans due to timeout

🚨 semgrep
  Version: 1.45.0 (SECURITY UPDATE REQUIRED)
  Last scan: 15 days ago
  Success rate: 100% (89/89 scans)
  Avg execution time: 2.3s
  Issue: CVE-2026-1234 vulnerability

✓ todo-scanner
  Version: 1.0.0 (current)
  Last scan: 3 hours ago
  Success rate: 100% (156/156 scans)
  Avg execution time: 18ms

Recommendations:
  1. Update semgrep immediately (security vulnerability)
  2. Update trivy-config to reduce timeouts
  3. All plugins functioning normally otherwise

Run 'securegit plugin update --all' to resolve issues.
```

### Set Update Reminders

```toml
[plugins.reminders]
enabled = true
check_interval_days = 7
notify_method = "terminal"  # terminal, email, webhook

# Custom reminder schedule per plugin
[plugins.reminders.semgrep]
check_interval_days = 1  # Check daily for critical tools
```

## Summary

### Daily Habits

- Run `securegit plugin check-updates` weekly
- Enable `auto_update_check = true` for notifications
- Review changelogs before updating
- Test updates before deploying to CI/CD

### Security Priorities

- Update security-critical plugins immediately
- Subscribe to security advisories
- Don't ignore update notifications
- Report issues if updates break functionality

### Best Practices

- Pin versions in CI/CD
- Test updates in staging first
- Keep update pins current (< 30 days old)
- Monitor plugin health regularly
- Rollback if needed, but don't stay on old versions

The goal: **Always run current, secure versions without breaking your workflow.**