Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Check analysis v2 configuration #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,9 @@ $ grep vulnerability . -R -n | grep -v README
./run.py:7: # vulnerability: Broken Access Control
./run.py:9: # vulnerability: Security Misconfiguration
```
### Execute the following command to run Check Analysis V2
see documentation: https://docs.shiftleft.io/ngsast/build-rules-v2
Example:
```bash
sl check-analysis --v2 --source scan.1 --target scan.9 --app APPLICATION_NAME --config ./shiftleft.yml
```
83 changes: 83 additions & 0 deletions shiftleft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Documentation on using check analysis https://docs.shiftleft.io/cli/reference/check-analysis-v2
source:
branch: master
build_rules:
- id: allow-high-settings
finding_types:
- container
cvss_31_severity_ratings:
- high
threshold: 3
options:
num_findings: 3 # Return 3 findings
- id: build-rule-identifier
# The specific type of finding to which the build rule should be applied. Accepted values: vuln, secret, insight, oss_vuln, container. If you omit this parameter, ShiftLeft defaults to returning only vulnerabilities.
finding_types:
- vuln
- secret
- insight
- oss_vuln
- container
# Setting severity level (Critical, High, Medium, Low)
cvss_31_severity_ratings:
- high
- critical
# Do you want to focus on just one or more types?
# type:
# - Weak Random
# - Sensitive Data Leak
# - Deserialization
# - Directory Traversal
# - Sensitive Data Exposure
# - Remote Code Execution
# - Command Injection
# - Security Best Practices
# - Unsafe Reflection
# - Regex Injection
# - SQL Injection
# - XML External Entities
# - Template Injection
# - Cross-Site Scripting
# - JSON Injection
# - Potential SQL Injection
# - Potential Regex Injection
# - Header Injection
# - Security Misconfiguration
# - Deprecated Function Use
# - Mail Injection
# - Race Condition
# - Sensitive Data Usage
# - Open Redirect
# - Error Handling
# - HTTP to Database
# - HTTP to Model
# - LDAP Injection
# - Denial of Service
# - CRLF Injection
# - NoSQL Injection
# - Weak Hash
# - Session Injection
# - Server-Side Request Forgery
# - Prototype Pollution
# - Log Forging
# - XPath Injection
# - Insecure Authentication
# - Intent Redirection
# - Authentication Bypass
# - Weak Cipher
# - Crypto
# Focus by OWASP Category?
# owasp_2021_categories:
# - a01-broken-access-control
# - a02-cryptographic-failures
# - a03-injection
# - a04-insecure-design
# - a05-security-misconfiguration
# - a06-vulnerable-and-outdated-components
# - a07-identification-and-authentication-failures
# - a08-software-and-data-integrity-failures
# - a09-security-logging-and-monitoring-failures
# - a10-server-side-request-forgery-(ssrf)
threshold: 0
options:
num_findings: 10 # Return 10 findings