扫描Git仓库、检测是否存在key泄露的小工具——ggshield
作者:Sec-Labs | 发布时间:
项目介绍
ggshield是一个CLI应用程序,可以在你的本地环境或CI环境中运行,帮助你检测300多种秘密,以及其他潜在的安全漏洞或政策破坏。
ggshield通过py-gitguardian使用我们的公共API来扫描和检测文件和其他文本内容的潜在秘密。
只有元数据,如调用时间、请求大小和扫描模式会从使用ggshield的扫描中存储,因此秘密和政策破坏事件不会显示在你的仪表板上,你的文件和秘密不会被存储。
项目地址
https://github.com/GitGuardian/ggshield
安装
Mac电脑
使用Homebrew
你可以通过运行以下命令使用Homebrew安装ggshield。
$ brew install gitguardian/tap/ggshield
Linux软件包
Deb和RPM软件包在Cloudsmith上可用。
其他操作系统
使用pip
使用pip进行安装和更新
$ pip install ggshield
ggshield支持Python 3.7和更新的版本。
该软件包应在MacOS、Linux和Windows上运行。
更新
要更新ggshield,可以在pip安装命令中添加选项-U/--upgrade。
$ pip install -U ggshield
初始设置
要使用ggshield,你需要对GitGuardian服务器进行认证。要做到这一点,请使用ggshield auth login命令。该命令可以自动提供个人访问令牌并在本地工作站上进行配置。
你可以从 ggshield auth login 文档中了解更多信息。
或者,您可以手动创建个人访问令牌,您可以将其存储在 GITGUARDIAN_API_KEY 环境变量中以完成设置。
一旦完成这些,你就可以用ggshield secret scan repo /path/to/your/repo开始扫描版本库。
命令参考
Usage: ggshield [OPTIONS] COMMAND [ARGS]...
Options:
-c, --config-path FILE Set a custom config file. Ignores local and global
config files.
-v, --verbose Verbose display mode.
--allow-self-signed Ignore ssl verification.
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
api-status Show API status.
auth Commands to manage authentication.
install Install a pre-commit or pre-push git hook (local or global).
quota Show quotas overview.
secret Commands to work with secrets.
标签:工具分享, 敏感信息查询工具