Skip to main content

StaticCodeAudit — Product Summary

Level Beginner
Reading time ⏱ 10 min
words 2212
Topics overviewfeatures

StaticCodeAudit — Product Summary

Standalone compliance, security and code quality audit tool. Single self-contained binary. 100% offline. Enterprise-grade reports.

By CodeFixture | Prefix: SCA


Key Highlights

  • Single self-contained binary — no installation, no runtime, no dependencies on the target machine
  • 100% offline — no API calls, no network access, no cloud dependency, no telemetry
  • 465+ detection rules across 7 audit categories with OWASP/CWE/WCAG/ASVS mapping (Python, JS/TS, Java, C#, PHP, YAML)
  • Interactive HTML reports — standalone single-file with 12+ Chart.js visualizations
  • 4-language support — French, English, Spanish, German (report + console)
  • Historical comparison — automatic baseline tracking across 10 audits
  • CVE scanning — optional pip-audit + npm audit integration (local, offline)
  • White-label branding — configurable tool name, company, logo per project
  • ISO 27001 compliance matrix — maps findings to 93 Annex A controls across 4 themes
  • Report retention — configurable cleanup by count, days, or both modes
  • Git blame integration — resolves committer per finding for accountability
  • Interactive configuration — guided init and configure modes for easy setup
  • Demo mode--demo generates anonymized reports (paths, code, solutions redacted) for prospects and public sharing
  • Custom rule wizard--create-rule unified 7-step wizard: create or edit, duplicate check (name + pattern), full DSL (risk/solution/benefit/fix), 4 languages
  • Severity filter--severity CRITICAL,HIGH filters rules before scan; amber banner in report when active
  • Language badge — each finding displays its detected language (Python, JavaScript, YAML…) as a neutral badge
  • Language × severity chart — stacked bar chart crossing detected language with severity level
  • Custom rules architecturecustom-rules/ directory separate from the binary, never overwritten by updates
  • Detailed progress — dynamic [n/N] numbering calculated after rule loading, per-language and per-taint step messages

What It Does

StaticCodeAudit (SCA) is a static analysis tool that scans project source code for security vulnerabilities, architectural anti-patterns, UI/UX accessibility issues, and maintenance debt. It produces a self-contained HTML report with severity-grouped findings, interactive charts, health scoring, and historical trend analysis.

Workflow

1. ./staticcodeaudit-<platform> /path/to/project --init   # Initialize project (generates UUID + config)
2. ./staticcodeaudit-<platform> /path/to/project          # Run full audit
3. Open SCA-REPORT-*.html                                 # Review interactive report

<platform> is one of linux-x64, macos-arm64, macos-x64, windows-x64.

Each audit generates:

  • HTML Report (SCA-REPORT-{timestamp}.html) — standalone, printable, interactive
  • Demo Report (SCA-REPORT-{timestamp}-demo.html) — anonymized version for sharing (opt-in via --demo)
  • JSON Data (SCA-DATA-{timestamp}.json) — machine-readable, versioned (v3.4)
  • Baseline — stored for next audit comparison (new/resolved/persistent issues)

Detection Rules

465+ rules across 7 categories, each with risk assessment, solution guidance, and benefit description.

Security (~430 rules) — Weight: 3

Rule Severity Standard
SQL Injection (f-string, concat, ORM) HIGH OWASP A03, CWE-89
XSS (innerHTML, React, Angular, Vue, Svelte, Blade) HIGH CWE-79
JNDI Injection (Java — Log4Shell) CRITICAL ASVS 1.3.8, CWE-917
XPath Injection (Java, C#, PHP, Python) HIGH ASVS 1.2.7, CWE-643
SSTI — Server-Side Template Injection (Python, JS) HIGH ASVS 1.3.7, CWE-1336
SpEL injection (Spring) HIGH CWE-917
LDAP injection (C#) HIGH CWE-90
CSV Injection (formula injection) MEDIUM ASVS 1.2.10, CWE-1236
SMTP Injection (Python, PHP) MEDIUM ASVS 1.3.11, CWE-93
ReDoS — Regular Expression Denial of Service MEDIUM ASVS 1.3.12, CWE-1333
Format String Vulnerability MEDIUM ASVS 1.3.10, CWE-134
Hardcoded secrets HIGH CWE-798
Default Credentials (hardcoded) HIGH ASVS 6.3.2, CWE-798
Dangerous code execution (eval/exec) HIGH CWE-94
Debug mode enabled HIGH OWASP A05
Secret logged (f-string, argument, Java, C#, PHP) HIGH OWASP A09, CWE-532
Log Injection (CRLF) MEDIUM ASVS 16.3.2, CWE-117
HTTP without TLS MEDIUM OWASP A02
WebSocket without TLS (ws:// vs wss://) MEDIUM ASVS 4.4.1, CWE-319
Unsafe deserialization (Python, Java, C#, PHP) HIGH OWASP A08, CWE-502
Weak cryptography (MD5/SHA-1, Java, C#, PHP) HIGH CWE-328
Insufficient Key Size (RSA < 2048) MEDIUM ASVS 11.2.3, CWE-326
OS command injection (Python, Java, C#, PHP) HIGH CWE-78
Verbose exception (Python, Java, C#, PHP) MEDIUM CWE-209
Homebrew authentication HIGH CWE-287
Weak Password Policy (min < 8) MEDIUM ASVS 6.2.1, CWE-521
Security Questions (knowledge-based auth) LOW ASVS 6.4.2, CWE-640
Predictable session tokens HIGH CWE-330
JWT None Algorithm CRITICAL ASVS 9.1.2, CWE-345
JWT Hardcoded Secret HIGH ASVS 9.1.3, CWE-798
Dynamic import MEDIUM CWE-502
Insecure random (Math.random, Java, C#, PHP) MEDIUM CWE-330
Client-side auth (localStorage) HIGH CWE-602
Race condition (TOCTOU) MEDIUM CWE-367
XXE Injection (Java, C#, PHP) HIGH CWE-611
CSRF disabled (Spring) HIGH CWE-352
CORS permissive (Spring, C#) MEDIUM CWE-942
SSL bypass (Java, C#) HIGH CWE-295
Open redirect (Java, C#, PHP) MEDIUM CWE-601
File inclusion (PHP) HIGH CWE-98
File Upload without Validation MEDIUM ASVS 5.2.2, CWE-434
PHP-specific (extract, type juggling, mass assignment) MEDIUM-HIGH Various
PII logged (GDPR, 5 languages) HIGH GDPR Art. 5
Missing data retention (GDPR) MEDIUM GDPR Art. 5
Missing MFA (5 languages) MEDIUM CWE-308
Dockerfile (root user, unpinned base, COPY all) HIGH-MEDIUM CWE-250
Insecure local storage (tokens/secrets in localStorage) MEDIUM CWE-922
Missing CSP header (Flask, Django, Express) MEDIUM CWE-1021
Missing HSTS Header MEDIUM ASVS 3.4.1, CWE-523
Missing X-Content-Type-Options MEDIUM ASVS 3.4.4
Missing Referrer-Policy LOW ASVS 3.4.5
Missing Frame Protection (CSP/X-Frame-Options) MEDIUM ASVS 3.4.6, CWE-1021
PostMessage without Origin Check MEDIUM ASVS 3.5.5, CWE-346
Missing Subresource Integrity (SRI) LOW ASVS 3.6.1
SVG Scriptable Content (XSS) MEDIUM ASVS 1.3.4, CWE-79
GraphQL Introspection Enabled MEDIUM ASVS 4.3.2
GraphQL No Depth Limit MEDIUM ASVS 4.3.1, CWE-770
Hardcoded internal IP (RFC 1918) MEDIUM CWE-798
Exposed test endpoint (unprotected /test, /debug) MEDIUM CWE-489

Interface / UI (5 rules) — Weight: 1

Rule Severity
Inline styles in JavaScript LOW
Manual createElement usage LOW
Event listeners not cleaned LOW
DOM manipulation in loops LOW
Inline SVG in HTML LOW

User Experience / Accessibility (18 rules) — Weight: 1

Rule Severity Standard
Button without ARIA label MEDIUM WCAG 2.4.6
Input without label MEDIUM WCAG 1.3.1
Image without alt text MEDIUM WCAG 1.1.1
Positive tabindex MEDIUM WCAG 2.4.3
Focus outline removed MEDIUM WCAG 2.4.7
Autoplay media MEDIUM WCAG 1.4.2
Untranslated toast messages MEDIUM i18n
Ephemeral error toasts MEDIUM UX
Hardcoded UI string (i18n verification) MEDIUM i18n
Residual console.log LOW

Maintenance (22 rules) — Weight: 1

Rule Severity Standard
Unresolved TODO/FIXME/HACK/XXX LOW
Deprecated API usage (Python, Java, C#, PHP, JS) LOW CWE-477
Catch-all exception (Python, Java, C#, PHP) MEDIUM CWE-396
System.out.println (Java) LOW
Console.Write (C#) LOW
Error suppressor @ (PHP) LOW
Destructive without backup (DROP/TRUNCATE outside migrations) LOW ISO A.8.13
Local time usage (datetime.now() without timezone) LOW ISO A.8.17
Missing health check endpoint LOW ISO A.8.16
Unreviewed vendor code MEDIUM ISO A.5.22

Dependencies (3 rules) — Weight: 2

Rule Severity Standard
Vulnerable dependency (CVE) HIGH-CRITICAL OWASP A06
Unpinned dependency version HIGH CWE-1357
Non-compliant license MEDIUM

CI/CD (18 rules) — Weight: 2

Rule Severity Standard
pull_request_target_checkout HIGH CI-CD-01
GHA expression injection HIGH CI-CD-01
GHA excessive permissions MEDIUM CI-CD-05
GHA missing permissions MEDIUM CI-CD-05
GHA unguarded comment trigger MEDIUM CI-CD-01
Unpinned action version HIGH CI-CD-09
GitLab unsafe variables MEDIUM CI-CD-05
Workflow not in CODEOWNERS LOW CI-CD-05
gha_secret_in_log HIGH CWE-312
gha_deprecated_commands HIGH CVE-2020-15228
gha_artifact_poisoning MEDIUM CI-CD-09
gha_self_hosted_runner MEDIUM CI-CD-06
ci_curl_pipe_bash HIGH CI-CD-09
ci_insecure_download MEDIUM CWE-319
hardcoded_secret_cicd CRITICAL CI-CD-04 / CWE-798
docker_latest_tag LOW CI-CD-09
gitlab_allow_failure_security HIGH CI-CD-04
gitlab_script_secrets_echo HIGH CWE-312

Supported Languages

Language Extensions Rule Coverage
Python .py Security, Architecture, Maintenance
JavaScript .js, .jsx, .mjs Security, UI, UX
TypeScript .ts, .tsx Same rules as JavaScript
HTML .html, .htm, .vue, .svelte, .ejs, .hbs, .njk, .jinja, .jinja2, .twig, .liquid, .mustache, .phtml, .erb, .jsp, .asp, .aspx, .cshtml UI, UX/Accessibility
Java .java Security, Architecture, Maintenance
C# .cs Security, Architecture, Maintenance
PHP .php Security, Architecture, Maintenance
YAML .yml, .yaml CI/CD

Report Features

Sections (16 in total)

  1. Header — Project name, version, UUID, language flag, timestamp
  2. Table of Contents — Clickable grid with emoji icons
  3. Audit Parameters — Languages, scanned extensions, paths, exclude patterns, categories, mode
  4. CLI Options Used — Checklist of 16 options with status and descriptions
  5. Visualizations — 9 metric charts + 4 historical trend charts (incl. language × severity stacked bar)
  6. Summary Statistics — Cards: HIGH/MEDIUM/LOW counts, validations, test rate, timing
  7. Health Score — Logarithmic security score normalized by LOC, with severity penalties and color-coded progress bar
  8. Top 10 Problematic Files — Heatmap ranking
  9. Unit Tests — Pass/fail/error/skip counts with details
  10. Fixtures Validation — Detection accuracy results
  11. Dependencies — CVE scan results, unpinned packages (optional)
  12. SLA Compliance — Resolution delays and escalation rules by severity
  13. ISO 27001 Compliance Matrix — Mapping of findings to ISO/IEC 27001:2022 Annex A controls (93 controls, 4 themes)
  14. Findings by Severity — Grouped CRITICAL/HIGH/MEDIUM/LOW/INFO with code snippets, category badges, glossary links
  15. Validations by Category — Success messages (no issues found)
  16. Glossary — 36 acronyms with definitions (OWASP, ASVS, WCAG, CVE, CVSS, CWE, CSRF, XSS, SQL, SARIF, SBOM, ISO 27001, etc.)

Interactive Features

  • Resizable sidebar — Sticky TOC with drag-to-resize and localStorage persistence
  • Keyboard shortcuts — j/k navigation, Ctrl+Home
  • Collapsible sections — Click to expand/collapse findings
  • Print mode — One-click print-friendly layout
  • Chart.js visualizations — 12+ interactive charts with tooltips
  • Baseline comparison — New/resolved/persistent issues highlighted
  • Glossary cross-links — All acronyms throughout the report are clickable links to the glossary with tooltip preview

Report Autonomy

Every report is a single standalone HTML file:

  • All CSS, JavaScript, Chart.js embedded inline
  • Favicon and logo encoded as base64
  • No external files, no CDN, no network needed
  • Can be opened in any browser, shared as email attachment, archived

Compliance & Standards

Standard Coverage
OWASP Top 10 A01 (Broken Access Control), A02 (Cryptographic Failures), A03 (Injection), A05 (Security Misconfiguration), A06 (Vulnerable Components), A08 (Software Integrity), A09 (Security Logging)
OWASP CI/CD Top 10 CI-CD-01 (Insufficient Flow Control), CI-CD-05 (Insufficient PBAC), CI-CD-09 (Improper Artifact Integrity)
CWE CWE-78, CWE-79, CWE-89, CWE-90, CWE-94, CWE-98, CWE-209, CWE-250, CWE-287, CWE-295, CWE-308, CWE-328, CWE-330, CWE-352, CWE-367, CWE-396, CWE-477, CWE-502, CWE-532, CWE-601, CWE-602, CWE-611, CWE-798, CWE-917, CWE-922, CWE-942, CWE-1021, CWE-1357
WCAG 2.1 1.1.1 (Non-text Content), 1.3.1 (Info and Relationships), 1.4.2 (Audio Control), 2.4.3 (Focus Order), 2.4.6 (Headings and Labels), 2.4.7 (Focus Visible)
ISO/IEC 27001:2022 Annex A compliance matrix — 93 controls across 4 themes (Organizational, People, Physical, Technological). 44 controls covered by static analysis (~47.3% coverage). Organizational A.5: 10/37 (27%), Technological A.8: 34/34 (100%). 4 interactive charts (doughnut, bar, radar, stacked bar) with accordion per theme. Covers secure coding (A.8.28), cryptography (A.8.24), vulnerability management (A.8.8), authentication (A.8.5), access control (A.8.3), privilege management (A.8.18), cloud security (A.5.23), supply chain (A.5.21), monitoring (A.8.16), endpoint devices (A.8.1), web filtering (A.8.23), network segregation (A.8.22), clock sync (A.8.17), information backup (A.8.13), audit protection (A.8.34), etc.
GDPR Art. 5 (PII logging, data retention)
CVE Vulnerability scanning via pip-audit (Python) and npm audit (Node.js)

Internationalization

Language Console Report Glossary
French --script-lang fr reports.language: "fr" 36 terms
English --script-lang en reports.language: "en" 36 terms
Spanish --script-lang es reports.language: "es" 36 terms
German --script-lang de reports.language: "de" 36 terms

Every string in the tool is localized:

  • Console messages
  • Report text, labels, titles
  • Rule names, risk descriptions, solutions, benefits
  • Category names, severity labels, chart labels
  • Glossary terms, acronym definitions

CLI Reference

The CLI is organized into 3 argument groups.

Scan Options (common to all targets)

Option Description
project_path Target project path (default: .)
--quick, -q Quick mode — security rules only
--severity LEVELS Filter rules by severity, comma-separated (e.g. CRITICAL,HIGH). Default: all. Amber banner in report when active.
--lang {fr,en,es,de} Report and console language (default: en)
--list-rules List all audit rules by category

Output Options

Option Description
--fail-on-high Exit code 1 if HIGH vulnerabilities found (CI/CD integration)
--sarif Generate SARIF 2.1.0 export (GitHub Code Scanning, GitLab SAST)
--sbom Generate CycloneDX 1.5 SBOM export
--demo Generate anonymized demo report
--with-logs Save console output to log file in output directory
--quiet Silent console mode — only errors and final result shown

Client Features

Option Description
--init Create or modify audit.config.json (interactive)
--create-rule Create or edit a custom rule (interactive wizard)
--custom-rules-match Check custom rules vs custom fixtures coverage
--with-tests Auto-detect and run project unit tests
--with-deps Dependency vulnerability scan (pip-audit, npm audit)

Configuration

All configuration lives in audit.config.json at the project root. Generated by --init.

Key Sections

Section Purpose
brand Tool name, company name, prefix, custom logo
project UUID, name, version, description
languages Languages to audit: ["python", "javascript", "html"]
paths.include Directories to scan
paths.exclude Patterns to skip
categories Enable/disable + weight per category
rules.disabled List of rule keys to skip
reports Output dir, history dir, max history (10), language
tests Enable/disable, directory, custom pytest command
thresholds Max HIGH (0), max MEDIUM (10), min health (80%)
sla SLA by severity (delay, escalation)
fixtures Include generic fixtures (true/false)
retention Report cleanup: mode (count/days/both), max_count, max_days

White-Label Branding

{
  "brand": {
    "tool_name": "MyCompanyAudit",
    "company_name": "My Company",
    "prefix": "MCA",
    "logo": "assets/my-logo.svg"
  }
}

Customizes: report title, footer, output filenames, favicon, header logo.

UUID Project System

Each project gets a unique slug-based identifier on first --init:

  • Stored in projects/<slug>/ next to the binary (slug derived from the project name, e.g. projects/my-ia/; uuid8 suffix appended on collisions)
  • Decouples project location from fixture storage
  • Enables project-specific rules and fixtures
  • Tracks audit history (count, last audit date)

Performance

Mode Behavior
Cold run First audit on a project — full scan (no cache yet)
Warm run Subsequent audits — content-hash cache reuses unchanged file analyses, -71% duration vs cold
Incremental A single file edit re-scans only the changed file (cache hit rate >= 95%)

The cache is stored in .sca-cache/ inside the audited project. It can be deleted at any time to force a cold run, and is protected by HMAC-SHA256 against tampering.