Skip to content

Commit 953290d

Browse files
committed
feat(git): add secret scanner tooling
1 parent 985bdd1 commit 953290d

File tree

12 files changed

+1376
-6
lines changed

12 files changed

+1376
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
- Added a Git secret scanner that installs and runs Gitleaks, TruffleHog, and Git-Secrets in strict mode.
12+
- Git worktree scans now only include tracked, non-ignored files and print raw logs per scan.
13+
1014
### Fixed
1115
- Improved MCP list parsing to detect Gemini CLI entries with checkmarks and ANSI colors.
1216
- Added Gemini MCP settings migration to remove invalid `type` fields and map HTTP URLs.
1317
- Removed invalid `--env` option when adding Context7 MCP via Codex CLI.
1418
- Write Context7 HTTP headers into Codex config when a build-time API key is available.
1519
- Write GitHub MCP env values into Codex config when build-time credentials are available.
20+
- Added GitHub release fallback installs for Gitleaks and TruffleHog when package managers are missing packages.
1621

1722
## [0.1.0] - 2025-12-23
1823

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ Manages MCP servers for Claude, Codex, and Gemini CLI:
3737

3838
For Codex MCP installs, build-time values for `CONTEXT7_API_KEY`, `GITHUB_PERSONAL_ACCESS_TOKEN`, and `GITHUB_HOST` are written into `~/.codex/config.toml`, so runtime env vars aren't required.
3939

40+
### 4. Git Secret Scanner
41+
Quickly installs and runs strict scans against the current Git repo:
42+
- `gitleaks` (history + working tree)
43+
- `trufflehog` (history + working tree)
44+
- `git-secrets` (history + working tree)
45+
46+
Auto-install tries common package managers and `go install`, then falls back to GitHub releases (requires `curl`/`wget` and `tar`/`unzip`).
47+
Working tree scans only include Git-tracked files and skip anything ignored by `.gitignore`, with raw logs printed per scan.
48+
4049
## Installation
4150

4251
### via Install Script (Recommended - Linux/macOS)
@@ -79,7 +88,9 @@ cargo run
7988
Select a function from the menu:
8089
1. Clean Terraform/Terragrunt cache files
8190
2. Upgrade AI code assistant tools
82-
3. Manage MCP tools (Claude/Codex/Gemini)
91+
3. Upgrade Rust projects and toolchain
92+
4. Git secret scan (Gitleaks/TruffleHog/Git-Secrets)
93+
5. Manage MCP tools (Claude/Codex/Gemini)
8394

8495
## Contributing
8596

docs/README_ja.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ Claude、Codex、Gemini CLI 用の MCP サーバーを管理します:
3737

3838
Codex の MCP インストールでは、`CONTEXT7_API_KEY``GITHUB_PERSONAL_ACCESS_TOKEN``GITHUB_HOST` のビルド時の値を `~/.codex/config.toml` に書き込むため、実行時の環境変数は不要です。
3939

40+
### 4. Git シークレットスキャナー
41+
現在の Git リポジトリを厳格モードで素早くスキャンします:
42+
- `gitleaks`(Git 履歴 + ワーキングツリー)
43+
- `trufflehog`(Git 履歴 + ワーキングツリー)
44+
- `git-secrets`(Git 履歴 + ワーキングツリー)
45+
46+
自動インストールは一般的なパッケージマネージャーと `go install` を優先し、見つからない場合は GitHub Release から取得します(`curl`/`wget``tar`/`unzip` が必要です)。
47+
ワーキングツリーのスキャンは Git で追跡済みかつ `.gitignore` で除外されていないファイルのみ対象で、各スキャンの生ログを出力します。
48+
4049
## インストール
4150

4251
### インストールスクリプト経由 (推奨 - Linux/macOS)
@@ -79,7 +88,9 @@ cargo run
7988
機能メニューを選択してください:
8089
1. Terraform/Terragrunt キャッシュファイルのクリーニング
8190
2. AI コードアシスタントツールのアップグレード
82-
3. MCP ツールの管理 (Claude/Codex/Gemini)
91+
3. Rust プロジェクトとツールチェーンのアップグレード
92+
4. Git シークレットスキャン (Gitleaks/TruffleHog/Git-Secrets)
93+
5. MCP ツールの管理 (Claude/Codex/Gemini)
8394

8495
## 貢献
8596

docs/README_zh-CN.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@
3737

3838
对于 Codex MCP 安装,`CONTEXT7_API_KEY``GITHUB_PERSONAL_ACCESS_TOKEN``GITHUB_HOST` 的编译期值会写入 `~/.codex/config.toml`,运行时不需环境变量。
3939

40+
### 4. Git 机密扫描
41+
快速安装并以严格模式扫描当前 Git 项目:
42+
- `gitleaks`(Git 历史 + 工作树)
43+
- `trufflehog`(Git 历史 + 工作树)
44+
- `git-secrets`(Git 历史 + 工作树)
45+
46+
自动安装会先尝试常见包管理器与 `go install`,若找不到包则改用 GitHub Release(需要 `curl`/`wget``tar`/`unzip`)。
47+
工作树扫描仅包含 Git 已追踪且未被 `.gitignore` 排除的文件,并会输出每次扫描的原始 log。
48+
4049
## 安装
4150

4251
### 通过安装脚本 (推荐 - Linux/macOS)
@@ -79,7 +88,9 @@ cargo run
7988
选择功能菜单:
8089
1. 清理 Terraform/Terragrunt 缓存文件
8190
2. 升级 AI 代码助手工具
82-
3. 管理 MCP 工具(Claude/Codex/Gemini)
91+
3. 升级 Rust 项目与工具链
92+
4. Git 机密扫描(Gitleaks/TruffleHog/Git-Secrets)
93+
5. 管理 MCP 工具(Claude/Codex/Gemini)
8394

8495
## 贡献
8596

docs/README_zh-TW.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@
3737

3838
對 Codex MCP 安裝,`CONTEXT7_API_KEY``GITHUB_PERSONAL_ACCESS_TOKEN``GITHUB_HOST` 的編譯期值會寫入 `~/.codex/config.toml`,執行時不需環境變數。
3939

40+
### 4. Git 機密掃描
41+
快速安裝並以嚴格模式掃描目前的 Git 專案:
42+
- `gitleaks`(Git 歷史 + 工作樹)
43+
- `trufflehog`(Git 歷史 + 工作樹)
44+
- `git-secrets`(Git 歷史 + 工作樹)
45+
46+
自動安裝會先嘗試常見套件管理與 `go install`,若找不到套件則改用 GitHub Release(需 `curl`/`wget``tar`/`unzip`)。
47+
工作樹掃描僅包含 Git 已追蹤且未被 `.gitignore` 排除的檔案,並會輸出每次掃描的原始 log。
48+
4049
## 安裝
4150

4251
### 透過安裝腳本 (推薦 - Linux/macOS)
@@ -79,7 +88,9 @@ cargo run
7988
選擇功能選單:
8089
1. 清理 Terraform/Terragrunt 快取檔案
8190
2. 升級 AI 程式碼助手工具
82-
3. 管理 MCP 工具(Claude/Codex/Gemini)
91+
3. 升級 Rust 專案與工具鏈
92+
4. Git 機密掃描(Gitleaks/TruffleHog/Git-Secrets)
93+
5. 管理 MCP 工具(Claude/Codex/Gemini)
8394

8495
## 貢獻
8596

0 commit comments

Comments
 (0)