用于自动程序分析的Gitaware实用程序
bento-headless的Python项目详细描述
[alpha]一个支持Git的CLI,用于在开发人员和CI工作流中运行semgrep模式。
Installation··Usage··Help & Community 在
安装
需要Python 3.6+和{a9}。它可以在macOS和Linux上运行。在
在Git项目目录中:
$ pip3 install bento-headless
使用
升级
^{pr2}$命令行选项
$ 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 Configuration
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
附带以下扩展:
Extension | Description |
---|---|
bandit | Finds common security issues in Python code |
dlint | A tool for encouraging best coding practices and helping ensure Python code is secure |
eslint | Identifies and reports on patterns in JavaScript and TypeScript |
flake8 | Finds common bugs in Python code |
gosec | Finds security bugs in Go code |
hadolint | Finds bugs in Docker files (requires Docker) |
r2c.boto3 | Checks for the AWS boto3 library in Python |
r2c.flask | Checks for the Python Flask framework |
r2c.jinja | Finds common security issues in Jinja templates |
r2c.registry.latest | Runs checks from r2c's check registry (experimental; requires Docker) |
r2c.requests | Checks for the Python Requests framework |
shellcheck | Finds bugs in shell scripts (requires Docker) |
帮助和社区
需要帮助还是想分享反馈?我们很想听到你的消息!在
- 请发送电子邮件至support@r2c.dev
- 加入我们的community Slack将军
- File an issue或{a14}直接在GitHub上
我们不断推出新功能和改进。在
许可证和法律
请参考terms and privacy document。在
在
版权所有r2c。 在
- 项目
标签: