Skip to main content

Sample Report

This is a real scan4secrets run you can reproduce in one command. It scans the examples/sample-app fixture that ships in the repo — a tiny, deliberately-insecure multi-language app — with --misconfig so you see both secret detection and the SAST vulnerability/misconfiguration engine in one report.

Everything here is fake

Every "secret" in the fixture is a generic placeholder — nothing authenticates. The values are intentionally non-vendor-shaped so the fixture is safe to commit and clone.

$ scan4secrets --version
scan4secrets 2.2.0

Download the report

The same run, in all seven formats:

FormatDownloadBest for
HTMLsast-sample-app.htmlCollapsible, self-contained — share with anyone
SARIFsast-sample-app.sarifGitHub Code Scanning, GitLab, Sonar, Defect Dojo
JSONsast-sample-app.jsonTooling / post-processing
JSONLsast-sample-app.jsonlSIEM / SOAR streaming, jq
CSVsast-sample-app.csvSpreadsheet triage
Excelsast-sample-app.xlsxPivot tables, exec summaries
PDFsast-sample-app.pdfCompliance evidence packets

👉 Open the HTML report for the best experience — each finding is an expandable card with the full detail.

Reproduce it

git clone https://github.com/m14r41/scan4secrets && cd scan4secrets
pip install -e .

# one command — secrets + vulnerabilities across the fixture
scan4secrets --path examples/sample-app --misconfig \
--report html sarif json jsonl csv excel pdf \
--output reports/sast-sample-app

That is exactly what the site runs to produce the files above (see examples/generate-sample-reports.sh).

What the run finds

24 findings — 7 secrets + 17 vulnerabilities.

SeverityCount
critical3
high9
medium10
low2
Total24

Secrets (7)

Detected by name-signal and context-aware structural rules — no vendor-shaped tokens required:

RuleFileWhat it caught
env-named-credential-assignment.envAM_CLIENT_SECRET, SESSION_SECRET, DATABASE_PASSWORD, ENCRYPTION_KEY — flagged on the credential-named key even at low entropy
basic-auth-credential.envbasic_auth = "…"
xml-secret-bearing-tagconfig/services.xmlsecret inside a nested <SMS_API_KEY><value>…</value> tag and a split <key>/<value> pair

The decoys AM_REDIRECT_URI (a URL) and LOG_LEVEL=debug are correctly not flagged.

Vulnerabilities (17)

Every vulnerability finding carries a CWE, an OWASP mapping, and paired vulnerable/secure code plus remediation and impact.

SeverityVulnerabilityCWELanguage / file
criticalOS Command InjectionCWE-78Python app.py
criticalOS Command InjectionCWE-78Node server.js
criticalKotlin OS Command InjectionCWE-78Kotlin Main.kt
highSQL InjectionCWE-89Python app.py
highSQL InjectionCWE-89Node server.js
highServer-Side Request ForgeryCWE-918Python app.py
highDisabled TLS Certificate VerificationCWE-295Python app.py
highPath TraversalCWE-22Python app.py
highReflected XSSCWE-79Node server.js
highXSS via dangerouslySetInnerHTMLCWE-79React Widget.jsx
highAndroid WebView addJavascriptInterfaceCWE-749Kotlin Main.kt
highRemote script piped to shell (curl | bash)CWE-494Dockerfile
mediumWeak Cryptographic Hash (MD5)CWE-327Python app.py
mediumOpen RedirectCWE-601Node server.js
mediumASP.NET debug enabledCWE-489web.config
mediumASP.NET customErrors offCWE-209web.config
mediumASP.NET request validation disabledCWE-20web.config

Note the taint gating in action: subprocess.run(["ping","-c","1","8.8.8.8"]) and requests.get(url, verify=True) in app.py are not flagged — only the dynamically-tainted sinks are.

How to read each format

HTML — the collapsible report

Open sast-sample-app.html in any browser. Each finding is an expandable card:

  • Summary line — severity badge, vulnerability/secret name, file:line, and (for vulnerabilities) the CWE.
  • Expanded — description, the vulnerable code, the secure-code fix, remediation, and technical & business impact; secret findings show the redacted value, entropy, and hash.
  • Controls: a filter box, severity/file/name sort, and expand/collapse-all. Theme-aware and fully self-contained (one file, no assets).

By default secret values are shown in full (paste-ready for a vendor PoC); add --mask to redact them for screenshots.

SARIF — code-scanning dashboards

Each finding is a result with a ruleId, physicalLocation (file + start line), a level (error for critical/high, warning for medium, note for low), and a properties block. Vulnerability results also carry the CWE and OWASP tags. Upload it:

- uses: github/codeql-action/upload-sarif@v3
with: { sarif_file: reports/sast-sample-app.sarif }

JSONL — grep / SIEM

One finding per line. Fastest to slice with jq:

jq -r 'select(.severity=="critical" or .severity=="high")
| [.severity, .rule_id, .file, .line] | @tsv' sast-sample-app.jsonl

JSON / CSV / Excel / PDF

json is the complete structured feed; csv and xlsx are spreadsheet-friendly (Excel adds a pivot summary sheet); pdf is a stable, ASCII-safe evidence packet for auditors. All carry the full vulnerability record (CWE, OWASP, vulnerable/secure code).

Gate CI on findings

The run above exits 0 regardless of count. Add a gate:

scan4secrets --path examples/sample-app --misconfig \
--report sarif --fail-on high --output reports/sast-sample-app

--fail-on high exits 1 if any finding is high or critical, while still writing the SARIF file so the dashboard upload runs.

Try your own code

Point --path at any repo. Secrets-only is the default; add --misconfig for the vulnerability engine, or --misconfig-only to scan for vulnerabilities without secrets. See Getting Started and the CLI Reference.