$ 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。
在線社區包括來自許多背景的人。該項目貢獻者致力於為所有人提供一個友好,安全和熱情的環境。請參閱《行為準則》以獲取更多信息。
歡迎捐款,請參閱貢獻指南以獲取更多信息。
感謝您提高項目的安全性,請參閱安全策略以獲取更多信息。
感謝您使用此項目,希望它對您有用。請注意,參與該項目的人經常與其他承諾(例如工作,家庭等)一起做到這一點。請參閱支持政策以獲取更多信息。
基本原理是有關項目託管方案和所使用的編程樣式等項目的各種過程的指南。有關更多信息,請參閱理由。