<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lucas Oliveira</title>
    <description>The latest articles on DEV Community by Lucas Oliveira (@lvaoliveira).</description>
    <link>https://dev.to/lvaoliveira</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4231859%2Fba5a71b1-9b6a-4fbe-8a73-4c23d55110df.png</url>
      <title>DEV Community: Lucas Oliveira</title>
      <link>https://dev.to/lvaoliveira</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lvaoliveira"/>
    <language>en</language>
    <item>
      <title>Building Sonda: A Lightweight Static Analysis Tool in Rust</title>
      <dc:creator>Lucas Oliveira</dc:creator>
      <pubDate>Sat, 07 Nov 2026 10:06:19 +0000</pubDate>
      <link>https://dev.to/lvaoliveira/building-sonda-a-lightweight-static-analysis-tool-in-rust-4agn</link>
      <guid>https://dev.to/lvaoliveira/building-sonda-a-lightweight-static-analysis-tool-in-rust-4agn</guid>
      <description>&lt;p&gt;Static code analysis is an important part of modern software engineering. It helps teams identify potential bugs, security vulnerabilities, code smells, and maintainability issues before they reach production.&lt;/p&gt;

&lt;p&gt;But I’ve always wondered: does running static analysis really need to be complicated?&lt;/p&gt;

&lt;p&gt;There are excellent tools available, including SonarQube and Semgrep. However, depending on your requirements, adopting them can involve additional infrastructure, configuration, and ongoing maintenance.&lt;/p&gt;

&lt;p&gt;I wanted to explore a simpler approach.&lt;/p&gt;

&lt;p&gt;That’s how Sonda started.&lt;/p&gt;

&lt;p&gt;Today, I’m sharing version 0.2.1 of Sonda, an open-source static analysis tool written in Rust.&lt;/p&gt;

&lt;p&gt;And I’m looking for developers willing to put it to the test.&lt;/p&gt;

&lt;p&gt;What is Sonda?&lt;/p&gt;

&lt;p&gt;Sonda is a lightweight, CLI-first static code analysis tool designed to run locally or inside CI/CD pipelines.&lt;/p&gt;

&lt;p&gt;The core idea is straightforward:&lt;/p&gt;

&lt;p&gt;Download a binary, scan your repository, and get actionable results.&lt;/p&gt;

&lt;p&gt;No server, database, or Docker container is required for standalone analysis.&lt;/p&gt;

&lt;p&gt;For teams that want centralized results, analysis history, and quality gates, Sonda also provides an optional server component.&lt;/p&gt;

&lt;p&gt;The project is still in its early stages, but the foundation is already in place.&lt;/p&gt;

&lt;p&gt;Why Rust?&lt;/p&gt;

&lt;p&gt;I chose Rust because I wanted a tool that could be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fast: Efficiently analyze repositories without unnecessary overhead.&lt;/li&gt;
&lt;li&gt;Portable: Run as a native binary on Linux, macOS, and Windows.&lt;/li&gt;
&lt;li&gt;Reliable: Handle unexpected inputs without compromising the entire analysis.&lt;/li&gt;
&lt;li&gt;Maintainable: Support an extensible architecture as new analysis capabilities are introduced.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rust doesn’t automatically make software fast or reliable, of course. Those properties still depend on architectural decisions and implementation quality.&lt;/p&gt;

&lt;p&gt;And building Sonda has presented some interesting engineering challenges.&lt;/p&gt;

&lt;p&gt;Inside Sonda’s Architecture&lt;/p&gt;

&lt;p&gt;Sonda uses Tree-sitter for parsing source code and is organized as a Cargo workspace with separate components for the analysis engine, CLI, and server.&lt;/p&gt;

&lt;p&gt;Several architectural decisions have been particularly interesting.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Process Isolation for Safer Analysis&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Source code analysis involves processing input that may be malformed, unexpectedly large, or intentionally crafted to trigger problematic behavior.&lt;/p&gt;

&lt;p&gt;Rather than relying exclusively on threads, Sonda supports running analysis in isolated worker processes.&lt;/p&gt;

&lt;p&gt;This helps protect the main scanning process from failures occurring during analysis.&lt;/p&gt;

&lt;p&gt;The trade-off is additional complexity around process management and communication.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Deterministic Parallel Analysis&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Parallel processing can improve performance, but it also introduces challenges around reproducibility.&lt;/p&gt;

&lt;p&gt;I wanted Sonda to produce consistent results regardless of the number of workers or the order in which files are discovered.&lt;/p&gt;

&lt;p&gt;To support this, Sonda uses deterministic ordering when discovering files, collecting findings, and generating reports.&lt;/p&gt;

&lt;p&gt;This is particularly important in CI/CD environments, where inconsistent output can make comparisons and debugging unnecessarily difficult.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Efficient Tree-sitter Queries&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sonda uses Tree-sitter queries to identify patterns in source code.&lt;/p&gt;

&lt;p&gt;Instead of independently executing every rule query, enabled queries are combined by language and compiled when needed.&lt;/p&gt;

&lt;p&gt;This reduces repeated query execution and helps keep the analysis engine efficient.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keeping the Core Independent&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The analysis engine is separated from the CLI and server components.&lt;/p&gt;

&lt;p&gt;This allows the same analysis capabilities to support different workflows without coupling the core implementation to a particular interface or deployment model.&lt;/p&gt;

&lt;p&gt;It also creates a foundation for future improvements.&lt;/p&gt;

&lt;p&gt;What Sonda Doesn’t Do Yet&lt;/p&gt;

&lt;p&gt;I think it’s important to be transparent about the project’s limitations.&lt;/p&gt;

&lt;p&gt;Sonda currently focuses on syntactic and semantic analysis.&lt;/p&gt;

&lt;p&gt;It doesn’t yet provide full data-flow or taint analysis, meaning it may miss vulnerabilities or bugs that require tracking values across functions.&lt;/p&gt;

&lt;p&gt;It’s also not intended to claim feature parity with mature static analysis platforms.&lt;/p&gt;

&lt;p&gt;The goal is to build something useful, reliable, and progressively more capable, with feedback from developers helping determine what comes next.&lt;/p&gt;

&lt;p&gt;Why I’m Looking for Early Adopters&lt;/p&gt;

&lt;p&gt;Up to this point, much of Sonda’s development has been driven by my own experience and assumptions about developer tooling.&lt;/p&gt;

&lt;p&gt;But there’s a limit to what you can learn by testing a tool against your own repositories.&lt;/p&gt;

&lt;p&gt;I need developers to challenge those assumptions.&lt;/p&gt;

&lt;p&gt;I’m looking for people willing to install Sonda, run it against a real project, and share their experience.&lt;/p&gt;

&lt;p&gt;I’m especially interested in understanding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Was installation straightforward?&lt;/li&gt;
&lt;li&gt;Did the analysis identify useful issues?&lt;/li&gt;
&lt;li&gt;Were there false positives or unexpected results?&lt;/li&gt;
&lt;li&gt;How did it perform on your repository?&lt;/li&gt;
&lt;li&gt;What would prevent you from using it regularly?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You don’t need to contribute code.&lt;/p&gt;

&lt;p&gt;Even ten minutes of testing and a short GitHub issue describing your experience would be incredibly valuable.&lt;/p&gt;

&lt;p&gt;Try Sonda v0.2.1&lt;/p&gt;

&lt;p&gt;Sonda is available for Linux, macOS, and Windows.&lt;/p&gt;

&lt;p&gt;You can find installation instructions, documentation, and the source code here:&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/lvaoliveira/sonda" rel="noopener noreferrer"&gt;https://github.com/lvaoliveira/sonda&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Website: &lt;a href="https://sonda.sh" rel="noopener noreferrer"&gt;https://sonda.sh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you decide to give it a try, please share your findings through GitHub Issues or Discussions.&lt;/p&gt;

&lt;p&gt;I’m particularly interested in constructive criticism. If something doesn’t work, is confusing, or doesn’t provide value, that’s exactly the kind of feedback that can help improve the project.&lt;/p&gt;

&lt;p&gt;What’s Next?&lt;/p&gt;

&lt;p&gt;There are several directions I’d like to explore, including deeper analysis capabilities, improved developer experience, and better integration into existing workflows.&lt;/p&gt;

&lt;p&gt;But rather than building features based solely on assumptions, I want to learn from developers using Sonda on real codebases.&lt;/p&gt;

&lt;p&gt;That’s one of the reasons I decided to build it as an open-source project.&lt;/p&gt;

&lt;p&gt;If you’re interested in static analysis, Rust, or developer tooling, I’d love for you to take a look.&lt;/p&gt;

&lt;p&gt;And if you try Sonda, tell me what you think — especially what needs improvement.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>rust</category>
      <category>programming</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
