Onam

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.

Three kinds of rule, two kinds of result
Three kinds of rule, two kinds of result

Languages

LanguageFile extensionsData-flow rulesCode-structure rulesPattern rules
Python.pyYesYes—
JavaScript.js .mjs .jsxYesYesYes
TypeScript.ts .tsxYes (shared with JavaScript)YesYes
Java.javaYesYesYes
C#.csYesYesYes
Go.goYesYesYes
Ruby.rbYesYes—
C.c .h—YesYes
C++.cpp .cxx .cc .hpp .hxx—YesYes

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

  1. 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.
  2. 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.
  3. 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 fromListed asSeverity cap
Data-flow or code-structure ruleSecurity issueNone — the rule's own severity
Pattern rule triaged as securityHotspot to reviewMedium
Pattern rule not yet triagedHotspot to reviewLow

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

FieldExample
File and lineapp/db/orders.py, line 88
Rulesql-injection-fstring
Severitycritical, high, medium or low
MessageWhat the rule found
CWE / OWASPCWE-89 · A03 Injection
Confidence and tierSecurity issue or hotspot
Code snippetA 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.