Open source · written in Rust · v0.1.0

Know your code. Beyond the surface.

Sonda is open-source static code analysis and quality gates in the spirit of SonarQube, as a single fast binary. It judges every change on its new code — and lets you sound from any metric straight down to the line that caused it.

~/payments
$sonda scan . --new-code origin/main
src/payments/refund.js
◆42:9 js/eqeqeqmajor · new
▲88:3 common/cognitive-complexitycritical
Lines of code 29,123 · Debt 8d 4h
Bugs 3 (1 new) · Coverage 71.3% (new 84.0%)
Quality gateFAILED
✗new_bugs > 0actual 1
✓new_coverage < 80actual 84
✓new_duplicated_lines_density > 3actual 0.4
→exit 1
The sonda web app’s Overview: where to focus first, code health, and gate pass rate across projectsThe sonda web app’s Overview: where to focus first, code health, and gate pass rate across projects
The web app’s Overview · sample data

Terminal output is abridged from a real report; the numbers are sample data.

Drill-down

Every number has a bottom. Sonda takes you there.

A falling coverage figure isn’t a task. Click any metric and Sonda lowers a line through your projects — project, component, file — until it reaches the issues behind it.

  1. Overviewdepth 1
    all projectsGate pass rate 81% · 253 of 312 passing.
  2. Projectdepth 2
    payments-platformGate failed on main · new_bugs > 0.
  3. Componentdepth 3
    services/Security level 1 of 5 · owner @checkout, from CODEOWNERS.
  4. Filedepth 4
    services/checkout/config.ts4 issues · coverage 38.6%.
  5. Issuedepth 5
    config.ts:14 — js/hardcoded-password■ Blocker · CWE-798 · on new code.
Features

Signals you can read at a glance — and defend in review.

No letter grades, no color-only warnings. Every state has a shape, a word and a reason.

Component-level analysis

Each top-level directory of a project gets its own issues, trend, debt and owners from CODEOWNERS.

services/3 critical
packages/12 smells
libs/Clean
scripts/No owner

Ratings as levels, not grades

Reliability, security and maintainability on a five-step meter. Height and color agree, so the scale reads without a legend.

Reliabilitylevel 4 of 5
Securitylevel 2 of 5
Maintainabilitylevel 3 of 5

Quality gates on new code

Set the conditions a change must meet. Sonda says which condition failed and by how much — and exits 1, so CI stops.

Gate · sonda defaultFailedCoverage on new code 54.0% < 80%

Severity you don’t need color to see

Each severity pairs a glyph with its label — legible in a terminal, a screenshot or for colorblind readers.

  • Blocker
  • Critical
  • Major
  • Minor
  • Info

Security in the same view

Vulnerabilities carry their CWE ids and OWASP Top 10 categories, and your lockfiles’ dependencies are checked against OSV advisories.

■ Blocker  src/config.ts:14
  Passwords should not be hard-coded
  CWE-798 · OWASP A07 · new code

Self-hosted, Rust-backed

One fast binary scans in parallel and never runs your code. The server keeps your source and findings on your own infrastructure.

EngineRust · tree-sitter
ServerDocker Compose + PostgreSQL
LicenseMIT or Apache-2.0
All features
How it works

From install to insight in four soundings.

Option 1 · start here

Sonda CLI

One binary. Scan on your laptop or in any CI, judge new code, fail the build on the gate. No server needed.

all commands ↗
  1. 01

    Install

    Build the CLI from the 0.1.0 tag. Without Rust, scripts/install-cli.sh builds a static Linux binary in Docker.

    cargo install --git https://github.com/lvaoliveira/sonda --tag v0.1.0 sonda
  2. 02

    Configure

    Write a commented sonda.toml with the default quality gate, then adjust it.

    sonda init
  3. 03

    Analyze

    Judge what changed since main. The gate decides the exit code: 0 passes, 1 fails.

    sonda scan . --new-code origin/main
  4. 04

    Report

    SARIF for GitHub code scanning, GitLab and IDEs, or JSON for your own tools.

    sonda scan . --format sarif -o sonda.sarif
Option 2 · when you want history

Sonda server

Self-hosted with Docker Compose. Keeps every analysis, with trends, triage, owners and results on GitHub pull requests, in the web app.

server guide ↗
  1. 01

    Start it

    From a checkout of the repository: Docker Compose and PostgreSQL, with its secrets created for you.

    scripts/setup-server.sh
  2. 02

    Sign in

    Open http://127.0.0.1:9000 and sign in as admin. The password is in secrets/admin_password.

  3. 03

    Connect a repository

    Paste its GitHub URL. Sonda creates the project, its token, and the CI workflow that uploads every analysis.

  4. 04

    Upload from anywhere

    Or send any scan yourself. The server’s gate then decides the exit code.

    sonda scan . --upload --server http://127.0.0.1:9000 --project app
Developer experience

Same analysis on your laptop and in the pipeline.

Analyze locally before you push, then let CI run the same scan and report the gate result. Without --new-code, Sonda picks the pull request’s base or the pushed commits on its own.

  • localScan before you push and read the results in the terminal.
  • pull requestThe same scan in CI judges the pull request’s changes; a failing gate exits 1.
  • serverUploads keep analyses per branch and pull request, with history, triage and owners.
.github/workflows/sonda.yml
name: sonda
on: [pull_request]
jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0  # sonda needs the base branch
      - run: cargo install --git https://github.com/lvaoliveira/sonda --tag v0.1.0 sonda
      - run: sonda scan .  # exits 1 when the gate fails
History

Every decision, written down.

Sonda is built in the open. Every architectural choice — how parsers are sandboxed, how new code is found, what a token may do — is written down as a public decision record before the code that follows it.

  • 466commits
  • 168merged pull requests
  • 23decision records
  • 2,022rules
As of 2 November 2026
  1. A scanner that treats every repository as hostile

    • First commit: a static analyzer with hardened input handling, a CLI and property tests. New code is computed from git objects, never by running git diff.
    • Parsing moves into worker processes, so a crashing grammar costs one file, then the workers sandbox themselves: seccomp on Linux, Seatbelt on macOS.
    • The workspace splits into sonda, sonda-core and sonda-server. Reports get stable fingerprints, sonda upload sends them, and the server takes its first analyses.
  2. The server becomes the product

    • The web app moves onto real data: Overview, Issues and drill-downs, then Projects, Analyses, Components, Security and Quality gates. Owners come from CODEOWNERS.
    • Users, roles and sign-in throttling. SonarQube rule parity becomes the goal, and the first JavaScript rule batches land.
    • Every rule gets its CWE ids and OWASP Top 10 categories. SBOMs from lockfiles, OSV advisory sync and a dependency gate follow.
    • New code gets a sensible default and a period on the server; coverage goes per file, per branch and per function.
  3. Tokens, triage and supply chain

    • The default gate fails on new dependencies with a blocker or critical vulnerability. Yarn, pnpm, Bun and Pipfile lockfiles are read.
    • sonda scan --upload, and user, analysis and service tokens.
    • Security review replaces hotspots: false positives and accepted issues leave the counts and the gate, and CI follows the server’s verdict.
    • Rule batches for JavaScript, Java and Python; C# and regular-expression analysis are designed.
  4. C#, and a catalog past a thousand rules

    • C# support lands, followed by thirteen batches of C# rules alongside Java’s. The catalog climbs past 1,400 rules in a day.
    • Rule settings, project settings and rule profiles live on the server, and the scanner applies them: Quality profiles and per-project Rules pages.
    • Observability: request ids, JSON logs and Prometheus metrics. Pages work on narrow screens; CI and tests get faster.
  5. v0.1.0

    Pull requests, and the first release

    • Pull request analyses are kept apart from branches, and their results are posted to GitHub pull requests.
    • Types from the platform’s declarations make more C# rules exact; #pragma and [SuppressMessage] suppress as Roslyn does.
    • Connecting a repository from the web app, a setup script for the server, and HTTPS on a LAN.
    • The plan for 1.0 is written down, and 0.1.0 is tagged.
Read the changelog
Roadmap

The road to 1.0.

1.0 is a promise: upgrading within 1.x doesn’t break anyone. The features it needs are few — most of the work left is proving what’s built.

  1. M0

    0.1.0

    in progress

    The first tagged release: binaries with checksums on a release page, docs pointing at the tag.

  2. M1

    The stability promise

    planned

    What 1.0 promises written down — CLI, sonda.toml, report formats, the upload protocol — and enforced by a compatibility job in CI.

  3. M2

    Safe upgrades

    planned

    Every release upgrades a server full of real data in CI and checks nothing is lost. Retention and storage growth documented.

  4. M3

    Release hardening

    planned

    Binaries for Linux, macOS and Windows, a server image on GHCR, provenance attestations and SBOMs — all from a tag, nothing by hand.

  5. M4

    Proven in real use

    started

    Four weeks on real repositories in every language, findings compared with SonarQube’s on the same commit, performance measured.

  6. M5

    Security

    planned

    The server’s threat model, a full security review, and private CAs for uploads.

  7. M6

    What the product still needs

    planned

    Pull request decoration that follows triage, no page flicker, and every roadmap item marked before or after 1.0.

SonarQube rule parity

against SonarQube 26.7 ↗
JavaScript419 / 461 exact
TypeScript439 / 481 exact
Python384 / 397 exact
Java691 / 703 exact
C#394 / 446 exact
  • GitLab and Bitbucket

    Pull request decoration beyond GitHub: summary comment, inline comments and a status check.

  • Single sign-on

    OpenID Connect with PKCE. Designed, deferred.

  • AI auto-fix

    Fixes and missing tests proposed as draft pull requests, verified by a re-scan, merged by a person.

  • Reachability

    Rank vulnerabilities by whether a public entry point reaches them.

  • Regex analysis

    Read patterns as patterns: syntax, language and backtracking rules.

  • Deeper semantics

    The rest of the semantic layer: more binders, expression typing, overloads.

  • Teams and trends

    Teams as owners of projects, and the health score’s change over time.

  • More coverage formats

    JaCoCo and Cobertura next to LCOV.

  • More languages

    Go, Rust, PHP, Ruby and Kotlin.

Read the plan for 1.0
Open source

Built in the open. Every rule is readable.

A tool that judges your code should be open to judgment itself. Sonda’s analyzers, rules and roadmap are developed on GitHub under MIT or Apache-2.0, and contributions of every size are welcome.

Better code starts with understanding it.