Git感知自动化程序分析工具
项目描述
[alpha] Git感知的CLI,用于在开发人员和CI工作流程中运行semgrep模式。
安装
需要Python 3.6+和Docker 19.03+。它可以在macOS和Linux上运行。
在Git项目目录中
$ pip3 install bento-headless
使用方法
升级
$ pip3 install --upgrade bento-headless
命令行选项
$ bentoh --help
Usage: bentoh [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
--version Show the version and exit.
Commands:
archive Suppress current findings.
check Checks for new findings.
To get help for a specific command, run `bentoh COMMAND --help`
在暂存差异上运行自定义semgrep
检查
有关如何编写自定义规则文件的详细信息,请参阅semgrep配置
vi .bento/semgrep.yml
bentoh check
将输出格式化为JSON
bentoh check -f json
在文件系统当前状态下运行
bentoh check --all
在目录中的暂存差异上运行
bentoh check src
忽略当前发现
bentoh archive
在暂存差异上运行公共semgrep检查
BENTO_REGISTRY=r/r2c.python bentoh check
从扩展运行检查
bentoh check -t gosec -t r2c.registry.latest
退出代码
bentoh check
可能以以下退出代码退出
0
:Bento运行成功且未发现错误2
:Bento运行成功但发现你的代码中有问题3
:Bento或其底层工具运行失败
扩展
bentoh
自带以下扩展
扩展 | 描述 |
---|---|
bandit | 在Python代码中查找常见的安全问题 |
dlint | 一个鼓励最佳编码实践并帮助确保Python代码安全的工具 |
eslint | 识别并报告JavaScript和TypeScript中的模式 |
flake8 | 在Python代码中查找常见的错误 |
gosec | 在Go代码中查找安全错误 |
hadolint | 在Docker文件中查找错误(需要Docker) |
r2c.boto3 | 检查Python中的AWS boto3库 |
r2c.flask | 检查Python Flask框架 |
r2c.jinja | 在Jinja模板中查找常见的安全问题 |
r2c.registry.latest | 运行r2c的检查注册表中的检查(实验性;需要Docker) |
r2c.requests | 检查Python Requests框架 |
shellcheck | 在shell脚本中查找错误(需要Docker) |
帮助和社区
需要帮助或想分享反馈?我们很高兴听取您的意见!
- 通过电子邮件发送至 support@r2c.dev
- 加入我们的社区Slack中的#general
- 提交问题或直接在GitHub上提交功能请求
我们不断推出新功能和改进。
许可证和法规
请参阅条款和隐私文件。
版权(c)r2c。
项目详情
下载文件
下载您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源分发
bento-headless-0.11.2.tar.gz (88.2 kB 查看散列)
构建分发
bento_headless-0.11.2-py3-none-any.whl (120.2 kB 查看散列)
关闭
bento-headless-0.11.2.tar.gz的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 0cb9281a3db27a329ec49bb6f5a844b2981353c37fbab5393c40a197e4794e35 |
|
MD5 | 2de494856a3715ca9a60a6cf0b74eb75 |
|
BLAKE2b-256 | d201f589e74576805405656941aa8f508300c3e819f19837d38f061e9e388793 |
关闭
bento_headless-0.11.2-py3-none-any.whl的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | c23189bc2f0ab7af1d3c354a0f4be2984b1a973e37565e3a44811abaf5bc8106 |
|
MD5 | cd33a34888da45534390f70d3e42eebf |
|
BLAKE2b-256 | 9e94cf7b092469ee2dc7be66ced43ea53e9b66413d4d846e0b2fcd850f4e3a89 |