$ 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
ซีดีถึง semgrep-rules/python
ทำ
cat ** /security/ ** / * .yaml >> semgrep_sec.yaml
cat ** /security/ * .yaml >> semgrep_sec.yaml ค้นหาและแทนที่ rules: ด้วย `` นอกเหนือจากอินสแตนซ์แรก
ฟอร์แมตด้วย ctrl+shift+i
แทนที่ simplesecurity/semgrep_sec.yaml ด้วยอันใหม่
ภาพรวมระดับสูงเกี่ยวกับวิธีการจัดระเบียบเอกสารจะช่วยให้คุณรู้ว่าจะมองหาบางสิ่งได้ที่ไหน:
"Slim" Build: ติดตั้ง Bandit, Dlint, Dodgy, Poetry และ Safety ด้วย pipx
pip install simplesecurityมิฉะนั้น:
pip install simplesecurity [ full ]มุ่งหน้าไปที่ https://pypi.org/project/simplesecurity/ สำหรับข้อมูลเพิ่มเติม
โปรแกรมนี้เขียนขึ้นสำหรับ Python Version 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 เพื่อทำให้อาคารส่วนใหญ่เป็นไปโดยอัตโนมัติ คำสั่งนี้สร้างเอกสารอัพเดตข้อกำหนด. 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 (ลิงค์)
เปิดบรรทัดคำสั่งและเปลี่ยนไดเรกทอรีเป็นที่ที่คุณต้องการโคลน
พิมพ์ 'git clone' ตามด้วย URL ในขั้นตอนที่ 2
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-github-to-github-desktop
MIT License Copyright (c) Fredhappyface (ดูใบอนุญาตสำหรับข้อมูลเพิ่มเติม)
ดูการเปลี่ยนแปลงสำหรับข้อมูลเพิ่มเติม
ชุมชนออนไลน์รวมถึงผู้คนจากภูมิหลังมากมาย ผู้สนับสนุน โครงการ มุ่งมั่นที่จะให้สภาพแวดล้อมที่เป็นมิตรปลอดภัยและเป็นมิตรสำหรับทุกคน โปรดดูจรรยาบรรณสำหรับข้อมูลเพิ่มเติม
ยินดีต้อนรับการมีส่วนร่วมโปรดดูแนวทางการสนับสนุนสำหรับข้อมูลเพิ่มเติม
ขอขอบคุณที่ปรับปรุงความปลอดภัยของโครงการโปรดดูนโยบายความปลอดภัยสำหรับข้อมูลเพิ่มเติม
ขอบคุณสำหรับการใช้โครงการนี้ฉันหวังว่ามันจะใช้กับคุณ โปรดทราบว่าผู้ที่เกี่ยวข้องกับโครงการมักจะทำเพื่อความสนุกสนานพร้อมกับภาระผูกพันอื่น ๆ (เช่นงานครอบครัว ฯลฯ ) โปรดดูนโยบายการสนับสนุนสำหรับข้อมูลเพิ่มเติม
เหตุผลทำหน้าที่เป็นแนวทางสำหรับกระบวนการต่าง ๆ เกี่ยวกับโครงการเช่นรูปแบบการกำหนดเวอร์ชันและรูปแบบการเขียนโปรแกรมที่ใช้ โปรดดูเหตุผลสำหรับข้อมูลเพิ่มเติม