Skip to content

Commit 11dbe33

Browse files
committed
Rules and ignore added
Qwiet rules and gitignore added
1 parent 6fa33dc commit 11dbe33

File tree

3 files changed

+258
-0
lines changed

3 files changed

+258
-0
lines changed

.gitignore

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
*.DS_STORE
2+
.idea/
3+
.gitleaks_bin/
4+
repos/
5+
.vscode/
6+
.idea/
7+
.tox/
8+
.tool-versions
9+
venv/
10+
# Byte-compiled / optimized / DLL files
11+
__pycache__/
12+
*.py[cod]
13+
*$py.class
14+
15+
# C extensions
16+
*.so
17+
18+
# Distribution / packaging
19+
.Python
20+
build/
21+
develop-eggs/
22+
dist/
23+
downloads/
24+
eggs/
25+
.eggs/
26+
lib64/
27+
parts/
28+
sdist/
29+
var/
30+
wheels/
31+
pip-wheel-metadata/
32+
share/python-wheels/
33+
*.egg-info/
34+
.installed.cfg
35+
*.egg
36+
MANIFEST
37+
38+
# PyInstaller
39+
# Usually these files are written by a python script from a template
40+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
41+
*.manifest
42+
*.spec
43+
44+
# Installer logs
45+
pip-log.txt
46+
pip-delete-this-directory.txt
47+
48+
# Unit test / coverage reports
49+
htmlcov/
50+
.tox/
51+
.nox/
52+
.coverage
53+
.coverage.*
54+
.cache
55+
nosetests.xml
56+
coverage.xml
57+
*.cover
58+
*.py,cover
59+
.hypothesis/
60+
.pytest_cache/
61+
62+
# Translations
63+
*.mo
64+
*.pot
65+
66+
# Django stuff:
67+
*.log
68+
local_settings.py
69+
db.sqlite3
70+
db.sqlite3-journal
71+
72+
# Flask stuff:
73+
instance/
74+
.webassets-cache
75+
76+
# Scrapy stuff:
77+
.scrapy
78+
79+
# Sphinx documentation
80+
docs/_build/
81+
82+
# PyBuilder
83+
target/
84+
85+
# Jupyter Notebook
86+
.ipynb_checkpoints
87+
88+
# IPython
89+
profile_default/
90+
ipython_config.py
91+
92+
# pyenv
93+
.python-version
94+
95+
# pipenv
96+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
97+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
98+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
99+
# install all needed dependencies.
100+
#Pipfile.lock
101+
102+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
103+
__pypackages__/
104+
105+
# Celery stuff
106+
celerybeat-schedule
107+
celerybeat.pid
108+
109+
# SageMath parsed files
110+
*.sage.py
111+
112+
# Environments
113+
.env
114+
.venv
115+
env/
116+
venv/
117+
ENV/
118+
env.bak/
119+
venv.bak/
120+
121+
# Spyder project settings
122+
.spyderproject
123+
.spyproject
124+
125+
# Rope project settings
126+
.ropeproject
127+
128+
# mkdocs documentation
129+
/site
130+
131+
# mypy
132+
.mypy_cache/
133+
.dmypy.json
134+
dmypy.json
135+
136+
# Pyre type checker
137+
.pyre/
138+
.coverage
139+
reports/

shiftleft-python-demo.iml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$" />
6+
<orderEntry type="inheritedJdk" />
7+
<orderEntry type="sourceFolder" forTests="false" />
8+
</component>
9+
</module>

shiftleft.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
build_rules:
2+
- id: "No critical or high SAST findings"
3+
finding_types:
4+
- vuln
5+
cvss_31_severity_ratings:
6+
- critical
7+
- high
8+
threshold: 0
9+
- id: "Allow 0 secrets"
10+
finding_types:
11+
- secret
12+
threshold: 0
13+
options:
14+
num_findings: 10 # Return 10 sast findings
15+
- id: "No reachable SCA findings"
16+
finding_types:
17+
- oss_vuln
18+
cvss_31_severity_ratings:
19+
- critical
20+
- high
21+
threshold: 0
22+
options:
23+
reachable: true
24+
num_findings: 10 # Return 10 reachable sca findings
25+
- id: "No critical or high container findings"
26+
finding_types:
27+
- container
28+
cvss_31_severity_ratings:
29+
- critical
30+
- high
31+
threshold: 0
32+
options:
33+
num_findings: 10 # Return 10 container findings
34+
# The above rule is perhaps the most common in that it
35+
# is designed to be used with Pull Request and to block
36+
# new vulns from being introduced that aren't already on
37+
# the 'main' branch
38+
#
39+
# Below is enchalada with all the options shown
40+
#
41+
# ID is the name that will be reflected in the PR comments
42+
# - id: build-rule-enchalada
43+
# - vuln
44+
#. - oss_vuln
45+
# - secret
46+
# - insight
47+
# - container
48+
# Do you want to block ALL types by severity?
49+
# cvss_31_severity_ratings:
50+
# - critical
51+
# - high
52+
# - medium
53+
#. - low
54+
# Do you want to focus on just one or more types?
55+
# type:
56+
# - Weak Random
57+
# - Sensitive Data Leak
58+
# - Deserialization
59+
# - Directory Traversal
60+
# - Sensitive Data Exposure
61+
# - Remote Code Execution
62+
# - Command Injection
63+
# - Security Best Practices
64+
# - Unsafe Reflection
65+
# - Regex Injection
66+
# - SQL Injection
67+
# - XML External Entities
68+
# - Template Injection
69+
# - Cross-Site Scripting
70+
# - JSON Injection
71+
# - Potential SQL Injection
72+
# - Potential Regex Injection
73+
# - Header Injection
74+
# - Security Misconfiguration
75+
# - Deprecated Function Use
76+
# - Mail Injection
77+
# - Race Condition
78+
# - Sensitive Data Usage
79+
# - Open Redirect
80+
# - Error Handling
81+
# - HTTP to Database
82+
# - HTTP to Model
83+
# - LDAP Injection
84+
# - Denial of Service
85+
# - CRLF Injection
86+
# - NoSQL Injection
87+
# - Weak Hash
88+
# - Session Injection
89+
# - Server-Side Request Forgery
90+
# - Prototype Pollution
91+
# - Log Forging
92+
# - XPath Injection
93+
# - Insecure Authentication
94+
# - Intent Redirection
95+
# - Authentication Bypass
96+
# - Weak Cipher
97+
# - Crypto
98+
# Focus by OWASP Category?
99+
# owasp_category:
100+
# - a01-2021-broken-access-control
101+
# - a02-2021-cryptographic-failures
102+
# - a03-2021-injection
103+
# - a04-2021-insecure-design
104+
# - a05-2021-security-misconfiguration
105+
# - a06-2021-vulnerable-and-outdated-components
106+
# - a07-2021-identification-and-authentication-failures
107+
# - a08-2021-software-and-data-integrity-failures
108+
# - a09-2021-security-logging-and-monitoring-failures
109+
# - a10-2021-server-side-request-forgery-(ssrf)
110+

0 commit comments

Comments
 (0)