$ simplesecurity --help
usage: simplesecurity [-h] [--scan-dir SCAN_DIR] [--format FORMAT] [--plugin PLUGIN] [--file FILE] [--level LEVEL]
[--confidence CONFIDENCE] [--no-colour] [--high-contrast] [--fast] [--zero]
Combine multiple popular python security tools and generate reports or output
into different formats...
options:
-h, --help show this help message and exit
--scan-dir SCAN_DIR, -s SCAN_DIR
Pass a path to the scan directory (optional)
--format FORMAT, -f FORMAT
Output format. One of ansi, json, markdown, csv. default=ansi
--plugin PLUGIN, -p PLUGIN
Plugin to use. One of bandit, safety, dodgy, dlint, semgrep, all, default=all
--file FILE, -o FILE Filename to write to (omit for stdout)
--level LEVEL, -l LEVEL
Minimum severity/ level to show
--confidence CONFIDENCE, -c CONFIDENCE
Minimum confidence to show
--no-colour, -z No ANSI colours
--high-contrast, -Z High contrast colours
--fast, --skip Skip long running jobs. Will omit plugins with long run time (applies to -p all only)
--zero, -0 Return non zero exit code if any security vulnerabilities are found您也可以将其导入您自己的项目,并使用文档中的任何功能
克隆https://github.com/returntocorp/semgrep-rules
CD到semgrep-rules/python
做
cat ** /security/ ** / * .yaml >> semgrep_sec.yaml
cat ** /security/ * .yaml >> semgrep_sec.yaml查找并替换rules: ``除了第一例
用ctrl+shift+i重新格式化
用新的替换simplesecurity/semgrep_sec.yaml
关于如何组织文档的高级概述将帮助您知道在哪里寻找某些东西:
“ Slim”构建:安装Bandit,Dlint,Dodgy,Poetry and Pipx安全性
pip install simplesecurity否则:
pip install simplesecurity [ full ]前往https://pypi.org/project/simplesecurity/更多信息
该程序已为Python版本3.8-3.11编写,并已通过3.8和3.11进行了测试。
choco install python要安装Python,请访问https://www.python.org/downloads/windows/并下载最新版本。
sudo apt install python3.xsudo dnf install python3.xbrew install [email protected]要安装Python,请访问https://www.python.org/downloads/macos/并下载最新版本。
模块py -3.x -m [module]或[module] (如果模块安装脚本)
文件py -3.x [file]或./[file]
模块python3.x -m [module]或[module] (如果模块安装脚本)
文件python3.x [file]或./[file]
该项目使用https://github.com/fhpythonutils/fhmake来自动化大部分建筑物。此命令生成文档,更新oneviral.txt并构建库伪像
注意FHMake提供的功能可以通过以下
handsdown --cleanup -o documentation/reference
poetry export -f requirements.txt --output requirements.txt
poetry export -f requirements.txt --with dev --output requirements_optional.txt
poetry build可以进行fhmake audit以执行其他检查
用于使用诗歌使用的Python版本进行测试
poetry run pytest或者使用tox在Python 3.8-3.11上运行测试
tox按克隆或下载按钮右上角
复制URL(链接)
打开命令行,然后将目录更改为您希望克隆到的位置
在步骤2中输入“ git克隆”,然后在步骤2中进行URL
git clone https://github.com/FHPythonUtils/SimpleSecurity有关更多信息,请参见https://help.github.com/en/articles/cloning-a-repository
更多信息可以在https://help.github.com/en/desktop/contributing-to-projects/cloning-a-repository-from-gitrom-github-to-github-desktop
麻省理工学院许可证版权(C)Fredhappyface(请参阅许可证以获取更多信息。)
有关更多信息,请参见Changelog。
在线社区包括来自许多背景的人。该项目贡献者致力于为所有人提供一个友好,安全和热情的环境。请参阅《行为准则》以获取更多信息。
欢迎捐款,请参阅贡献指南以获取更多信息。
感谢您提高项目的安全性,请参阅安全策略以获取更多信息。
感谢您使用此项目,希望它对您有用。请注意,参与该项目的人经常与其他承诺(例如工作,家庭等)一起做到这一点。请参阅支持政策以获取更多信息。
基本原理是有关项目托管方案和所使用的编程样式等项目的各种过程的指南。有关更多信息,请参阅理由。