Static analysis (SAST)
Application code is scanned by Onam's own static analysis engine. It reads each file into a syntax tree and runs three kinds of rules, all written and maintained by Onam, then grades every result by how much its rule can prove. No third-party rule packs are used.
Languages
| Language | File extensions | Data-flow rules | Code-structure rules | Pattern rules |
|---|---|---|---|---|
| Python | .py | Yes | Yes | — |
| JavaScript | .js .mjs .jsx | Yes | Yes | Yes |
| TypeScript | .ts .tsx | Yes (shared with JavaScript) | Yes | Yes |
| Java | .java | Yes | Yes | Yes |
| C# | .cs | Yes | Yes | Yes |
| Go | .go | Yes | Yes | Yes |
| Ruby | .rb | Yes | Yes | — |
| C | .c .h | — | Yes | Yes |
| C++ | .cpp .cxx .cc .hpp .hxx | — | Yes | Yes |
The same scan also checks files that are not application code: GitHub Actions workflows (script injection, unpinned actions, risky triggers), Terraform (public network exposure, old TLS, credentials written in the file, encryption switched off), npm and yarn config, and HTML templates (unescaped output, unquoted attributes, scripts loaded without an integrity check). Terraform is also checked by the separate IaC checks.
PHP, Kotlin, Rust, Swift and Scala are not analysed today.
The three kinds of rule
- Data-flow rules — follow untrusted input (a request parameter, a header, a file) to a dangerous call (a query, a shell, a file path, an outbound request), and stay quiet when the value passes through a sanitiser first. They follow the value within a single function: input that enters in one function and reaches the dangerous call in another is not traced. Data-flow rules exist for Python, JavaScript/TypeScript, Java, C#, Go and Ruby.
- Code-structure rules — match the shape of the code in its syntax tree rather than its text: a security setting switched off, a weak algorithm, a call that is unsafe whatever its input. Because they understand the code, comments and strings do not trigger them.
- Reviewed pattern rules — broader text patterns, each triaged by hand into security, code-quality, accessibility or not-applicable. Only the security ones run; the rest are dropped before a scan.
Every rule carries its own CWE, OWASP category and severity, and has test files that show what it must and must not report.
Secret patterns and the checks on GitHub Actions workflows, Terraform, npm config and HTML templates are Onam rules too. They are listed as security issues when the file itself shows the problem (a literal key, a setting switched off), and as hotspots when the risk depends on where a value comes from.
Severity follows evidence
| Result from | Listed as | Severity cap |
|---|---|---|
| Data-flow or code-structure rule | Security issue | None — the rule's own severity |
| Pattern rule triaged as security | Hotspot to review | Medium |
| Pattern rule not yet triaged | Hotspot to review | Low |
This is the core design choice: a pattern match cannot show that untrusted input reaches the code it matched, so it is never allowed to outrank a finding that can.
What is skipped
Before scanning, the clone is pruned of node_modules, vendor, build output, static and documentation folders, minified *.min.js files and any file over 512 KB. That keeps third-party code — covered by dependency analysis — out of the static results.
What each finding carries
| Field | Example |
|---|---|
| File and line | app/db/orders.py, line 88 |
| Rule | sql-injection-fstring |
| Severity | critical, high, medium or low |
| Message | What the rule found |
| CWE / OWASP | CWE-89 · A03 Injection |
| Confidence and tier | Security issue or hotspot |
| Code snippet | A few lines of context |
Limits worth knowing
- Analysis is per scan of one branch. There is no incremental or changed-files-only mode.
- Custom rules cannot be added from the console.
- Data-flow analysis works within a single function. A flaw where untrusted input enters in one function and reaches a dangerous call in another is not traced; where a code-structure or pattern rule matches the call itself, it is still reported.
Engine change in October 2026
Static analysis moved from the open-source Semgrep engine, with community rule packs, to Onam's own engine and Onam's own rules. Onam's engine has been the default for every language since 25 October 2026. Rule names did not change: existing findings keep the rule name they had. The first scan of each repository after the switch can still show a different number of findings from the scan before it:
- Some findings disappear. The old community rule packs are switched off, so results that only those packs produced are gone.
- Some findings are new. 145 new Onam rules, including rules for secrets, GitHub Actions workflows, Terraform, npm config and HTML templates, find things the old setup did not.
- A few findings change severity or list. A result can move between security issue and hotspot when Onam's engine can prove more, or less, than the old one.
Nothing you need to do: each scan already produces a fresh list, so there is no old status to carry over. Compare the first scan after the switch against the one before it, not against the trend line.