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

Fix sarif test case #1079

Merged
merged 2 commits into from
Dec 6, 2021
Merged
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
90 changes: 90 additions & 0 deletions .automation/test/sarif_reports/PYTHON_BANDIT.sarif
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"runs": [
{
"tool": {
"driver": {
"name": "Bandit",
"rules": [
{
"id": "B110",
"name": "try_except_pass",
"helpUri": "https://bandit.readthedocs.io/en/latest/plugins/b110_try_except_pass.html"
}
]
}
},
"invocations": [
{
"executionSuccessful": true,
"endTimeUtc": "2021-12-06T10:23:18Z"
}
],
"properties": {
"metrics": {
"_totals": {
"loc": 4,
"nosec": 0,
"SEVERITY.UNDEFINED": 0.0,
"CONFIDENCE.UNDEFINED": 0.0,
"SEVERITY.LOW": 1.0,
"CONFIDENCE.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
"SEVERITY.HIGH": 0.0,
"CONFIDENCE.HIGH": 1.0
},
"/github/workspace/python_bad_1.py": {
"loc": 4,
"nosec": 0,
"SEVERITY.UNDEFINED": 0.0,
"SEVERITY.LOW": 1.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.HIGH": 0.0,
"CONFIDENCE.UNDEFINED": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
"CONFIDENCE.HIGH": 1.0
}
}
},
"results": [
{
"message": {
"text": "Try, Except, Pass detected."
},
"level": "note",
"locations": [
{
"physicalLocation": {
"region": {
"snippet": {
"text": "except:\n"
},
"startLine": 3
},
"artifactLocation": {
"uri": "file:///github/workspace/python_bad_1.py"
},
"contextRegion": {
"snippet": {
"text": " pass\nexcept:\n pass\n"
},
"endLine": 4,
"startLine": 2
}
}
}
],
"properties": {
"issue_confidence": "HIGH",
"issue_severity": "LOW"
},
"ruleId": "B110",
"ruleIndex": 0
}
]
}
],
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.4.json"
}
280 changes: 280 additions & 0 deletions .automation/test/sarif_reports/REPOSITORY_GITLEAKS.sarif
Original file line number Diff line number Diff line change
@@ -0,0 +1,280 @@
{
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "gitleaks",
"semanticVersion": "v8.0.0",
"rules": [
{
"id": "",
"name": "AWS Access Key",
"shortDescription": {
"text": "(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"
}
},
{
"id": "",
"name": "AWS Secret Key",
"shortDescription": {
"text": "(?i)aws(.{0,20})?(?-i)['\\\"][0-9a-zA-Z\\/+]{40}['\\\"]"
}
},
{
"id": "",
"name": "AWS MWS key",
"shortDescription": {
"text": "amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
}
},
{
"id": "",
"name": "Facebook Secret Key",
"shortDescription": {
"text": "(?i)(facebook|fb)(.{0,20})?(?-i)['\\\"][0-9a-f]{32}['\\\"]"
}
},
{
"id": "",
"name": "Facebook Client ID",
"shortDescription": {
"text": "(?i)(facebook|fb)(.{0,20})?['\\\"][0-9]{13,17}['\\\"]"
}
},
{
"id": "",
"name": "Twitter Secret Key",
"shortDescription": {
"text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{35,44}['\\\"]"
}
},
{
"id": "",
"name": "Twitter Client ID",
"shortDescription": {
"text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{18,25}['\\\"]"
}
},
{
"id": "",
"name": "Github Personal Access Token",
"shortDescription": {
"text": "ghp_[0-9a-zA-Z]{36}"
}
},
{
"id": "",
"name": "Github OAuth Access Token",
"shortDescription": {
"text": "gho_[0-9a-zA-Z]{36}"
}
},
{
"id": "",
"name": "Github App Token",
"shortDescription": {
"text": "(ghu|ghs)_[0-9a-zA-Z]{36}"
}
},
{
"id": "",
"name": "Github Refresh Token",
"shortDescription": {
"text": "ghr_[0-9a-zA-Z]{76}"
}
},
{
"id": "",
"name": "LinkedIn Secret Key",
"shortDescription": {
"text": "(?i)linkedin(.{0,20})?[0-9a-z]{16}"
}
},
{
"id": "",
"name": "Slack",
"shortDescription": {
"text": "xox[baprs]-([0-9a-zA-Z]{10,48})?"
}
},
{
"id": "",
"name": "Asymmetric Private Key",
"shortDescription": {
"text": "-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----"
}
},
{
"id": "",
"name": "Google API key",
"shortDescription": {
"text": "AIza[0-9A-Za-z\\\\-_]{35}"
}
},
{
"id": "",
"name": "Google (GCP) Service Account",
"shortDescription": {
"text": "\"type\": \"service_account\""
}
},
{
"id": "",
"name": "Heroku API key",
"shortDescription": {
"text": "(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
}
},
{
"id": "",
"name": "MailChimp API key",
"shortDescription": {
"text": "(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}"
}
},
{
"id": "",
"name": "Mailgun API key",
"shortDescription": {
"text": "((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}"
}
},
{
"id": "",
"name": "PayPal Braintree access token",
"shortDescription": {
"text": "access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}"
}
},
{
"id": "",
"name": "Picatic API key",
"shortDescription": {
"text": "sk_live_[0-9a-z]{32}"
}
},
{
"id": "",
"name": "SendGrid API Key",
"shortDescription": {
"text": "SG\\.[\\w_]{16,32}\\.[\\w_]{16,64}"
}
},
{
"id": "",
"name": "Slack Webhook",
"shortDescription": {
"text": "https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}"
}
},
{
"id": "",
"name": "Stripe API key",
"shortDescription": {
"text": "(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}"
}
},
{
"id": "",
"name": "Square access token",
"shortDescription": {
"text": "sq0atp-[0-9A-Za-z\\-_]{22}"
}
},
{
"id": "",
"name": "Square OAuth secret",
"shortDescription": {
"text": "sq0csp-[0-9A-Za-z\\\\-_]{43}"
}
},
{
"id": "",
"name": "Twilio API key",
"shortDescription": {
"text": "(?i)twilio(.{0,20})?SK[0-9a-f]{32}"
}
},
{
"id": "",
"name": "Dynatrace ttoken",
"shortDescription": {
"text": "dt0[a-zA-Z]{1}[0-9]{2}\\.[A-Z0-9]{24}\\.[A-Z0-9]{64}"
}
},
{
"id": "",
"name": "Shopify shared secret",
"shortDescription": {
"text": "shpss_[a-fA-F0-9]{32}"
}
},
{
"id": "",
"name": "Shopify access token",
"shortDescription": {
"text": "shpat_[a-fA-F0-9]{32}"
}
},
{
"id": "",
"name": "Shopify custom app access token",
"shortDescription": {
"text": "shpca_[a-fA-F0-9]{32}"
}
},
{
"id": "",
"name": "Shopify private app access token",
"shortDescription": {
"text": "shppa_[a-fA-F0-9]{32}"
}
},
{
"id": "",
"name": "PyPI upload token",
"shortDescription": {
"text": "pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}"
}
}
]
}
},
"results": [
{
"message": {
"text": " has detected secret for file gitleaks_bad_01.txt."
},
"ruleId": "",
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "gitleaks_bad_01.txt"
},
"region": {
"startLine": 0,
"startColumn": 21,
"endLine": 0,
"endColumn": 40,
"snippet": {
"text": "AROA47DSWDEZA3RQASWB"
}
}
}
}
],
"partialFingerprints": {
"commitSha": "",
"email": "",
"author": "",
"date": "",
"commitMessage": ""
}
}
]
}
]
}
Empty file.
1 change: 1 addition & 0 deletions .automation/test/sarif_reports/TERRAFORM_CHECKOV.sarif
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json", "version": "2.1.0", "runs": [{"tool": {"driver": {"name": "Checkov", "version": "2.0.630", "informationUri": "https://checkov.io", "rules": [], "organization": "bridgecrew"}}, "results": []}]}
Loading