AlloyPlane/gitguard

AlloyPlane★ 1Python最后同步: 2026-08-17

在 GitHub 打开

Git security upload guard: auto secret/risk scan before commit & push (git hooks) + optional LLM deep review (L2/L3)

README 摘要

gitguard — Git Security Upload Guard / Git 安全上传防护 中英双语 · Bilingual MIT License Inspired by the L1/L2/L3 layered security idea popularized by AI coding assistants (e.g. Qoder). gitguard 让本机 所有 git 仓库 在提交/推送前自动做安全扫描,并支持 LLM 深度安全审查。 gitguard adds an automatic security scan before every git commit / push on your machine, plus optional LLM-powered deep security review (L2/L3). ✨ Features / 特性 EN 中文 L1 rule scan (automatic) — pre-commit / pre-push hooks scan staged/all files against security-patterns.yaml (14 rules: API keys, AWS, private keys, SQL-injection, eval, …) and block risky commits/pushes L1 规则扫描(自动) — pre-commit / pre-push 钩子按 security-patterns.yaml (14 条规则:密钥/AWS/私钥/SQL注入/eval…)扫描暂存区/全库,命中 拦截 L2/L3 LLM review (manual) — review reviews diff / commit range / whole repo with any OpenAI-compatible model, outputting severity + fix advice L2/L3 LLM 审查(手动) — review 用任意 OpenAI 兼容模型审查 diff / 提交范围 / 全仓库,输出严重级别+修复建议 Global — core.hooksPath protects every repo on the machine 全局生效 — core.hooksPath 使本机所有仓库自动防护 Zero dependency — pure Python stdlib, cross-platform 零依赖 — 纯 Python 标准库,跨平台 Interactive model choice — 1) current model from your config, 2) custom (address / key / model) 交互选模型 — ① …

在 GitHub 查看完整 README →
工具/开发deepseekdevsecopsdshdsh-plugingitgit-hooksllmpre-commit

分类