跳至正文
Wener Notes

gitleaks

约 1 分钟阅读
标签:安全命令行
    • MIT, Go
    • 检测 git 仓库中的敏感信息
bash
brew install gitleaks # macOS
apk add gitleaks      # Alpine
# docker pull zricethezav/gitleaks:latest

gitleaks git .
GITLEAKS_CONFIG=$PWD/gitleaks.toml gitleaks git .

# 也可以
GITLEAKS_CONFIG_TOML=`cat customgitleaks.toml`
yaml
# .pre-commit-config.yaml
repos:
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.24.2
    hooks:
      - id: gitleaks
  • SKIP=gitleaks to skip gitleaks check
  • .gitleaksignore
    • 配置 fingurepint 来 ignore
  • gitleaks.toml
    • 配置 allowlists

关联信息

反向链接、本文链接的其他页面和外部资料。

站内链接

  • pre-commit
    笔记 · pre-commit

    pre-commit/pre-commit · MIT, Python · 在 commit 前运行检查

参考资料

GitHub1 条
最近更新commit 330e326编辑