<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Sonar Blog]]></title><description><![CDATA[Sonar Blog]]></description><link>https://www.sonarsource.com</link><image><url>https://www.sonarsource.com/favicon.ico</url><title>Sonar Blog</title><link>https://www.sonarsource.com</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 15:15:02 GMT</lastBuildDate><atom:link href="https://www.sonarsource.com/rss/blog.xml" rel="self" type="application/rss+xml"/><item><title><![CDATA[The next State of Code developer survey is open]]></title><description><![CDATA[Join the State of Code developer survey to help measure how AI generated code, agents, and evolving review practices are affecting development teams.]]></description><link>https://www.sonarsource.com/blog/the-next-state-of-code-developer-survey-is-open/</link><guid isPermaLink="false">en:74856f4a-a805-4ab6-b530-7bb8a88aca88</guid><dc:creator><![CDATA[Anirban Chatterjee]]></dc:creator><pubDate>Tue, 08 Sep 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;We&amp;#x27;re opening the call for responses for our next State of Code developer survey, and we want to hear from you.&lt;/p&gt;&lt;p&gt;Last year, &lt;a href=&quot;https://www.sonarsource.com/the-state-of-code/developer-survey-report/&quot;&gt;more than 1,100 professionals told us&lt;/a&gt; what AI coding actually looks like day to day. Your answers surfaced findings that shaped an industry conversation: 42% of committed code was AI-generated, only 48% of software developers always verified AI output before committing, and reviewing AI code often took more effort than reviewing a colleague&amp;#x27;s. That data exposed important trends. This round goes deeper.&lt;/p&gt;&lt;h2&gt;What this survey is about&lt;/h2&gt;&lt;p&gt;The next Developer Survey will explore harder questions about &lt;em&gt;what happens to all that AI code once it&amp;#x27;s written.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Agents have changed the shape of work since our last survey. More code arrives in every pull request, more of it arrives at once, and the review step is under pressure it wasn&amp;#x27;t designed for. We want the ground truth from the people living it.&lt;/p&gt;&lt;h2&gt;Questions we&amp;#x27;re asking&lt;/h2&gt;&lt;p&gt;This round focuses on what happens after code gets written. We&amp;#x27;re exploring topics like&lt;/p&gt;&lt;ul&gt;&lt;li&gt;What percentage of AI-authored changes reach production with no separate human review at all? &lt;/li&gt;&lt;li&gt;When AI reviews AI, is the same model that wrote the code grading its own work? &lt;/li&gt;&lt;li&gt;How has the split between writing and reviewing shifted since agents arrived? &lt;/li&gt;&lt;li&gt;Are the productivity gains still climbing, or have they quietly plateaued? &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Together, these questions tell us whether verification is keeping pace with generation, or falling behind it.&lt;/p&gt;&lt;h2&gt;Add your data to the record&lt;/h2&gt;&lt;p&gt;It only takes about 20 minutes to contribute. Your insights will help us build the next State of Code report, intended to provide a data-driven compass for developers navigating AI adoption.&lt;/p&gt;&lt;p&gt;At Sonar, we believe all code should meet the same quality and security standards, whether written by human or agent. Understanding real-world practices helps us see how these standards can remain effective as AI writes more and more code.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://repdata.decipherinc.com/survey/selfserve/53b/082665601?list=99&amp;amp;s=1&quot;&gt;&lt;strong&gt;Take the survey&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Thanks for helping us define the real state of code!&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Four new languages arrive in SonarQube Cloud: MuleSoft DataWeave, Gosu, Groovy, and PowerShell]]></title><description><![CDATA[SonarQube Cloud now brings deterministic code verification to integration workflows, insurance systems, build pipelines, and infrastructure scripts. All four languages are available now, with no extra configuration.]]></description><link>https://www.sonarsource.com/blog/four-new-languages-arrive-in-sonarqube-cloud/</link><guid isPermaLink="false">en:d3ec8c46-af57-4128-bf22-9c5bec9f981c</guid><dc:creator><![CDATA[Robert Curlee]]></dc:creator><pubDate>Fri, 04 Sep 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Some of the most critical code in your stack has either run without independent verification for years or you’re using separate tooling than &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt; to analyze that code. Integration flows move data between your systems. Gosu drives policy and claims logic. Recently, Groovy has become popular for defining how your software gets built in Gradle build files, Jenkinsfiles, and Groovy scripts. PowerShell provisions the infrastructure everything else depends on. When any of it fails, the blast radius reaches production, yet most of it has sat outside the reach of SonarQube’s automated code verification that developers of mainstream languages take for granted.&lt;/p&gt;&lt;p&gt;Integration flows, insurance logic, build scripts, and infrastructure automation deserve the same scrutiny as the application code they support. SonarQube Cloud adds support for MuleSoft DataWeave, Gosu, Groovy, and PowerShell, extending deterministic analysis to four ecosystems that run business-critical logic. Combined with the other 40+ programming languages SonarQube already supports including Java, JavaScript, TypeScript, Python, and C#, you get one unified &lt;a href=&quot;https://www.sonarsource.com/resources/library/code-verification/&quot;&gt;code verification&lt;/a&gt; layer, from your APIs to your build pipelines to the scripts that run your cloud.&lt;/p&gt;&lt;p&gt;Here is what each new language brings, why it matters, and how to start.&lt;/p&gt;&lt;h2&gt;MuleSoft DataWeave: verify the integration code your enterprise runs on&lt;/h2&gt;&lt;p&gt;Integration code is the connective tissue of your enterprise. It moves data between systems, exposes APIs, and orchestrates the workflows your business depends on. When that code fails, the outage cascades across everything downstream. Until now, MuleSoft DataWeave development lacked the independent verification layer other languages take for granted. With only a community supported plug-in, previous support didn’t have the native depth and cloud support that developers have been asking for.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What SonarQube Cloud analyzes.&lt;/strong&gt; &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/cloud/&quot;&gt;SonarQube Cloud&lt;/a&gt; inspects your MuleSoft DataWeave applications for bugs, security vulnerabilities, and maintainability issues. The analysis reads your MuleSoft DataWeave files and flows, then applies deterministic rules to surface problems the eye misses. Every issue comes with a clear explanation and a path to a fix.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Why it matters.&lt;/strong&gt; AI agents write more integration code, and they write it fast. A single flawed integration flow can take down the systems it connects. SonarQube is the verification layer that checks MuleSoft DataWeave code against your functional, security, and maintainability standards before it ships, so your developers catch issues in the pull request, not on a 2 a.m. incident call.&lt;/p&gt;&lt;h2&gt;Gosu: close a longstanding coverage gap for insurance systems&lt;/h2&gt;&lt;p&gt;Gosu code has run critical insurance and enterprise systems for years, often without the verification coverage mainstream languages receive. Gosu is a statically typed language on the JVM, used most notably behind Guidewire&amp;#x27;s platform for policy, billing, and claims management. That business-critical logic has sat outside most quality tooling or lacked up-to-date changes in the community plugin, until now.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What SonarQube Cloud analyzes.&lt;/strong&gt; SonarQube Cloud analyzes Gosu source code the same way it verifies every other language: deterministically, transparently, and consistently. Coverage spans the checks that matter most:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Bugs:&lt;/strong&gt; catch logic errors and reliability problems before they reach production.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Vulnerabilities:&lt;/strong&gt; identify security weaknesses attackers could exploit.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Maintainability issues:&lt;/strong&gt; flag the problems that accumulate into technical debt.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Every finding includes a clear explanation of the problem and guidance on how to fix it. No guesswork, no opaque scoring.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Why it matters.&lt;/strong&gt; In insurance systems, a single reliability bug carries financial and regulatory consequences. SonarQube applies the same deterministic standard to Gosu that it applies to Java, Python, and C#, so AI-generated and hand-written Gosu code meet identical quality and security thresholds. Teams running Guidewire and other Gosu-based platforms gain audit-ready evidence that the code meets standard, and developers get faster, clearer feedback inside their existing pull request workflow.&lt;/p&gt;&lt;h2&gt;Groovy: verify the code that runs your pipelines&lt;/h2&gt;&lt;p&gt;Groovy runs deeper in your infrastructure than most teams realize. Not only is it used for web development, rapid prototyping, and metaprograming, it is also heavily used to define Jenkins pipelines, power Gradle build scripts, and glues together automation across the JVM ecosystem. When that code fails, your delivery pipeline fails with it. Yet these uses of Groovy have long sat outside the reach of automated verification, a blind spot in workflows that demand consistency everywhere else.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What SonarQube Cloud analyzes.&lt;/strong&gt; SonarQube Cloud analyzes Groovy against a dedicated rule set built to catch the issues that matter most: bugs, vulnerabilities, and maintainability problems. Coverage includes the Groovy you actually write:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Jenkins pipeline definitions&lt;/li&gt;&lt;li&gt;Gradle build scripts&lt;/li&gt;&lt;li&gt;Standalone Groovy applications&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The analysis is deterministic. Every scan applies the same rules and returns the same verdict, and SonarQube flags issues directly in your pull requests, so problems surface before they merge, not after they break a build.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Why it matters.&lt;/strong&gt; Unverified Groovy can be unverified infrastructure. A broken Jenkins pipeline or a flawed Gradle script does not just introduce a bug. It stalls every deployment that depends on it. Agents now generate Groovy alongside everything else, and that code can look correct while hiding defects that only surface at runtime. Deterministic analysis catches the complex mistakes that LLM self-review misses, so you verify the code that runs your pipelines and keep delivery moving.&lt;/p&gt;&lt;h2&gt;PowerShell: hold your infrastructure scripts to one standard&lt;/h2&gt;&lt;p&gt;PowerShell sits at the control layer of modern infrastructure. It provisions cloud resources, automates deployments, and orchestrates critical operations across your environment. When a PowerShell script fails silently, the blast radius is your production systems. These scripts often skip the review rigor applied to application code, which leaves a gap in your risk posture, and AI widened it.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What SonarQube Cloud analyzes.&lt;/strong&gt; SonarQube Cloud analyzes PowerShell for bugs, security vulnerabilities, and maintainability issues. The analysis is deterministic, catching the concrete, hard-to-find mistakes a language model reviewing its own output misses. Coverage targets the problems that cause real incidents:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Bugs&lt;/strong&gt; that break automation at runtime: incorrect logic, unsafe type handling, and control-flow errors that pass review but fail in production.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Security vulnerabilities&lt;/strong&gt; including hardcoded credentials, injection risks, and unsafe command execution that expose your infrastructure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Maintainability issues&lt;/strong&gt; like dead code, needless complexity, and inconsistent patterns that accumulate over time.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Every issue comes with a clear explanation and a path to a fix. Your team learns why a rule fired, not just that it did.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Why it matters.&lt;/strong&gt; A flawed script does not just fail. It can misconfigure a cloud environment, expose a secret, or take down a service. SonarQube Cloud is the independent verification layer for your PowerShell, applying multilayered, deterministic analysis to every script. Your team ships automation faster, and your engineering org governs it with confidence.&lt;/p&gt;&lt;h2&gt;How does SonarQube Cloud analyze all supported languages automatically?&lt;/h2&gt;&lt;p&gt;All four languages are available now and join the more than &lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/&quot;&gt;40+ programming languages&lt;/a&gt; SonarQube Cloud already supports in &lt;a href=&quot;https://www.sonarsource.com/integrations/github/&quot;&gt;GitHub&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/integrations/gitlab/&quot;&gt;GitLab&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/integrations/bitbucket/&quot;&gt;BitBucket&lt;/a&gt;, and &lt;a href=&quot;https://www.sonarsource.com/integrations/azure/&quot;&gt;Azure DevOps&lt;/a&gt; repositories. SonarQube Cloud activates automatically across MuleSoft DataWeave, Gosu, Groovy, and PowerShell projects with no extra plugins, no manual language configuration, no separate setup required. Your next scan picks up the new languages alongside your existing ones and surfaces results in the same dashboards and pull request checks you use today.&lt;/p&gt;&lt;p&gt;Open your SonarQube Cloud project, connect a repository, and run your first analysis today.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The context tax: why your coding agent reads the same 600 lines 400 times]]></title><description><![CDATA[Discover how SemSitter powers Sonar Vortex with a codebase graph that gives coding agents precise context across files, documentation, and languages.]]></description><link>https://www.sonarsource.com/blog/stop-the-context-tax/</link><guid isPermaLink="false">en:339539a4-d5fd-4677-b723-c6c6d54c0806</guid><dc:creator><![CDATA[Antonio Aversa]]></dc:creator><pubDate>Tue, 01 Sep 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When a coding agent works in a codebase that doesn&amp;#x27;t fit in its context window, it navigates the only way a shell can: &lt;code&gt;grep&lt;/code&gt;, then read a file, then read a bigger slice of the file. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Every one of those reads stays in the conversation and is &lt;strong&gt;re-billed on every later turn&lt;/strong&gt;. &lt;/li&gt;&lt;li&gt;On one ordinary ~800-line pull request in our own codebase, that added up to &lt;strong&gt;156 million context tokens&lt;/strong&gt; and a context window that &lt;strong&gt;peaked at 459k tokens&lt;/strong&gt;, for a change whose final diff a person could read in five minutes.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/products/sonar-vortex/&quot;&gt;Sonar Vortex&lt;/a&gt; is our enterprise harness for AI coding agents, guiding them with the right context and verifying every change in real time. To provide guidance, it works inside the agent&amp;#x27;s loop and answers navigation questions from a graph of your codebase instead of from raw file reads. That graph is built by SemSitter™, our in-house semantic navigation engine, which keeps a local Unified Dependency Graph (UDG) of the repository updated instantly on every change.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Instead of grep, then a slice, then a wider slice, the agent queries the graph for a specific node and gets back that node plus its typed relationships. &lt;/li&gt;&lt;li&gt;The measurable effects are less context carried per task, fewer round-trips, and, in a repository larger than the window, call sites a regex would not have matched.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;The story of a refactor that shouldn&amp;#x27;t have hurt&lt;/h2&gt;&lt;p&gt;We build SemSitter with coding agents: that makes it a great candidate to show how agentic navigation capabilities can make the difference. A recent PR taught SemSitter&amp;#x27;s Python analyzer to do &lt;strong&gt;call-site resolution&lt;/strong&gt;, that is, for a method call, record which type owns the method and what the call returns. The C# analyzer already did this, so the job was to mirror it in Python.&lt;/p&gt;&lt;p&gt;Well into the change, the agent had to work with this line of SemSitter&amp;#x27;s own code:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;let return_type = ctx.method_index.resolve_return_type(owner, method_name);&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;To touch it safely, the agent needed the answer to the most ordinary question in programming, the one your IDE&amp;#x27;s &amp;quot;Go to Definition&amp;quot; gives you for free: &lt;em&gt;for the call &lt;/em&gt;&lt;code&gt;ctx.method_index.resolve_return_type(...)&lt;/code&gt;&lt;em&gt;, what type is &lt;/em&gt;&lt;code&gt;ctx.method_index&lt;/code&gt;&lt;em&gt;, where is &lt;/em&gt;&lt;code&gt;resolve_return_type&lt;/code&gt;&lt;em&gt; defined, and what does it return?&lt;/em&gt; The honest answers: &lt;code&gt;ctx.method_index&lt;/code&gt; is a &lt;code&gt;MethodIndex&lt;/code&gt;, the method lives in &lt;code&gt;method_index.rs&lt;/code&gt;, and it returns &lt;code&gt;Option&amp;lt;&amp;amp;str&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;The agent had no index of its own. So it did what a shell allows:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;code&gt;grep -rn &amp;quot;resolve_return_type&amp;quot;&lt;/code&gt;, and got back a definition in &lt;strong&gt;every&lt;/strong&gt; backend at once: Python, TypeScript, Java, Rust, C#, and a shared core. The regex cannot say which one this call binds to.&lt;/li&gt;&lt;li&gt;Open &lt;code&gt;method_index.rs&lt;/code&gt; to read the definition. It doesn&amp;#x27;t know where the function starts or ends, so it reads a generous slice, or the whole file.&lt;/li&gt;&lt;li&gt;The return type is produced by a helper, &lt;code&gt;extract_type_name&lt;/code&gt;. Grep for that, open &lt;em&gt;that&lt;/em&gt; file, read another wide slice.&lt;/li&gt;&lt;li&gt;Is &lt;code&gt;ctx.method_index&lt;/code&gt; really a &lt;code&gt;MethodIndex&lt;/code&gt;? Grep for the field, open the struct, repeat.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Each of those reads is now permanently in the conversation, and you are going to pay for it, over and over again, until the conversation is over.&lt;/p&gt;&lt;p&gt;&lt;em&gt;There is a small irony here worth stating plainly: the agent was building the exact capability it was missing. Call-site resolution is &amp;quot;given this call, hand me its owner type and return type.&amp;quot; The agent needed precisely that to navigate the code, and, lacking it, fell back to grep and whole-file reads.&lt;/em&gt;&lt;/p&gt;&lt;h2&gt;What it actually cost us (with real numbers)&lt;/h2&gt;&lt;p&gt;While building SemSitter with coding agents, we keep the full traces. So we can measure the tax precisely. &lt;/p&gt;&lt;p&gt;Here&amp;#x27;s one pull request from the SemSitter repo, a backend change of about 800 lines that added &lt;em&gt;call-site resolution&lt;/em&gt; (more on that below):&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Metric (one PR, measured)&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Model round-trips in the session&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;512&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Context window at its peak&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;458,700 tokens&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Fresh input tokens&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;106k&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cache-read tokens (the re-billed transcript)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;152.8 million&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cache-write tokens&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;3.1 million&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Output tokens&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;289k&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Total context tokens billed&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;≈ 156 million&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Approx. cost of the session&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;≈ $41&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;The line that matters is &lt;strong&gt;cache-read: 152.8 million tokens&lt;/strong&gt;. Here&amp;#x27;s why it&amp;#x27;s so large.&lt;/p&gt;&lt;h3&gt;The mechanism: context is a tax you pay every turn&lt;/h3&gt;&lt;p&gt;A coding agent doesn&amp;#x27;t read a file once. On every new step, the model is re-sent the &lt;em&gt;entire conversation so far&lt;/em&gt; as input. Prompt caching makes those repeated tokens cheap per unit (≈10% of the input price), but you still pay for them &lt;strong&gt;on every single turn&lt;/strong&gt;. So the true cost of a token isn&amp;#x27;t its size. It&amp;#x27;s its size &lt;em&gt;times the number of turns it survives&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;Read a 600-line file on turn 40 of a 512-turn session and you haven&amp;#x27;t paid for 600 lines. You&amp;#x27;ve paid for 600 lines &lt;strong&gt;× ~470 more turns&lt;/strong&gt;.&lt;/p&gt;&lt;img src=&quot;https://assets-eu-01.kc-usercontent.com:443/ef593040-b591-0198-9506-ed88b30bc023/363f51ed-94eb-4e46-8bb7-e4630a0ec770/sem-sitter-3.png&quot; /&gt;&lt;p&gt;&lt;em&gt;Context size per model round-trip, measured from the real session. It only grows: every file read and tool result stays in, and is re-sent, until the run ends or the window is compacted.&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;One over-read, traced end to end&lt;/h3&gt;&lt;p&gt;Early in that PR, the agent needed to understand one helper: a ~67-line function that, given a value, works out its type name. To find it, the agent read the &lt;strong&gt;whole 618-line file&lt;/strong&gt; (6,472 tokens) instead of the 67 lines it used (~700 tokens).&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Wasted immediately: ~5,770 tokens.&lt;/li&gt;&lt;li&gt;That read entered the conversation around turn 42 and stayed for the remaining &lt;strong&gt;470 turns&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Re-billed as a cache read each turn: 5,770 × 470 ≈ &lt;strong&gt;2.7 million tokens&lt;/strong&gt; of pure waste.&lt;/li&gt;&lt;li&gt;At current cache-read pricing (~$0.20 / million), that&amp;#x27;s &lt;strong&gt;≈ $0.54, for one unnecessary file read.&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Fifty-four cents sounds trivial. But this PR did that &lt;strong&gt;~10 times&lt;/strong&gt;, plus dozens of blind tree-wide greps, several of which returned nothing and forced a second, wider grep. Add it up and the avoidable navigation overhead alone runs into &lt;strong&gt;several dollars on a single $41 PR&lt;/strong&gt;, and it scales with the size of the repo, not the size of your change.&lt;/p&gt;&lt;h3&gt;And this is not one unlucky PR&lt;/h3&gt;&lt;p&gt;Across &lt;strong&gt;18&lt;/strong&gt; comparable single-ticket PRs in the same repo, the average was:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;~234 million context tokens per PR&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;~$65 per PR&lt;/strong&gt; (median ~$52)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;~700 model round-trips per PR&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;context windows &lt;strong&gt;routinely peaking between 450k and 975k tokens&lt;/strong&gt;, brushing the 1M ceiling, at which point the agent is forced to compact and &lt;em&gt;lose&lt;/em&gt; earlier context entirely.&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;https://assets-eu-01.kc-usercontent.com:443/ef593040-b591-0198-9506-ed88b30bc023/6382e2ed-4003-4f32-ab12-d1efe268a5a8/sem-sitter-2.png&quot; /&gt;&lt;p&gt;&lt;em&gt;Context tokens billed to complete each of 18 comparable PRs in the same repository. The spread is wide because it tracks how much of the codebase the agent had to traverse, not how large the final diff was.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;That last point is the second, quieter failure mode. In a repo too big for the window, &lt;code&gt;grep&lt;/code&gt; doesn&amp;#x27;t just cost tokens. It &lt;strong&gt;misses&lt;/strong&gt;. A regex finds the strings you thought to search for, not the call that reaches your function through an interface, an alias, or another programming language. Missed call sites become failed builds, another round-trip to CI, and more rework, each with its own fresh context tax.&lt;/p&gt;&lt;h2&gt;What SemSitter in Sonar Vortex does instead&lt;/h2&gt;&lt;p&gt;This is what &lt;a href=&quot;https://www.sonarsource.com/products/sonar-vortex/&quot;&gt;Sonar Vortex&lt;/a&gt; does instead, using SemSitter, the navigation engine underneath it. SemSitter builds a &lt;strong&gt;Unified Dependency Graph (UDG)&lt;/strong&gt; of the codebase: every function, method, class, field and parameter is a node, and the relationships between them are typed edges: &lt;em&gt;calls&lt;/em&gt;, &lt;em&gt;references&lt;/em&gt;, &lt;em&gt;returns&lt;/em&gt;, &lt;em&gt;has-param&lt;/em&gt;, &lt;em&gt;is-type&lt;/em&gt;, &lt;em&gt;contains&lt;/em&gt;, &lt;em&gt;extends&lt;/em&gt;. How we build that graph accurately, across languages, leveraging &lt;em&gt;parallelism&lt;/em&gt; and &lt;em&gt;incrementality&lt;/em&gt; while scaling to millions of nodes, is the interesting part we keep under the hood.&lt;/p&gt;&lt;p&gt;The point for the agent is simple. It no longer asks the filesystem &amp;quot;&lt;em&gt;which files mention &lt;/em&gt;&lt;code&gt;resolve_return_type&lt;/code&gt;?&amp;quot; It asks the graph a &lt;strong&gt;precise, semantic&lt;/strong&gt; question:&lt;/p&gt;&lt;p&gt;&amp;quot;Give me the definition of &lt;code&gt;resolve_return_type&lt;/code&gt; that this call binds to, the type that owns it, its return type, and its callers.&amp;quot;&lt;/p&gt;&lt;p&gt;and gets back &lt;strong&gt;exactly that&lt;/strong&gt;: the one method body, plus the edges that answer the rest, with &lt;strong&gt;no surrounding file, no six-way grep, and nothing to widen&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;That is, in fact, the feature the PR was building. For the call &lt;code&gt;ctx.method_index.resolve_return_type(...)&lt;/code&gt;, the graph records &lt;em&gt;which type owns&lt;/em&gt; the method (a &lt;code&gt;references&lt;/code&gt; edge from &lt;code&gt;emit_call&lt;/code&gt; to &lt;code&gt;MethodIndex&lt;/code&gt;, because &lt;code&gt;ctx.method_index&lt;/code&gt; is a &lt;code&gt;MethodIndex&lt;/code&gt;) and &lt;em&gt;what it returns&lt;/em&gt; (&lt;code&gt;resolve_return_type&lt;/code&gt; carries a &lt;code&gt;returns&lt;/code&gt; edge to &lt;code&gt;Option&amp;lt;&amp;amp;str&amp;gt;&lt;/code&gt;). The agent gets &amp;quot;where is this defined, on what type, and what comes back?&amp;quot; as data, not as a page of text it has to read and then carry forever.&lt;/p&gt;&lt;h3&gt;The graph the agent navigates&lt;/h3&gt;&lt;img src=&quot;https://assets-eu-01.kc-usercontent.com:443/ef593040-b591-0198-9506-ed88b30bc023/ddd8c5b2-4771-49e4-b648-9c59d95ec1e1/sem-sitter-4.png&quot; /&gt;&lt;p&gt;&lt;em&gt;The subgraph SemSitter returns for the call &lt;/em&gt;&lt;code&gt;ctx.method_index.resolve_return_type(...)&lt;/code&gt;&lt;em&gt;. Blue nodes are code, green is documentation, orange is code in another language.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;When the agent touches &lt;code&gt;resolve_return_type&lt;/code&gt;, the graph hands it the small, exact neighborhood shown above. Compare the two ways of answering the same three questions:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;grep + read&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;SemSitter (graph)&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Which &lt;code&gt;resolve_return_type&lt;/code&gt; does this call bind to?&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;grep returns one per backend; open files to guess&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;one &lt;code&gt;references&lt;/code&gt; edge → the Python &lt;code&gt;MethodIndex&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;What does it return?&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;read the file until the signature is in view&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;one &lt;code&gt;returns&lt;/code&gt; edge → &lt;code&gt;Option&amp;lt;&amp;amp;str&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Who calls it, and on what type?&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;grep again, per file, hope the regex matched&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;upstream &lt;code&gt;calls&lt;/code&gt; + owner &lt;code&gt;references&lt;/code&gt; edges, complete&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Tokens dragged through the rest of the chat&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;thousands, per file, × every later turn&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;the one method body, once&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Same answers. One is a page of text you re-pay for on every turn and that still misses the indirect callers. The other is a handful of typed edges that are complete by construction.&lt;/p&gt;&lt;img src=&quot;https://assets-eu-01.kc-usercontent.com:443/ef593040-b591-0198-9506-ed88b30bc023/4c297db6-1342-49e1-8be7-6230ceadc6ee/sem-sitter-1.png&quot; /&gt;&lt;p&gt;&lt;em&gt;The single over-read from earlier, framed as a lookup. Loading ~9x fewer tokens matters most because of the multiplier: this read survived 470 turns, so grep+read carried ~2.7M extra cache-read tokens versus ~0.33M for the graph lookup.&lt;/em&gt;&lt;/p&gt;&lt;h2&gt;Why the gains compound: beyond code-to-code&lt;/h2&gt;&lt;p&gt;Structural edges (calls, returns, references) are only the first layer. The same graph carries two more kinds of relationship, and each multiplies the savings on exactly the tasks that hurt most today.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Code → text (&lt;code&gt;documented_by&lt;/code&gt;).&lt;/strong&gt; Every code node can be linked to the &lt;em&gt;specific&lt;/em&gt; piece of documentation that governs it: the one paragraph of a design doc, the one ADR, the one section of the README. This is the &amp;quot;misleading docs&amp;quot; problem turned on its head. Instead of the agent scraping a wiki and being led astray by a stale page, touching &lt;code&gt;resolve_return_type&lt;/code&gt; surfaces &lt;em&gt;the&lt;/em&gt; note on how &lt;code&gt;MethodIndex&lt;/code&gt; is built from the callees&amp;#x27; &lt;code&gt;-&amp;gt;&lt;/code&gt; annotations: a few hundred exact tokens instead of a document dump, and the &lt;em&gt;right&lt;/em&gt; few hundred.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Text → text.&lt;/strong&gt; Documentation, tickets and design notes are linked to each other by meaning, so the agent can follow &amp;quot;this rule is refined by that ADR&amp;quot; without a full-text search that returns fifty near-misses.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Code → code, across programming languages.&lt;/strong&gt; The same idea implemented in two languages can be linked even when the names differ. This PR was mirroring C#&amp;#x27;s call-site resolution in Python, and C#&amp;#x27;s return-type logic lives in a function called &lt;code&gt;resolve_type_node&lt;/code&gt;, not &lt;code&gt;resolve_return_type&lt;/code&gt;. A grep for one name will never surface the other. A cross-language rename or contract change, today one of the most token-expensive, error-prone things you can ask an agent to do, because it means grepping several backends in several syntaxes, becomes &lt;em&gt;follow the edge&lt;/em&gt;. Both ends arrive in context together, and neither is missed because the other language happened to use a different word.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In the diagram above, those are the green &lt;code&gt;documented_by&lt;/code&gt; edge and the dashed &lt;code&gt;semantically_related&lt;/code&gt; edge to the C# backend. Each one is a navigation the shell simply cannot make: &lt;code&gt;grep&lt;/code&gt; cannot cross from code to prose, and it cannot connect &lt;code&gt;resolve_return_type&lt;/code&gt; in the Python backend to &lt;code&gt;resolve_type_node&lt;/code&gt; in the C# one. The graph can, and it hands the agent only the node it asked for.&lt;/p&gt;&lt;h2&gt;The takeaway&lt;/h2&gt;&lt;p&gt;The bottleneck for AI coding agents in real, large codebases isn&amp;#x27;t reasoning. It&amp;#x27;s &lt;strong&gt;navigation&lt;/strong&gt;, and navigation-by-grep has two costs that don&amp;#x27;t show up until you measure:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Token cost.&lt;/strong&gt; Every blind read is re-billed on every later turn. On one ordinary PR that was 156M context tokens and ~$41; across a batch it averaged ~$65 a PR, with context windows brushing the 1M ceiling.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Correctness cost.&lt;/strong&gt; &lt;code&gt;grep&lt;/code&gt; finds strings, not meaning. What it misses becomes rework and extra trips to CI, each paying the token tax again.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;SemSitter, our in-house code navigation engine powering Sonar Vortex, turns navigation from a text search into a graph query. The agent carries the nodes it asked for rather than the files it had to scan, and it can follow relationships across files, docs, and languages that a regex cannot express. &lt;/p&gt;&lt;p&gt;The result is lower context cost per change and fewer call sites missed, and both effects grow with the size of the codebase.&lt;/p&gt;&lt;p&gt;If your agents work in a codebase bigger than their context window, this tax is already on your bill. &lt;a href=&quot;https://www.sonarsource.com/products/sonar-vortex/&quot;&gt;Sonar Vortex&lt;/a&gt; is how you stop paying it.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[SonarQube Hunter Agent is now GA: Catch broken access control and business logic flaws]]></title><description><![CDATA[ SonarQube Hunter Agent uses AI to detect broken access control, business logic flaws, and authentication vulnerabilities traditional SAST can miss.]]></description><link>https://www.sonarsource.com/blog/hunter-agent-detects-logical-flaws/</link><guid isPermaLink="false">en:de3a0630-3901-47bf-aa86-687c952ff6ab</guid><dc:creator><![CDATA[Satinder Khasriya]]></dc:creator><pubDate>Thu, 27 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In 2026, a researcher was paid a &lt;a href=&quot;https://www.securityweek.com/meta-pays-78000-bounty-for-vulnerability-exposing-customer-support-data/&quot;&gt;$78,000 bug bounty for finding a flaw in Meta&amp;#x27;s systems&lt;/a&gt;: a logged-in user could pull another user&amp;#x27;s private support tickets and personal data just by changing an identifier in a request. Authentication worked exactly as designed. The system correctly confirmed who the user was—it just never checked whether that user was allowed to see &lt;em&gt;that specific&lt;/em&gt; piece of data. &lt;a href=&quot;https://www.sonarsource.com/solutions/security/sast/&quot;&gt;SAST&lt;/a&gt; wouldn&amp;#x27;t have caught it, because there was no data flow/injection issue in the code. It ran exactly as written. &lt;/p&gt;&lt;p&gt;This is one of many gaps &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/hunter-agent/&quot;&gt;SonarQube Hunter Agent&lt;/a&gt; is built to close, and as of today, it&amp;#x27;s generally available on &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/cloud/&quot;&gt;SonarQube Cloud&lt;/a&gt;. SonarQube Server support is coming soon. &lt;/p&gt;&lt;p&gt;Broken access control has been the &lt;a href=&quot;https://www.sonarsource.com/resources/library/owasp/&quot;&gt;OWASP&lt;/a&gt; Top 10&amp;#x27;s #1 web application risk since 2021, and it isn&amp;#x27;t shrinking: In &lt;a href=&quot;https://owasp.org/Top10/2025/A01_2025-Broken_Access_Control/&quot;&gt;OWASP&amp;#x27;s 2025&lt;/a&gt; testing, every single application tested (100%) had some form of broken access control. Researchers found over 1.8 million individual instances of it, spread across 40 different types of access control flaws  more than any other risk category in the Top 10. It&amp;#x27;s also the category security tooling is least equipped to find, and the problem is compounding: &lt;a href=&quot;https://www.sonarsource.com/resources/library/what-is-an-ai-agent/&quot;&gt;AI coding agents&lt;/a&gt; now author more than 42% of committed enterprise code, generating access-control logic, permission checks, and business workflows faster than any human review process was built to handle.&lt;/p&gt;&lt;h2&gt;Vulnerabilities that SAST tools miss&lt;/h2&gt;&lt;p&gt;SonarQube&amp;#x27;s SAST engine is excellent at what it&amp;#x27;s designed to do: algorithmic and data-flow analysis that trace tainted input from an untrusted source to a sensitive sink. That&amp;#x27;s how it catches SQL injection, XSS, path traversal, hardcoded secrets, and hundreds of other vulnerability classes reliably, at scale, on every commit.&lt;/p&gt;&lt;p&gt;But there&amp;#x27;s a category of vulnerability that sits outside what any SAST can reach, not because of a tooling limitation, but because of the nature of the question itself. Does /invoices/8472 check that the requesting user actually owns invoice 8472, or does it just return whatever record matches the ID? Is a role check enforced only in the UI, and never revalidated server-side? Does completing step 3 of a checkout flow actually require having completed step 2? None of these are syntax problems. They&amp;#x27;re questions about intent,  about what a system is &lt;em&gt;supposed&lt;/em&gt; to do, versus what it actually lets you do. And answering them requires reasoning about identity, roles, and workflow logic that a static analyzer has no mechanism to evaluate.&lt;/p&gt;&lt;p&gt;For years, the only way to close that gap was people: senior engineers doing manual code review, external pentest engagements once or twice a year, bug bounty programs, pre-release audits. That model is running out of runway. AppSec talent is scarce, pentests are point-in-time snapshots with long gaps between them, and release velocity, accelerated by &lt;a href=&quot;https://www.sonarsource.com/resources/library/ai-code-generation/&quot;&gt;AI-generated code&lt;/a&gt; has outpaced what manual review can keep up with. The cost of leaving that gap open isn&amp;#x27;t theoretical: broken access control alone exposed roughly&lt;a href=&quot;https://krebsonsecurity.com/2019/05/first-american-financial-corp-leaked-hundreds-of-millions-of-title-insurance-records/&quot;&gt; 885 million records at First American&lt;/a&gt;, 64 million applicant records at &lt;a href=&quot;https://www.csoonline.com/article/4020919/mcdonalds-ai-hiring-tools-password-123456-exposes-data-of-64m-applicants.html&quot;&gt;McDonald&amp;#x27;s&lt;/a&gt;, and drained $9 million from &lt;a href=&quot;https://research.checkpoint.com/2025/16-wei/&quot;&gt;Yearn Finance &lt;/a&gt;in a single exploit. These are not edge cases but real headlines.&lt;/p&gt;&lt;h2&gt;How does Hunter Agent detect logic flaws?&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/hunter-agent/&quot;&gt;Hunter Agent&lt;/a&gt; is an AI security agent, native to &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt;, that reasons through your codebase the way a human security researcher works through a whitebox audit and confirms every finding before it ever reaches a developer.&lt;/p&gt;&lt;p&gt;It targets three classes of logic-level vulnerability that pattern-based scanning structurally cannot evaluate:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Broken access control:&lt;/strong&gt; IDOR, missing or incorrect authorization checks, privilege escalation, CSRF, sensitive data exposure&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Business logic flaws&lt;/strong&gt;: skipped workflow steps, abuse of repeatable actions, missing rate limits&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Authentication &amp;amp; session management flaws&lt;/strong&gt;: session fixation, non-expiring sessions, weak password recovery, missing MFA, brute-force gaps&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Under the hood, Hunter Agent runs on the harness used by the SWE-bench-leading &lt;a href=&quot;https://www.sonarsource.com/blog/introducing-sonar-foundation-agent/&quot;&gt;&lt;strong&gt;Sonar Foundation Agent&lt;/strong&gt;&lt;/a&gt;. Rather than issuing a single prompt and taking whatever the model returns, it executes a structured, multi-phase pipeline:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Analyze&lt;/strong&gt;: runs security playbooks in parallel across chunks of the codebase to surface candidate issues&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Explore&lt;/strong&gt;: maps the structure of the repository and splits it into manageable segments, which is how the agent scales to codebases beyond 10 million lines of code&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Validate exploitability:&lt;/strong&gt; a dedicated subagent takes each candidate finding and actively explores whether a feasible attack path exists, discarding anything it can&amp;#x27;t substantiate&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Synthesize&lt;/strong&gt;: consolidates validated findings into a single, reported result&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;From the outside, using it collapses to four steps with effectively zero setup: connect a SonarQube project (nothing to install), the playbook runs the analysis, the validation subagent confirms exploitability, and confirmed findings are raised as SonarQube issues—tagged, triaged, and gated exactly like any other finding your team already reviews. There&amp;#x27;s no separate portal and no new dashboard.&lt;/p&gt;&lt;h2&gt;How reliable are  SonarQube Hunter Agent’s findings?&lt;/h2&gt;&lt;p&gt;Any sufficiently capable LLM can be prompted to “look for security bugs” in a codebase. The problem is that raw model output on a task like this is neither precise nor stable. Point a generic prompt at the same codebase twice and you can get three findings on one run and 60 on the next. That is a variance that makes the output impossible to build a process around. A security team can&amp;#x27;t build a triage process around a tool that doesn&amp;#x27;t agree with itself.&lt;/p&gt;&lt;p&gt;That&amp;#x27;s the specific problem the exploitability-validation subagent is designed to solve: every candidate finding from the Analyze phase has to survive an independent attempt to demonstrate a feasible attack path before it&amp;#x27;s allowed to surface. In practice, that pushes average precision to &lt;strong&gt;80–90%&lt;/strong&gt;, high enough that a finding from Hunter Agent can be treated as a real, actionable signal rather than something to filter through another layer of manual investigation. In internal testing, it has surfaced more than &lt;strong&gt;200 zero-day vulnerabilities&lt;/strong&gt; across popular, well-audited open source projects.&lt;/p&gt;&lt;h2&gt;How do I automatically detect broken access control in source code?&lt;/h2&gt;&lt;p&gt;Hunter Agent is designed to add a reasoning layer without adding friction. It can run as a background agent scheduled weekly or monthly against your main branch, or it can be triggered on demand. Findings surface asynchronously as SonarQube issues once they&amp;#x27;re confirmed, alongside the &lt;a href=&quot;https://www.sonarsource.com/solutions/security/sast/&quot;&gt;SAST&lt;/a&gt; and &lt;a href=&quot;https://www.sonarsource.com/solutions/security/sca/&quot;&gt;SCA&lt;/a&gt; findings your team already triages.&lt;/p&gt;&lt;p&gt;That&amp;#x27;s a deliberate design choice: surfacing both SAST issues and findings from Hunter Agent in the same workflow means you get full-spectrum coverage without forcing a tradeoff between depth and speed. It&amp;#x27;s language-agnostic across the &lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/&quot;&gt;40+ programming languages&lt;/a&gt; SonarQube already supports, and incremental scanning cuts re-scan time on large repositories by roughly half.&lt;/p&gt;&lt;h2&gt;Layered, not just independent&lt;/h2&gt;&lt;p&gt;The agent that reviews your code is not the agent or model that wrote it. As more of your codebase is authored by&lt;a href=&quot;https://www.sonarsource.com/solutions/ai/ai-coding-assistants/&quot;&gt; AI coding assistants&lt;/a&gt; or agents themselves, a structurally independent verification layer matters: it&amp;#x27;s the difference between a system checking its own work and a second, differently purposed system checking whether the first one&amp;#x27;s output actually enforces the rules it was supposed to.&lt;/p&gt;&lt;p&gt;That independence is layered. SAST catches static code flaws, SCA catches vulnerable dependencies, and Hunter Agent adds a third lens, reasoning over code the way a security researcher would and catching logic and behavioral issues the others aren&amp;#x27;t built to see. Nothing is trusted by default to have caught everything alone, and that&amp;#x27;s Sonar’s zero-trust, multilayered approach to verification.&lt;/p&gt;&lt;p&gt;Hunter Agent&amp;#x27;s findings are also auditable: every finding carries the discovery path the agent followed, so a reviewer can see exactly how it got there.&lt;/p&gt;&lt;h2&gt;Available today&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/hunter-agent/&quot;&gt;SonarQube Hunter Agent&lt;/a&gt; is generally available now on &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/cloud/&quot;&gt;SonarQube Cloud&lt;/a&gt;, for the Enterprise plan. Point it at any existing SonarQube project. There&amp;#x27;s nothing new to install, no new config needed. Support for &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/server/&quot;&gt;SonarQube Server&lt;/a&gt; is coming soon.&lt;/p&gt;&lt;p&gt;Logic-level vulnerabilities don&amp;#x27;t announce themselves in a code review. They announce themselves in a breach report, or in someone else&amp;#x27;s bug bounty payout. Hunter Agent exists to make sure it&amp;#x27;s your team that finds them first.&lt;/p&gt;&lt;p&gt;Log in to SonarQube Cloud to get started, or reach out to your Sonar account team with questions.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Bring your own hook: a 5-line PostToolUse template calling sonar analyze agentic]]></title><description><![CDATA[Set up a minimal SonarQube Agentic Analysis hook in Claude Code with five lines of Bash and understand how exit codes control feedback.]]></description><link>https://www.sonarsource.com/blog/bring-your-own-hook/</link><guid isPermaLink="false">en:d50f3574-ceba-49ea-b346-8f66e45e54c8</guid><dc:creator><![CDATA[Prasenjit Sarkar]]></dc:creator><pubDate>Mon, 24 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;code&gt;sonar integrate claude&lt;/code&gt; will set up Sonar Vortex for you. That is the right call for most people. But sometimes you want to own the hook yourself: to scope it to a subset of files, to decide exactly when it blocks, to check it into a repo your teammates share, or just to understand what is running before you trust it. This post is the smallest hook that does the job. Five lines, one command, and your agent starts getting CI-grade feedback on every edit.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;One naming note up front.&lt;/strong&gt; The CLI subcommand is &lt;code&gt;sonar analyze agentic&lt;/code&gt;; &lt;code&gt;sonar verify&lt;/code&gt; is an alias, and there is no &lt;code&gt;sqaa&lt;/code&gt; subcommand (the installed hook is just &lt;em&gt;named&lt;/em&gt; &lt;code&gt;sonar-sqaa&lt;/code&gt;). As of CLI 0.14.x, &lt;code&gt;sonar analyze&lt;/code&gt; has &lt;code&gt;secrets&lt;/code&gt;, &lt;code&gt;dependency-risks&lt;/code&gt;, and &lt;code&gt;agentic&lt;/code&gt;. When in doubt: &lt;code&gt;sonar analyze agentic --help&lt;/code&gt;.&lt;/p&gt;&lt;h2&gt;What do you need before setting up a Claude Code SonarQube hook?&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;SonarQube CLI installed and authenticated.&lt;/strong&gt; &lt;/li&gt;&lt;li&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/SonarSource/sonarqube-cli/refs/heads/master/user-scripts/install.sh | bash&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Then run &lt;code&gt;sonar auth login&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Confirm with &lt;code&gt;sonar auth status&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A SonarQube Cloud project with the Vortex entitlement.&lt;/strong&gt; Vortex is SonarQube Cloud only and is a paid add-on.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One prior CI analysis.&lt;/strong&gt; The project has to have been analyzed in your CI pipeline on a long-lived branch at least once &lt;em&gt;after&lt;/em&gt; Vortex was enabled for the org; without it there is nothing to analyze against.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;jq&lt;/code&gt;&lt;/strong&gt; on your PATH. The hook uses it to read Claude Code&amp;#x27;s event JSON.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Vortex runs server-side over HTTPS against SonarQube Cloud, so you do not need Docker for this CLI path.&lt;/p&gt;&lt;h2&gt;The template&lt;/h2&gt;&lt;p&gt;Two files. First the hook script.&lt;/p&gt;&lt;p&gt;&lt;code&gt;.claude/hooks/sonar-agentic.sh&lt;/code&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#!/usr/bin/env bash
file=$(jq -r &amp;#39;.tool_input.file_path // empty&amp;#39;)                    # 1
[ -f &amp;quot;$file&amp;quot; ] || exit 0                                          # 2
out=$(sonar analyze agentic --depth DEEP --file &amp;quot;$file&amp;quot; --format text); rc=$?  # 3
[ &amp;quot;$rc&amp;quot; -eq 51 ] &amp;amp;&amp;amp; { printf &amp;#39;%s\n&amp;#39; &amp;quot;$out&amp;quot; &amp;gt;&amp;amp;2; exit 2; }         # 4
exit 0                                                            # 5&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;chmod +x .claude/hooks/sonar-agentic.sh&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Then wire it to the &lt;code&gt;PostToolUse&lt;/code&gt; event for the file-writing tools in &lt;code&gt;.claude/settings.json&lt;/code&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;{
    &amp;quot;hooks&amp;quot;: {
      &amp;quot;PostToolUse&amp;quot;: [
        {
          &amp;quot;matcher&amp;quot;: &amp;quot;Edit|Write&amp;quot;,
          &amp;quot;hooks&amp;quot;: [
            { &amp;quot;type&amp;quot;: &amp;quot;command&amp;quot;, &amp;quot;command&amp;quot;: &amp;quot;$CLAUDE_PROJECT_DIR/.claude/hooks/sonar-agentic.sh&amp;quot;, &amp;quot;args&amp;quot;: [], &amp;quot;timeout&amp;quot;: 120 }
          ]
        }
      ]
    }
  }  &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Restart Claude Code so it picks up the new hook. That is the whole thing.&lt;/p&gt;&lt;h2&gt;How does each line of the sonar analyze agentic hook script work?&lt;/h2&gt;&lt;p&gt;The mechanism only works if you understand two contracts: how Claude Code hands you the event, and how it reads your answer.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Claude Code passes the event as JSON on stdin, not as environment variables.&lt;/strong&gt; There is no &lt;code&gt;$tool_input_file_path&lt;/code&gt;. The variables Claude Code does export are path placeholders - $CLAUDE_PROJECT_DIR, $CLAUDE_PLUGIN_ROOT, and $CLAUDE_PLUGIN_DATA — and none of them carry the event; beyond those, hooks simply inherit the parent environment. &lt;/p&gt;&lt;p&gt;So the first thing every hook does is read stdin and parse it.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;code&gt;jq -r &amp;#x27;.tool_input.file_path // empty&amp;#x27;&lt;/code&gt; reads the event JSON from stdin and pulls out the path of the file Claude just wrote. For &lt;code&gt;Edit&lt;/code&gt; and &lt;code&gt;Write&lt;/code&gt; that field is &lt;code&gt;tool_input.file_path&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;code&gt;[ -f &amp;quot;$file&amp;quot; ] || exit 0&lt;/code&gt; bails out cleanly if there is no real file to look at (also covers the empty-string case). Exit 0 means &amp;quot;no opinion, carry on.&amp;quot;&lt;/li&gt;&lt;li&gt;&lt;code&gt;sonar analyze agentic --depth DEEP --file &amp;quot;$file&amp;quot; --format text&lt;/code&gt; runs Vortex on just that one file, using the restored CI context. It exits &lt;strong&gt;51&lt;/strong&gt; when it reports issues and &lt;strong&gt;0&lt;/strong&gt; when the file is clean. We capture both the output and the exit code. The &lt;code&gt;--depth DEEP&lt;/code&gt; is not decoration: a single &lt;code&gt;--file&lt;/code&gt; defaults to STANDARD depth, and only DEEP turns on cross-file analysis — taint analysis, at present. Only the file you pass is uploaded; SonarQube evaluates it against the project as of your last CI analysis with your modified file substituted in. You can pass several files with repeated &lt;code&gt;--file&lt;/code&gt; flags, or use &lt;code&gt;--staged&lt;/code&gt; to pick up whatever git has staged.&lt;/li&gt;&lt;li&gt;If the exit code is 51, we print the findings to &lt;strong&gt;stderr&lt;/strong&gt; and &lt;code&gt;exit 2&lt;/code&gt;. On a &lt;code&gt;PostToolUse&lt;/code&gt; hook, exit 2 does not undo the edit (the tool already ran), but it does feed your stderr back to Claude as feedback. Claude reads the findings, fixes the code, edits again, and the hook fires again. That is the loop.&lt;/li&gt;&lt;li&gt;Otherwise &lt;code&gt;exit 0&lt;/code&gt;. Nothing to say.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The choice of &lt;code&gt;exit 2&lt;/code&gt; matters and is easy to get wrong. Per the Claude Code hooks reference, on most events only exit code &lt;strong&gt;2&lt;/strong&gt; blocks or feeds back; exit code 1 is treated as a &lt;em&gt;non-blocking&lt;/em&gt; error and the turn just continues. And for &lt;code&gt;PostToolUse&lt;/code&gt; specifically, plain stdout on exit 0 goes to the debug log, not to the model - though a valid JSON object printed on exit 0 is still parsed, which is the escape hatch used below. So if you want the findings in front of Claude, stderr plus exit 2 is the reliable path.&lt;/p&gt;&lt;h2&gt;Why this gives you CI-grade feedback and not lint noise&lt;/h2&gt;&lt;p&gt;&lt;code&gt;sonar analyze agentic&lt;/code&gt; is not a local linter. It ships the changed file to SonarQube Cloud, which restores the dependency graph, type information, and quality profile from your last CI analysis and runs the same engine your pipeline runs, then returns findings in seconds. That is why, at DEEP depth, it can catch things a single-file tool cannot, like a tainted value flowing from a request parameter into a SQL sink. The exit-51 convention gives you a clean, deterministic signal to branch on, with no output parsing and no LLM judge in the middle deciding whether your code is fine.&lt;/p&gt;&lt;h2&gt;How do I handle sonar analyze agentic errors and exit codes in a hook?&lt;/h2&gt;&lt;p&gt;The five-liner &lt;em&gt;fails open&lt;/em&gt;: any exit code that is not 51 or 0 (an auth failure, a transient server error, a bad flag) falls through to &lt;code&gt;exit 0&lt;/code&gt;, and the edit sails past unverified. For a real guardrail, branch on all three cases and decide whether an analysis failure should fail closed:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#!/usr/bin/env bash
file=$(jq -r &amp;#39;.tool_input.file_path // empty&amp;#39;)
[ -f &amp;quot;$file&amp;quot; ] || exit 0

# only analyze source you care about
case &amp;quot;$file&amp;quot; in
  *.py|*.js|*.ts|*.tsx|*.java|*.cs|*.cpp) ;;
  *) exit 0 ;;
esac

out=$(sonar analyze agentic --depth DEEP --file &amp;quot;$file&amp;quot; --format text); rc=$?
case &amp;quot;$rc&amp;quot; in
  0)  exit 0 ;;                                                   # clean
  51) printf &amp;#39;%s\n&amp;#39; &amp;quot;$out&amp;quot; &amp;gt;&amp;amp;2; exit 2 ;;                         # issues: feed to Claude, it fixes
  *)  printf &amp;#39;SonarQube could not analyze %s (exit %s):\n%s\n&amp;#39; &amp;quot;$file&amp;quot; &amp;quot;$rc&amp;quot; &amp;quot;$out&amp;quot; &amp;gt;&amp;amp;2
      exit 2 ;;                                                   # error: surface it, do not pass silently
esac&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;If you would rather &lt;strong&gt;not&lt;/strong&gt; interrupt the turn and instead attach findings as advisory context, drop the &lt;code&gt;exit 2&lt;/code&gt; and return an &lt;code&gt;additionalContext&lt;/code&gt; payload on exit 0 instead:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;printf &amp;#39;{&amp;quot;hookSpecificOutput&amp;quot;:{&amp;quot;hookEventName&amp;quot;:&amp;quot;PostToolUse&amp;quot;,&amp;quot;additionalContext&amp;quot;:%s}}&amp;#39; \
  &amp;quot;$(printf &amp;#39;%s&amp;#39; &amp;quot;$out&amp;quot; | jq -Rs .)&amp;quot;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Both are valid; the difference is whether a finding stops Claude to fix now or just rides along as a note. Note that&lt;code&gt; additionalContext&lt;/code&gt; is capped at 10,000 characters; anything longer is written to a file and replaced with a path and a short preview. Check the &amp;quot;JSON output&amp;quot; section of the hooks docs for the exact decision-control fields your Claude Code version supports.&lt;/p&gt;&lt;h2&gt;How do I test a Claude Code PostToolUse hook with SonarQube?&lt;/h2&gt;&lt;p&gt;Ask Claude to write something obviously unsafe in a file in your project:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;Write a Java method that runs &amp;quot;SELECT * FROM users WHERE id = &amp;quot; + userId&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Claude writes the file, the &lt;code&gt;PostToolUse&lt;/code&gt; hook fires, and Vortex comes back with a SQL injection finding (&lt;code&gt;javasecurity:S3649&lt;/code&gt;, the &amp;quot;database queries should not be vulnerable to injection&amp;quot; taint rule). Claude reads it off stderr and offers to switch to a &lt;code&gt;PreparedStatement&lt;/code&gt;. If you see that round-trip, your hook is live. You can sanity-check the command on its own too:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sonar analyze agentic --depth DEEP --file src/UserRepo.java --format text; echo &amp;quot;exit: $?&amp;quot;
# exit: 51  when it finds something, 0 when clean&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;h2&gt;Bonus: a commit gate with the same primitive&lt;/h2&gt;&lt;p&gt;Same idea, different event. A &lt;code&gt;PreToolUse&lt;/code&gt; hook on &lt;code&gt;Bash&lt;/code&gt; can refuse a &lt;code&gt;git commit&lt;/code&gt; while blocker-severity issues are open. Note the flags: &lt;code&gt;sonar list issues&lt;/code&gt; requires &lt;code&gt;--project&lt;/code&gt;, and severity filtering is &lt;code&gt;--severities&lt;/code&gt; (plural):&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#!/usr/bin/env bash
cmd=$(jq -r &amp;#39;.tool_input.command // empty&amp;#39;)
case &amp;quot;$cmd&amp;quot; in
  git\ commit*)
    n=$(sonar list issues --project my-app --branch &amp;quot;$(git branch --show-current)&amp;quot; \
          --severities BLOCKER --format json | jq &amp;#39;.issues | length&amp;#39;)
    [ &amp;quot;${n:-0}&amp;quot; -gt 0 ] &amp;amp;&amp;amp; { echo &amp;quot;Blocked: $n blocker issue(s) open&amp;quot; &amp;gt;&amp;amp;2; exit 2; } ;;
esac
exit 0&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;h2&gt;When should I use sonar integrate claude instead of a custom hook?&lt;/h2&gt;&lt;p&gt;If you do not need custom scoping or blocking behavior, &lt;code&gt;sonar integrate claude --project &amp;lt;key&amp;gt;&lt;/code&gt; installs the Vortex’s &lt;code&gt;PostToolUse&lt;/code&gt; hook (plus secrets-scanning hooks) for you and manages the wiring; re-running it refreshes those artifacts, but updating the CLI binary itself is a separate &lt;code&gt;sonar update&lt;/code&gt;, keeps the CLI updated, and manages the wiring. Bring your own hook when you want control over &lt;em&gt;which&lt;/em&gt; files, &lt;em&gt;when&lt;/em&gt; it blocks, and &lt;em&gt;what&lt;/em&gt; your team sees in version control. The primitive is identical either way: a deterministic command at a fixed point in the agent&amp;#x27;s loop.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Tokenomics of quality: switch sonar list issues to --format toon for measured token savings]]></title><description><![CDATA[See how sonar list issues with TOON reduces token usage while preserving data and comprehension for AI coding agents and automated workflows.]]></description><link>https://www.sonarsource.com/blog/tokenomics-of-quality/</link><guid isPermaLink="false">en:98f14b0b-30ef-4d63-9b40-fd613c362e01</guid><dc:creator><![CDATA[Prasenjit Sarkar]]></dc:creator><pubDate>Mon, 17 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Your AI coding bill is, increasingly, a data-formatting problem. Every time an agent pulls your open issues, your quality gate status, or your dependency risks into its context window, it pays tokens for the shape of that data as well as the content. Most of that data goes to the agent as JSON, and JSON is verbose. There is a one-flag fix for the most common case, and it costs you nothing but a keystroke.&lt;/p&gt;&lt;p&gt;&lt;code&gt;sonar list issues&lt;/code&gt; can emit its results as &lt;a href=&quot;https://github.com/toon-format/toon&quot;&gt;TOON&lt;/a&gt; instead of JSON:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sonar list issues -p my-org_my-app --format toon&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;This post measures what that swap saves, shows you how to reproduce the measurement on your own data, and puts it in the larger context of where Sonar is already trimming tokens: Sonar Vortex&amp;#x27;s Context Augmentation on the way in, and cleaner code itself across the whole session.&lt;/p&gt;&lt;h2&gt;What is TOON format and how does it work?&lt;/h2&gt;&lt;p&gt;TOON (Token-Oriented Object Notation) is a compact, lossless encoding of the JSON data model, designed specifically for LLM input. It combines YAML-style indentation for nested objects with a CSV-style tabular layout for uniform arrays of objects. A list of issues is exactly that: an array of records with the same fields. That is TOON&amp;#x27;s sweet spot.&lt;/p&gt;&lt;p&gt;Here is the same three-issue result in each format. First the default, &lt;code&gt;--format json&lt;/code&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;{
    &amp;quot;issues&amp;quot;: [
      { &amp;quot;key&amp;quot;: &amp;quot;AZ1002fQ9x&amp;quot;, &amp;quot;rule&amp;quot;: &amp;quot;javasecurity:S3649&amp;quot;, &amp;quot;severity&amp;quot;: &amp;quot;BLOCKER&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;VULNERABILITY&amp;quot;, &amp;quot;component&amp;quot;: &amp;quot;my-org_my-app:src/main/java/com/acme/UserRepo.java&amp;quot;, &amp;quot;line&amp;quot;: 29, &amp;quot;message&amp;quot;: &amp;quot;Change this code to not construct SQL queries directly from user-controlled data.&amp;quot;, &amp;quot;status&amp;quot;: &amp;quot;OPEN&amp;quot;, &amp;quot;effort&amp;quot;: &amp;quot;5min&amp;quot; },
      { &amp;quot;key&amp;quot;: &amp;quot;AZ1007fQ9x&amp;quot;, &amp;quot;rule&amp;quot;: &amp;quot;java:S2076&amp;quot;, &amp;quot;severity&amp;quot;: &amp;quot;BLOCKER&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;VULNERABILITY&amp;quot;, &amp;quot;component&amp;quot;: &amp;quot;my-org_my-app:src/main/java/com/acme/AuthFilter.java&amp;quot;, &amp;quot;line&amp;quot;: 61, &amp;quot;message&amp;quot;: &amp;quot;Make sure that constructing this OS command is safe here.&amp;quot;, &amp;quot;status&amp;quot;: &amp;quot;OPEN&amp;quot;, &amp;quot;effort&amp;quot;: &amp;quot;30min&amp;quot; },
      { &amp;quot;key&amp;quot;: &amp;quot;AZ1013fQ9x&amp;quot;, &amp;quot;rule&amp;quot;: &amp;quot;java:S1481&amp;quot;, &amp;quot;severity&amp;quot;: &amp;quot;MINOR&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;CODE_SMELL&amp;quot;, &amp;quot;component&amp;quot;: &amp;quot;my-org_my-app:src/main/java/com/acme/OrderService.java&amp;quot;, &amp;quot;line&amp;quot;: 140, &amp;quot;message&amp;quot;: &amp;quot;Remove this unused local variable.&amp;quot;, &amp;quot;status&amp;quot;: &amp;quot;OPEN&amp;quot;, &amp;quot;effort&amp;quot;: &amp;quot;5min&amp;quot; }
    ],
    &amp;quot;paging&amp;quot;: { &amp;quot;pageIndex&amp;quot;: 1, &amp;quot;pageSize&amp;quot;: 500, &amp;quot;total&amp;quot;: 3 }
  }  &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Now &lt;code&gt;--format toon&lt;/code&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;issues[3]{key,rule,severity,type,component,line,message,status,effort}:
  AZ1002fQ9x,&amp;quot;javasecurity:S3649&amp;quot;,BLOCKER,VULNERABILITY,my-org_my-app:src/main/java/com/acme/UserRepo.java,29,Change this code to not construct SQL queries directly from user-controlled data.,OPEN,5min
  AZ1007fQ9x,&amp;quot;java:S2076&amp;quot;,BLOCKER,VULNERABILITY,my-org_my-app:src/main/java/com/acme/AuthFilter.java,61,Make sure that constructing this OS command is safe  here.,OPEN,30min
  AZ1013fQ9x,&amp;quot;java:S1481&amp;quot;,MINOR,CODE_SMELL,my-org_my-app:src/main/java/com/acme/OrderService.java,140,Remove this unused local variable.,OPEN,5min
paging:
  pageIndex: 1
  pageSize: 500
  total: 3&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Same data. The field names are declared once in the header (&lt;code&gt;{key,rule,severity,...}&lt;/code&gt;) instead of repeating on every record, and the braces, quotes, and repetition collapse into one row per issue. Crucially, the &lt;code&gt;[3]&lt;/code&gt; length and the field header give the model an explicit schema to validate against, so this is not a lossy shortcut like flattening to CSV.&lt;/p&gt;&lt;h2&gt;How much does TOON reduce token usage compared to JSON?&lt;/h2&gt;&lt;p&gt;I generated a representative 25-issue result (the fields &lt;code&gt;sonar list issues&lt;/code&gt; returns: key, rule, severity, type, component, project, line, message, status, effort, totals, paging, and next fields like flows and impacts) and encoded it three ways. Character counts, which are tokenizer-independent and easy to reproduce:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Format&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Characters&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;vs default&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;code&gt;--format json&lt;/code&gt; (pretty, the default)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;9,655&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt; baseline&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;JSON, minified&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;7,372&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;−24%&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;code&gt;--format toon&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;4,909&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;−49%&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;So TOON is about &lt;strong&gt;half the size of the default JSON&lt;/strong&gt; and &lt;strong&gt;a third smaller than even minified JSON&lt;/strong&gt;, by character count, on this payload.&lt;/p&gt;&lt;p&gt;Characters are not tokens, though, and this is where TOON does better than a simple size ratio suggests. Because its structure is so regular (one header, then uniform rows), it tokenizes efficiently. The TOON project&amp;#x27;s own benchmark suite, counted with the GPT-5 &lt;code&gt;o200k_base&lt;/code&gt; &lt;a href=&quot;https://github.com/toon-format/toon&quot;&gt;tokenizer&lt;/a&gt;, reports for uniform tabular datasets (the same shape as an issues list):&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;−60.7% tokens versus pretty JSON&lt;/strong&gt; and &lt;strong&gt;−36.9% versus compact JSON&lt;/strong&gt; on the 100-row uniform employee records dataset.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;−41.7% versus pretty JSON&lt;/strong&gt; on the 100-repository GitHub dataset.&lt;/li&gt;&lt;li&gt;Across 244 retrieval questions on four models, TOON scored &lt;strong&gt;72.2% accuracy versus JSON&amp;#x27;s 71.4% while using 42.6% fewer tokens&lt;/strong&gt;. Claude Haiku 4.5 was one of the four models, and TOON scored marginally higher there too (65.6% vs 63.5%).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The honest headline: for an issues list, expect &lt;strong&gt;roughly a third to a half fewer tokens than JSON&lt;/strong&gt;, depending on whether your baseline is minified or pretty and which tokenizer your agent uses. And you are not trading comprehension for size; the accuracy held or improved.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;A note on method.&lt;/strong&gt; The character numbers above are mine, measured on a representative payload. The token percentages are from the TOON project&amp;#x27;s published benchmarks (o200k_base). I could not run a tokenizer in my sandbox to produce a Sonar-specific token count, which is exactly why the next section shows you how to get the real number for &lt;em&gt;your&lt;/em&gt; data.&lt;/p&gt;&lt;h2&gt;Measure it yourself&lt;/h2&gt;&lt;p&gt;The TOON CLI has a &lt;code&gt;--stats&lt;/code&gt; flag that prints the token savings for any JSON you feed it. Point it at real Sonar output:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;# Grab your issues as JSON (the default)
sonar list issues -p my-org_my-app --severities BLOCKER,CRITICAL --format json &amp;gt; issues.json

# Convert to TOON and print the token-savings report
npx @toon-format/cli issues.json --stats&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Then, once you have seen the number, wire the compact form straight into whatever consumes it:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sonar list issues -p my-org_my-app --format toon&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Two flag facts worth knowing: &lt;code&gt;sonar list issues&lt;/code&gt; require &lt;code&gt;--project&lt;/code&gt; (&lt;code&gt;-p&lt;/code&gt;), and &lt;code&gt;--format&lt;/code&gt; accepts &lt;code&gt;json&lt;/code&gt; (default), &lt;code&gt;toon&lt;/code&gt;, &lt;code&gt;table&lt;/code&gt;, and &lt;code&gt;csv&lt;/code&gt;. Use a &lt;code&gt;table&lt;/code&gt; when a human is reading, &lt;code&gt;toon&lt;/code&gt; when an agent is.&lt;/p&gt;&lt;h2&gt;When should you use JSON instead of TOON for LLM input?&lt;/h2&gt;&lt;p&gt;TOON is not a universal win, and saying so keeps you honest with your own FinOps stakeholders. Its advantage comes from uniform, tabular data. For deeply nested or non-uniform structures, compact JSON can actually use fewer tokens. An issues list is uniform, so it lands squarely in TOON&amp;#x27;s favor; a deeply nested config blob would not. When in doubt, run it through &lt;code&gt;--stats&lt;/code&gt; and let the number decide.&lt;/p&gt;&lt;h2&gt;The bigger picture: three places Sonar trims the token bill&lt;/h2&gt;&lt;p&gt;The reason this matters beyond one flag is that Sonar&amp;#x27;s research reframed the cost problem. In a controlled 540-run study, cleaner codebases used &lt;a href=&quot;https://www.sonarsource.com/blog/a-cleaner-codebase-results-in-less-token-usage/&quot;&gt;&lt;strong&gt;7.2% fewer input tokens and 8.5% fewer output tokens&lt;/strong&gt;&lt;/a&gt; with no drop in task completion. The mechanism is the quotable part: &lt;em&gt;what drives the cost is not how much the agent writes, it is how much it has to look at.&lt;/em&gt; Format the world compactly and give the agent less to wade through, and the bill drops.&lt;/p&gt;&lt;p&gt;That single idea shows up in three places, and &lt;code&gt;--format toon&lt;/code&gt; is the cheapest of them:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;On the way in: Sonar Vortex Context Augmentation.&lt;/strong&gt; Instead of letting the agent blind-read entire files to build a mental model, Vortex injects only the relevant guidelines, architecture, and semantic-navigation results before the agent writes. Sonar reports this cuts token consumption by &lt;a href=&quot;https://www.sonarsource.com/blog/introducing-sonar-vortex/&quot;&gt;up to &lt;strong&gt;36%&lt;/strong&gt;&lt;/a&gt;, largely by replacing broad file reads with precise, structured context.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Across the whole session: cleaner code.&lt;/strong&gt; The 540-run result above. Verified, gate-passing code is simply cheaper to operate on, run after run.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;On the way out: compact tool results.&lt;/strong&gt; When the agent reads your issues or dependency risks, &lt;code&gt;--format toon&lt;/code&gt; is the same &amp;quot;same information, fewer tokens&amp;quot; move applied to Sonar&amp;#x27;s own output — &lt;code&gt;sonar list issues&lt;/code&gt; and &lt;code&gt;sonar analyze dependency-risks&lt;/code&gt; both accept it. It is a one-line change with no downstream cost, because TOON is a lossless representation of the JSON your scripts already parse.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Context Augmentation trims the input side; TOON trims the tool-result side; clean code trims the whole session. They stack. If you are trying to put a number on &amp;quot;our agent spend is a code-quality problem,&amp;quot; this is the flag you can ship this afternoon while the larger work lands.&lt;/p&gt;&lt;h2&gt;How to get started reducing token usage with Sonar and TOON&lt;/h2&gt;&lt;p&gt;Switching &lt;code&gt;sonar list issues&lt;/code&gt; to &lt;code&gt;--format toon&lt;/code&gt; cuts the size of the data your agent ingests by roughly a third to a half versus JSON, with equal or better comprehension, and you can prove the exact token figure on your own data with &lt;code&gt;npx @toon-format/cli --stats&lt;/code&gt;. It is the smallest, most reversible entry into the tokenomics-of-quality story, and it points straight at the bigger levers: Context Augmentation on the input side and clean, verified code across the session.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Claude Code hooks and how Sonar Vortex verifies AI code inside the loop]]></title><description><![CDATA[Learn how Claude Code hooks enforce deterministic AI guardrails and how Sonar Vortex verifies AI generated code inside the development loop.]]></description><link>https://www.sonarsource.com/blog/claude-code-hooks-and-how-sonar-vortex-verifies-ai-code/</link><guid isPermaLink="false">en:4e0311ba-d2ee-4020-a4b9-fd51bb85f611</guid><dc:creator><![CDATA[Prasenjit Sarkar]]></dc:creator><pubDate>Mon, 17 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;An agent deleted &lt;a href=&quot;https://x.com/mattshumer_/status/2075657271401390161&quot;&gt;someone&amp;#x27;s home folder&lt;/a&gt;. Again.&lt;/p&gt;&lt;p&gt;This story is becoming all too familiar: A &lt;a href=&quot;https://www.sonarsource.com/resources/library/what-is-an-ai-agent/&quot;&gt;coding agent&lt;/a&gt; runs &lt;code&gt;rm -rf&lt;/code&gt;, a tilde expands to the wrong path, and twenty years of files are gone. The agent apologizes in flawless prose. The files do not come back. When it happens, experienced engineers reach for a hook, not a better prompt.&lt;/p&gt;&lt;p&gt;This article is a hands-on tour of how this process typically works. First we build hooks by hand in Claude Code. The event model, the exact JSON contract, and two working scripts you can drop into a repo today. Then we follow the same mechanism into production, because &lt;a href=&quot;https://www.sonarsource.com/products/sonar-vortex/&quot;&gt;Sonar Vortex&amp;#x27;s&lt;/a&gt; agentic analysis isn&amp;#x27;t a different idea bolted onto your agent. It is this idea, a deterministic check wired into a fixed point in the agent&amp;#x27;s loop, applied to the thing that actually breaks the code the agent writes.&lt;/p&gt;&lt;h2&gt;Why a hook, and not a better prompt&lt;/h2&gt;&lt;p&gt;The uncomfortable admission behind the whole &amp;quot;harness&amp;quot; conversation is that you cannot instruct your way to safety. You can write &amp;quot;&lt;em&gt;never delete files without asking&lt;/em&gt;&amp;quot; in the README. You can put it in&lt;code&gt; CLAUDE.md&lt;/code&gt;, in capitals. It still isn&amp;#x27;t a guarantee.The agent will comply most of the time, which is precisely the problem, because &amp;quot;most of the time&amp;quot; is not a safety property. A model is a probabilistic system that samples its next move from a distribution. Capability is climbing fast; reliability on the long tail is not climbing with it. An assistant that nails 90% of tasks and fails strangely on the other 10% is useful as an assistant and a liability as an unattended autonomous system.&lt;/p&gt;&lt;p&gt;A hook is the opposite. It is deterministic code that runs every single time, at a known moment, whether or not the model thought to ask for it. You are wrapping a system you can&amp;#x27;t fully trust in a layer you wrote yourself. That is the entire idea, and it is why four competing harnesses (Claude Code, Codex CLI, Cursor, Gemini CLI) converged on the same primitive inside a year. When the field agrees on something that fast, it&amp;#x27;s not a fad. It&amp;#x27;s the shape of the problem.&lt;/p&gt;&lt;p&gt;Claude Code is the canonical implementation, so we&amp;#x27;ll use it throughout.&lt;/p&gt;&lt;h2&gt;What are Claude Code hooks and how do they work?&lt;/h2&gt;&lt;p&gt;A hook is a command wired into the agent&amp;#x27;s loop at a fixed event. The agent is about to do something: submit your prompt to the model, call a tool, finish its turn. Before or after that moment, your command runs. It receives a JSON description of what&amp;#x27;s happening on &lt;strong&gt;stdin&lt;/strong&gt;, and it answers in one of two channels: an &lt;strong&gt;exit code&lt;/strong&gt;, or a &lt;strong&gt;JSON object on stdout&lt;/strong&gt;. That answer can allow, deny, or block the action; it can feed information back to the model; it can quietly fix or log things after the fact.&lt;/p&gt;&lt;p&gt;Claude Code exposes 30 of these events. The ones you&amp;#x27;ll use most:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Event&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Fires&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Typical use&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;code&gt;SessionStart&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;When a session starts, resumes, or clears&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Inject project context the model should always have&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;code&gt;UserPromptSubmit&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;When you submit a prompt, before the model sees it&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Scan or enrich the prompt; block on policy&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;code&gt;PreToolUse&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Before any tool call executes&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Allow / deny / ask; the primary guardrail point&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;code&gt;PostToolUse&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;After a tool call succeeds&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Verify results, format, feed findings back to the model&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;code&gt;Stop&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;When the agent finishes responding&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Gate &amp;quot;done&amp;quot;: run tests, block completion if they fail&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;code&gt;SubagentStop&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;When a subagent finishes&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Same, for delegated work&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;code&gt;Notification&lt;/code&gt; / &lt;code&gt;PreCompact&lt;/code&gt; / &lt;code&gt;SessionEnd&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;On notifications, before compaction, at session end&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Observability, archival, cleanup&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Everything below lives in three of these: &lt;code&gt;PreToolUse&lt;/code&gt; for prevention, &lt;code&gt;PostToolUse&lt;/code&gt; for verification, and &lt;code&gt;SessionStart&lt;/code&gt; for context. Those three carry the &lt;a href=&quot;https://www.sonarsource.com/agent-centric-development/&quot;&gt;Guide and Verify&lt;/a&gt; story.&lt;/p&gt;&lt;h2&gt;The contract: stdin in, exit code or JSON out&lt;/h2&gt;&lt;p&gt;Every hook is just a program. Configuration lives in &lt;code&gt;.claude/settings.json&lt;/code&gt; (project) or &lt;code&gt;~/.claude/settings.json&lt;/code&gt; (user). The structure is an event name, a list of matcher groups, and the commands to run for each match:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;{
    &amp;quot;hooks&amp;quot;: {
      &amp;quot;PreToolUse&amp;quot;: [
        {
          &amp;quot;matcher&amp;quot;: &amp;quot;Bash&amp;quot;,
          &amp;quot;hooks&amp;quot;: [
            { &amp;quot;type&amp;quot;: &amp;quot;command&amp;quot;, &amp;quot;command&amp;quot;: &amp;quot;$CLAUDE_PROJECT_DIR/.claude/hooks/guard-bash.sh&amp;quot; }
          ]
        }
      ],
      &amp;quot;PostToolUse&amp;quot;: [
        {
          &amp;quot;matcher&amp;quot;: &amp;quot;Edit|Write|MultiEdit&amp;quot;,
          &amp;quot;hooks&amp;quot;: [
            { &amp;quot;type&amp;quot;: &amp;quot;command&amp;quot;, &amp;quot;command&amp;quot;: &amp;quot;$CLAUDE_PROJECT_DIR/.claude/hooks/verify-edit.sh&amp;quot;, &amp;quot;timeout&amp;quot;: 120 }
          ]
        }
      ]
    }
  }  &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;The &lt;code&gt;matcher&lt;/code&gt; is matched against the tool name. &lt;code&gt;&amp;quot;Bash&amp;quot;&lt;/code&gt; matches exactly; &lt;code&gt;&amp;quot;Edit|Write&amp;quot;&lt;/code&gt; is a regex that matches either of the two file-writing tools; &lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt; matches everything. &lt;code&gt;$CLAUDE_PROJECT_DIR&lt;/code&gt; expands to the repository root so your hook paths don&amp;#x27;t depend on the working directory.&lt;/p&gt;&lt;p&gt;When the event fires, Claude Code pipes a JSON object to your command&amp;#x27;s stdin. A &lt;code&gt;PreToolUse&lt;/code&gt; payload for a shell command looks like this:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;{
    &amp;quot;session_id&amp;quot;: &amp;quot;abc123&amp;quot;,
    &amp;quot;transcript_path&amp;quot;: &amp;quot;/Users/you/.claude/projects/.../transcript.jsonl&amp;quot;,
    &amp;quot;cwd&amp;quot;: &amp;quot;/Users/you/project&amp;quot;,
    &amp;quot;hook_event_name&amp;quot;: &amp;quot;PreToolUse&amp;quot;,
    &amp;quot;tool_name&amp;quot;: &amp;quot;Bash&amp;quot;,
    &amp;quot;tool_input&amp;quot;: { &amp;quot;command&amp;quot;: &amp;quot;rm -rf ~/&amp;quot;, &amp;quot;description&amp;quot;: &amp;quot;clean up&amp;quot; }
  }  &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;For an &lt;code&gt;Edit&lt;/code&gt;, &lt;code&gt;tool_input&lt;/code&gt; carries &lt;code&gt;file_path&lt;/code&gt;, &lt;code&gt;old_string&lt;/code&gt;, and &lt;code&gt;new_string&lt;/code&gt;; for a &lt;code&gt;Write&lt;/code&gt;, &lt;code&gt;file_path&lt;/code&gt; and &lt;code&gt;content&lt;/code&gt;. The field you&amp;#x27;ll reach for constantly is &lt;code&gt;.tool_input.file_path&lt;/code&gt;, the file the agent just touched. (Shapes evolve between versions; run &lt;code&gt;claude --debug&lt;/code&gt; to see the exact payload your version emits before you write jq against it.)&lt;/p&gt;&lt;p&gt;Your hook answers on two channels:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Exit code.&lt;/strong&gt; &lt;code&gt;0&lt;/code&gt; means success; for most events, Claude Code will then parse structured JSON from stdout if you printed any. &lt;code&gt;2&lt;/code&gt; is a &lt;em&gt;blocking&lt;/em&gt; error: the action is denied (or, for &lt;code&gt;PostToolUse&lt;/code&gt;, flagged) and whatever you wrote to &lt;strong&gt;stderr&lt;/strong&gt; is fed back to the model as feedback. Any other exit code is a non-blocking error: the action proceeds and stderr is surfaced as a warning.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;JSON on stdout.&lt;/strong&gt; For fine-grained control, print a JSON object. The important part is &lt;code&gt;hookSpecificOutput&lt;/code&gt;. For &lt;code&gt;PreToolUse&lt;/code&gt; it carries a &lt;code&gt;permissionDecision&lt;/code&gt; of &lt;code&gt;&amp;quot;allow&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;deny&amp;quot;&lt;/code&gt;, or &lt;code&gt;&amp;quot;ask&amp;quot;&lt;/code&gt;, with a &lt;code&gt;permissionDecisionReason&lt;/code&gt;. For &lt;code&gt;PostToolUse&lt;/code&gt;, &lt;code&gt;SessionStart&lt;/code&gt;, and &lt;code&gt;UserPromptSubmit&lt;/code&gt; it carries &lt;code&gt;additionalContext&lt;/code&gt;, a string injected into the model&amp;#x27;s context.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Two channels, one principle: exit code &lt;code&gt;2&lt;/code&gt; is the blunt &amp;quot;no,&amp;quot; JSON stdout is the precise &amp;quot;here&amp;#x27;s exactly what to do and why.&amp;quot; Guardrails tend to use the exit code. Context injection uses JSON.&lt;/p&gt;&lt;h2&gt;Warm-up: The guardrail from every disaster thread&lt;/h2&gt;&lt;p&gt;Here is the canonical example: a &lt;code&gt;PreToolUse&lt;/code&gt; hook that inspects shell commands and refuses a recursive &lt;code&gt;rm&lt;/code&gt; whose target includes a slash, a tilde, or &lt;code&gt;$HOME&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;&lt;code&gt;.claude/hooks/guard-bash.sh&lt;/code&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#!/usr/bin/env bash
set -uo pipefail

input=$(cat)
cmd=$(printf &amp;#39;%s&amp;#39; &amp;quot;$input&amp;quot; | jq -r &amp;#39;.tool_input.command // empty&amp;#39;)

# Deny recursive rm that targets a home/root path.
if printf &amp;#39;%s&amp;#39; &amp;quot;$cmd&amp;quot; | grep -Eq &amp;#39;rm[[:space:]]+(-[a-zA-Z]*r[a-zA-Z]*[[:space:]]+)+.*(/|~|\$HOME)&amp;#39;; then
  cat &amp;lt;&amp;lt;&amp;#39;JSON&amp;#39;
{
  &amp;quot;hookSpecificOutput&amp;quot;: {
    &amp;quot;hookEventName&amp;quot;: &amp;quot;PreToolUse&amp;quot;,
    &amp;quot;permissionDecision&amp;quot;: &amp;quot;deny&amp;quot;,
    &amp;quot;permissionDecisionReason&amp;quot;: &amp;quot;Recursive delete of a home/root path was blocked by policy. Narrow the target or delete specific files.&amp;quot;
  }
}
JSON
  exit 0
fi

exit 0&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;The agent proposes &lt;code&gt;rm -rf ~/&lt;/code&gt;. The hook fires before the command runs, matches the pattern, and returns &lt;code&gt;deny&lt;/code&gt;. Claude Code never executes it. The model is told no, told why, and moves on. No guessing involved: the same input produces the same decision every time.&lt;/p&gt;&lt;p&gt;This is both genuinely useful and genuinely limited. The pattern is deliberately blunt: it will also catch deletes you meant to run, and a determined agent can phrase a destructive command to slip past it. A regex denylist catches the failure you already imagined. It does nothing about the one you didn&amp;#x27;t. &lt;/p&gt;&lt;h2&gt;The higher-value move: Verify what the agent &lt;em&gt;writes&lt;/em&gt;&lt;/h2&gt;&lt;p&gt;Deleting your home folder is the dramatic failure. The common one is quieter: the AI agent writes code that looks right, passes a glance, and carries a hard-coded credential, an injection sink, a null-dereference, or a subtle break of an architectural boundary. That code doesn&amp;#x27;t announce itself. It flows into a pull request and, often, through review.&lt;/p&gt;&lt;p&gt;&lt;code&gt;PostToolUse&lt;/code&gt; is the natural place to catch it, because it fires immediately after every &lt;code&gt;Edit&lt;/code&gt; and &lt;code&gt;Write&lt;/code&gt;, while the change is fresh and the agent is still in the loop, long before CI. The pattern: read the file that just changed, analyze it, and if the analysis finds something serious, exit &lt;code&gt;2&lt;/code&gt; with the findings on stderr. On &lt;code&gt;PostToolUse&lt;/code&gt;, exit &lt;code&gt;2&lt;/code&gt; doesn&amp;#x27;t undo the edit that already ran; it feeds your stderr back to the model, which then fixes the code before doing anything else.&lt;/p&gt;&lt;p&gt;A first cut might shell out to whatever linter you have:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#!/usr/bin/env bash
set -uo pipefail
input=$(cat)
file=$(printf &amp;#39;%s&amp;#39; &amp;quot;$input&amp;quot; | jq -r &amp;#39;.tool_input.file_path // empty&amp;#39;)
[ -z &amp;quot;$file&amp;quot; ] || [ ! -f &amp;quot;$file&amp;quot; ] &amp;amp;&amp;amp; exit 0

# e.g. ruff for Python, eslint for JS/TS, etc.
if ! output=$(ruff check &amp;quot;$file&amp;quot; 2&amp;gt;&amp;amp;1); then
  echo &amp;quot;Lint failed for $file. Fix before continuing:&amp;quot; &amp;gt;&amp;amp;2
  echo &amp;quot;$output&amp;quot; &amp;gt;&amp;amp;2
  exit 2
fi
exit 0&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;This works, and for style and simple bugs it&amp;#x27;s fine. But lean on &lt;code&gt;ruff&lt;/code&gt; as your safety layer and the cracks show quickly. A fast, file-oriented linter like &lt;code&gt;ruff&lt;/code&gt; checks each file mostly in isolation, so it won&amp;#x27;t follow tainted data from an HTTP handler through three files into a SQL string, and it doesn&amp;#x27;t model your architecture, so it can&amp;#x27;t tell you the agent just made the domain layer import the web layer. Cross-file tools do exist (a type checker like &lt;code&gt;tsc&lt;/code&gt;, a linter like &lt;code&gt;clippy&lt;/code&gt;), but they verify types and language rules, not security taint or architectural constraints. And whatever you pick, its rule set is yours to curate and keep current, and its false positives train the agent (and you) to ignore it. You&amp;#x27;ve wired up a real guardrail on a foundation built to check syntax and style, not to reason about security and design.&lt;/p&gt;&lt;p&gt;That gap, a deterministic hook at the right moment but shallow analysis behind it, is exactly what Sonar Vortex fills.&lt;/p&gt;&lt;h2&gt;What is Sonar Vortex and how does it work with AI coding agents?&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/products/sonar-vortex/&quot;&gt;Sonar Vortex&lt;/a&gt; sits inside the agent&amp;#x27;s coding loop and does two things: it &lt;strong&gt;guides&lt;/strong&gt; the agent with project-specific context before it writes, and it &lt;strong&gt;verifies&lt;/strong&gt; every change in real time with SonarQube&amp;#x27;s analysis engine, the same engine teams already trust in CI. The code verification half is called &lt;strong&gt;agentic analysis&lt;/strong&gt;, and the reason it belongs in this article is that, on Claude Code, it is delivered as a &lt;code&gt;PostToolUse&lt;/code&gt; hook. It&amp;#x27;s the &lt;code&gt;verify-edit.sh&lt;/code&gt; pattern above, except the thing behind the hook is a full static-analysis engine with your project&amp;#x27;s real context, not a single-file linter.&lt;/p&gt;&lt;p&gt;The interesting engineering is how it gets CI-level precision at inner-loop speed. Agentic analysis works in two phases. During a normal CI analysis, SonarQube collects and stores the context a precise analysis needs (dependencies, compiled artifacts, type hierarchies, import graphs, build configuration), tagged by project key and branch. Then, when the agent edits a file, agentic analysis &lt;strong&gt;restores&lt;/strong&gt; that stored context on demand and analyzes just the changed file against it. You get the accuracy of a full scan, with the same type-aware rules and quality + profiles as CI, without re-scanning the whole project on every keystroke.&lt;/p&gt;&lt;p&gt;Analysis runs at two depths, and the difference matters here. &lt;code&gt;STANDARD&lt;/code&gt; analyzes each file on its own and is the default for a single file, which is what the per-edit hook above triggers: cheap enough to sit in the inner loop after every change. &lt;code&gt;DEEP&lt;/code&gt; adds cross-file taint tracking and can surface multi file findings and trace data flows, following tainted input across files into a sink, and is the default for a change set, so you reach it through a CLI command like &lt;code&gt;sonar analyze agentic --staged&lt;/code&gt; or an end-of-turn verification pass (the kind the &lt;code&gt;CLAUDE.md&lt;/code&gt; directive tells the agent to run once its edits are done). Standard keeps the per-edit loop fast; deep is where the cross-file security analysis happens.&lt;/p&gt;&lt;p&gt;That closes the loop. The agent writes code. The &lt;code&gt;PostToolUse&lt;/code&gt; hook runs agentic analysis with full context. Findings, with rule keys and severities, come back into the loop. The agent fixes them and the hook re-runs. Code that would have failed the quality gate gets corrected before it ever reaches a pull request, instead of bouncing back from review days later.&lt;/p&gt;&lt;h2&gt;Hands-on: Wire it into Claude Code&lt;/h2&gt;&lt;p&gt;There are three setup paths. The fastest is the official plugin, which installs and configures everything for you.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Path A: The SonarQube plugin (recommended).&lt;/strong&gt; From inside Claude Code:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;/plugin install sonarqube@claude-plugins-official&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Restart Claude Code (or &lt;code&gt;/reload-plugins&lt;/code&gt;), then run the guided integration skill from a session opened in your project:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;/sonarqube:sonar-integrate&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;That skill installs the &lt;a href=&quot;https://www.sonarsource.com/sonarqube/cli/&quot;&gt;SonarQube CLI&lt;/a&gt; if it&amp;#x27;s missing, authenticates you (&lt;code&gt;sonar auth login&lt;/code&gt; opens a browser and stores a user token in your OS keychain), and runs &lt;code&gt;sonar integrate claude&lt;/code&gt;, which writes the hooks and MCP configuration into your project&amp;#x27;s &lt;code&gt;.claude/&lt;/code&gt; directory. Prerequisites: a SonarQube Cloud organization, Node.js (the &lt;code&gt;SessionStart&lt;/code&gt; hook needs it), and a container runtime (Docker, Podman, or nerdctl) to run the MCP server image.&lt;/p&gt;&lt;p&gt;On the next start you&amp;#x27;ll see the &lt;code&gt;SessionStart&lt;/code&gt; hook confirm what&amp;#x27;s live:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;SessionStart:startup says: SonarQube plugin initialised.

       sonarqube-cli: ✓ found

       SonarQube hooks: ✓ Secrets Detection, Agentic Analysis&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Read that line closely, because it&amp;#x27;s the whole thesis of this article restated by the tool itself. &lt;code&gt;sonar integrate claude&lt;/code&gt; installs a small family of hooks:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;a &lt;code&gt;UserPromptSubmit&lt;/code&gt; hook and a &lt;code&gt;PreToolUse&lt;/code&gt; hook for &lt;strong&gt;secrets detection&lt;/strong&gt;: they scan your prompts and any file the agent is about to read or write, and block operations that would expose a credential;&lt;/li&gt;&lt;li&gt;a &lt;code&gt;PostToolUse&lt;/code&gt; hook for &lt;strong&gt;agentic analysis&lt;/strong&gt; (SonarQube Cloud, project-level installs) that runs analysis on your changes after edits, with no further wiring; and&lt;/li&gt;&lt;li&gt;the SonarQube &lt;strong&gt;MCP server&lt;/strong&gt;, so the agent can pull projects, issues, and rules, plus a project-scoped &lt;strong&gt;context-augmentation skill&lt;/strong&gt; for the guide half.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Every deterministic guarantee Sonar Vortex adds to Claude Code rides on the exact primitive we built by hand.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Path B: The CLI directly.&lt;/strong&gt; If you&amp;#x27;d rather not use the plugin, install the CLI and run one command from your repo:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;curl -o- https://raw.githubusercontent.com/SonarSource/sonarqube-cli/refs/heads/master/user-scripts/install.sh | bash

sonar auth login

sonar integrate claude --project &amp;lt;YourProjectKey&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Same result: the agentic-analysis hook and secrets hooks are installed and bound to your project key. Under the hood the verification step runs:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sonar analyze agentic --file src/app.ts     # analyze a single file
sonar analyze agentic --staged              # analyze staged changes&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Two details worth knowing for scripting. &lt;code&gt;sonar analyze agentic&lt;/code&gt; &lt;strong&gt;exits with code &lt;code&gt;51&lt;/code&gt; when it reports issues&lt;/strong&gt; and &lt;code&gt;0&lt;/code&gt; when clean, a documented signal you can branch on. &lt;/p&gt;&lt;p&gt;The exit code gives you a clean signal to branch on, with no fragile output parsing. The case that&amp;#x27;s easy to get wrong is the last one: &lt;code&gt;0&lt;/code&gt; means clean, &lt;code&gt;51&lt;/code&gt; means issues were found, and anything else means the CLI itself failed (auth, a server error, a bad flag), which should surface loudly instead of falling through to a silent pass:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#!/usr/bin/env bash
# .claude/hooks/verify-edit.sh: run SonarQube agentic analysis after an edit
set -uo pipefail

input=$(cat)
file=$(printf &amp;#39;%s&amp;#39; &amp;quot;$input&amp;quot; | jq -r &amp;#39;.tool_input.file_path // empty&amp;#39;)
[ -z &amp;quot;$file&amp;quot; ] || [ ! -f &amp;quot;$file&amp;quot; ] &amp;amp;&amp;amp; exit 0

case &amp;quot;$file&amp;quot; in
  *.py|*.js|*.ts|*.tsx|*.java|*.cs|*.cpp) ;;
  *) exit 0 ;;   # only analyze source we care about
esac

report=$(sonar analyze agentic --file &amp;quot;$file&amp;quot; --format text 2&amp;gt;&amp;amp;1)
status=$?

case &amp;quot;$status&amp;quot; in
  0) exit 0 ;;                          # clean: nothing to do
  51)                                   # issues reported: block and feed them back
    {
      echo &amp;quot;SonarQube agentic analysis reported issues in $file.&amp;quot;
      echo &amp;quot;Fix them before continuing:&amp;quot;
      echo &amp;quot;$report&amp;quot;
    } &amp;gt;&amp;amp;2
    exit 2 ;;                           # exit 2 surfaces stderr to the model
  *)                                    # auth, server, or command error: do not pass silently
    {
      echo &amp;quot;SonarQube analysis could not run for $file (exit $status); code was NOT verified:&amp;quot;
      echo &amp;quot;$report&amp;quot;
    } &amp;gt;&amp;amp;2
    exit 1 ;;                           # non-blocking warning; use exit 2 to fail closed instead
esac&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;That last branch is a real design choice: exit &lt;code&gt;1&lt;/code&gt; surfaces the failure as a non-blocking warning and lets the turn continue, while exit &lt;code&gt;2&lt;/code&gt; would fail closed and make the agent stop until analysis works again. (The managed integration installs its own equivalent; this is the shape of what it does, useful if you want to customize behavior.)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Path C: The MCP server directly.&lt;/strong&gt; If you want the analysis and context tools available to the agent explicitly, including the context-augmentation tools for the &lt;strong&gt;Guide&lt;/strong&gt; phase, configure the MCP server in Claude Code&amp;#x27;s &lt;code&gt;.mcp.json&lt;/code&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;{
    &amp;quot;mcpServers&amp;quot;: {
      &amp;quot;sonarqube&amp;quot;: {
        &amp;quot;command&amp;quot;: &amp;quot;docker&amp;quot;,
        &amp;quot;alwaysLoad&amp;quot;: true,
        &amp;quot;args&amp;quot;: [
          &amp;quot;run&amp;quot;, &amp;quot;-i&amp;quot;, &amp;quot;--rm&amp;quot;, &amp;quot;--pull=always&amp;quot;,
          &amp;quot;-e&amp;quot;, &amp;quot;SONARQUBE_URL&amp;quot;,
          &amp;quot;-e&amp;quot;, &amp;quot;SONARQUBE_TOKEN&amp;quot;,
          &amp;quot;-e&amp;quot;, &amp;quot;SONARQUBE_ORG&amp;quot;,
          &amp;quot;-e&amp;quot;, &amp;quot;SONARQUBE_PROJECT_KEY&amp;quot;,
          &amp;quot;-e&amp;quot;, &amp;quot;SONARQUBE_TOOLSETS&amp;quot;,
          &amp;quot;-v&amp;quot;, &amp;quot;/ABSOLUTE/PATH/TO/YOUR/PROJECT:/app/mcp-workspace:rw&amp;quot;,
          &amp;quot;sonarsource/sonarqube-mcp&amp;quot;
        ],
        &amp;quot;env&amp;quot;: {
          &amp;quot;SONARQUBE_URL&amp;quot;: &amp;quot;https://sonarcloud.io&amp;quot;,
          &amp;quot;SONARQUBE_ORG&amp;quot;: &amp;quot;&amp;lt;YourOrganizationKey&amp;gt;&amp;quot;,
          &amp;quot;SONARQUBE_PROJECT_KEY&amp;quot;: &amp;quot;&amp;lt;YourProjectKey&amp;gt;&amp;quot;,
          &amp;quot;SONARQUBE_TOOLSETS&amp;quot;: &amp;quot;cag,analysis&amp;quot;
        }
      }
    }
  }  &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Export your token in the shell first (&lt;code&gt;export SONARQUBE_TOKEN=&amp;quot;&amp;lt;YourUserToken&amp;gt;&amp;quot;&lt;/code&gt;). The canonical agentic-analysis tool the model calls is &lt;code&gt;run_advanced_code_analysis&lt;/code&gt; (parameters: &lt;code&gt;projectKey&lt;/code&gt;, &lt;code&gt;branchName&lt;/code&gt;, &lt;code&gt;filePath&lt;/code&gt;, &lt;code&gt;fileScope&lt;/code&gt;), which requires the local filesystem mount you see above. Two Claude-Code-specific gotchas: the context-augmentation (`cag`) tools only work with a locally running MCP server plus that mount (the Cloud-hosted MCP server doesn&amp;#x27;t expose them); and because those tools fire automatically from their descriptions, they have to be loaded from the first turn. Claude Code&amp;#x27;s tool search lazy-loads MCP tools by default, so the `alwaysLoad: true` shown above forces just the Sonar server&amp;#x27;s tools to load eagerly at startup. Setting `ENABLE_TOOL_SEARCH=false` achieves the same thing but is a blunter instrument: it disables deferral for every MCP tool you have configured, not only Sonar&amp;#x27;s.&lt;/p&gt;&lt;h2&gt;Guide → Verify → Solve, mapped to events&lt;/h2&gt;&lt;p&gt;Sonar frames these stages as the &lt;a href=&quot;https://www.sonarsource.com/agent-centric-development/&quot;&gt;Agent Centric Development Cycle&lt;/a&gt;: a continuous &lt;strong&gt;Guide → Verify → Solve&lt;/strong&gt; loop. Read through the hook lens, each pillar maps to an event:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Pillar&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Event&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Delivery&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Guide&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Inject coding guidelines, architecture, dependency health, and semantic navigation before the agent writes&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Context augmentation via the installed skill + CLI/MCP tools (&lt;code&gt;get_guidelines&lt;/code&gt;, &lt;code&gt;get_current_architecture&lt;/code&gt;, &lt;code&gt;check_dependency&lt;/code&gt;, …)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Verify&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Analyze the changed file with full CI context; return findings&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Agentic analysis via the &lt;code&gt;PostToolUse&lt;/code&gt; hook (&lt;code&gt;sonar analyze agentic&lt;/code&gt; / &lt;code&gt;run_advanced_code_analysis&lt;/code&gt;)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Solve&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Fix the issues found, then re-verify&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The agent fixes in-loop; SonarQube&amp;#x27;s Remediation Agent and AI CodeFix handle PR and backlog issues&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Guide sets the agent up to get it right the first time. Verify catches what slips through anyway. Solve closes it out. The reason the loop holds together is that each stage is a deterministic step at a fixed point, not a hope pinned on the model&amp;#x27;s good behavior. &lt;/p&gt;&lt;p&gt;Sonar reports the payoff across its testing and research: in its own Vortex benchmarks, up to &lt;a href=&quot;https://www.sonarsource.com/blog/cut-your-coding-agents-cost-with-sonar-semantic-code-navigation&quot;&gt;36% lower token&lt;/a&gt; consumption and &lt;a href=&quot;https://www.sonarsource.com/blog/introducing-sonar-vortex/&quot;&gt;92% fewer issues&lt;/a&gt;, resting on a measured &lt;a href=&quot;https://www.sonarsource.com/blog/how-sonarqube-minimizes-false-positives/&quot;&gt;3.2% false-positive rate&lt;/a&gt;; and separately, its &lt;a href=&quot;https://www.sonarsource.com/resources/developer-survey-report/&quot;&gt;State of Code survey&lt;/a&gt; finds teams using SonarQube are 44% less likely to experience outages caused by AI-generated code. The false-positive number is the load-bearing one: an in-loop check the agent learns to trust is worth far more than a noisy one it learns to route around.&lt;/p&gt;&lt;h2&gt;What are the security risks of Claude Code hooks?&lt;/h2&gt;&lt;p&gt;The mechanism that lets you customize an agent&amp;#x27;s behavior lets an attacker customize it, too. Hook definitions live in files inside the repository, so a malicious repository can ship its own. This is not hypothetical. In 2025, Check Point Research showed that a &lt;code&gt;SessionStart&lt;/code&gt; hook planted in a project&amp;#x27;s config could execute before Claude Code&amp;#x27;s trust prompt fired: an initialization-order flaw, not a race, with the trust check simply running too late in the load sequence. That turned merely opening a cloned repo into remote code execution (CVE-2025-59536, since patched; a companion flaw, CVE-2026-21852, exfiltrated API keys through the same project-load path). Your safety layer is also your largest new attack surface.&lt;/p&gt;&lt;p&gt;Good implementations are paranoid about this, and the patches above are why. Claude Code gates a project&amp;#x27;s configuration behind a trust prompt the first time you open an untrusted folder, and the read-only &lt;code&gt;/hooks&lt;/code&gt; menu lets you inspect every configured hook and see which settings file it came from. But note a sharp edge: hook definitions are hot-reloaded, so a direct edit to a settings file mid-session is normally picked up automatically by the file watcher rather than frozen at startup. That is exactly why you should treat your &lt;code&gt;.claude/&lt;/code&gt; hooks as security-sensitive code: pin them in version control, review changes in PRs, keep your tooling patched, and don&amp;#x27;t trust an untrusted repo&amp;#x27;s agent config unexamined. If a harness offers hooks without that posture, the hooks are the vulnerability, not the fix.&lt;/p&gt;&lt;p&gt;Note the shape of Sonar Vortex&amp;#x27;s own secrets protection here: a &lt;code&gt;PreToolUse&lt;/code&gt; hook that refuses to let the agent read or write a file that would leak a credential, and a &lt;code&gt;UserPromptSubmit&lt;/code&gt; hook that scans what you send. That&amp;#x27;s the guardrail pattern from the top of this article, pointed at a real threat: deterministic prevention, not a polite instruction.&lt;/p&gt;&lt;h2&gt;How do Claude Code hooks fit into a broader AI agent safety strategy?&lt;/h2&gt;&lt;p&gt;Hooks are a band of determinism wrapped around a core that will never be fully deterministic. That band is genuinely valuable (it&amp;#x27;s why this primitive spread across every major harness in a year), but a band is not a box. Pair it with real isolation: run the agent in a sandbox, a container, or a git worktree, somewhere the blast radius is a copy and not your actual home directory. Let the &lt;code&gt;PreToolUse&lt;/code&gt; hook catch the &lt;code&gt;rm -rf&lt;/code&gt; you thought of, let agentic analysis catch the vulnerability you didn&amp;#x27;t, and let the sandbox catch the failure nobody modeled.&lt;/p&gt;&lt;p&gt;The through-line of the whole &amp;quot;harness&amp;quot; conversation is that the model was never the product. The loop around the model is the product: the permissions, the sandbox, the hooks, the review gates, the analysis engine wired into the inner loop. All the boring machinery that decides what a guess is allowed to become. As models get more capable and more autonomous, that machinery isn&amp;#x27;t overhead. It&amp;#x27;s the job.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Your secrets are leaking to AI coding agents (and how to stop it)]]></title><description><![CDATA[Learn how AI coding agents can expose secrets and how local detection helps keep credentials from reaching model providers and external logs.]]></description><link>https://www.sonarsource.com/blog/your-secrets-are-leaking-to-ai-coding-agents/</link><guid isPermaLink="false">en:49cb276a-659d-4422-a828-a397397aff8a</guid><dc:creator><![CDATA[Taylor Luttrell-Williams]]></dc:creator><pubDate>Mon, 17 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/resources/library/what-is-an-ai-agent/&quot;&gt;AI coding agents&lt;/a&gt; prove useful in a number of ways, among them: they read &lt;em&gt;everything&lt;/em&gt;. Your source files, configs, environment variables, and even the errors in your terminal, are all fodder for agentic action. An agent consumes this information to better understand the task at hand, then transmits the relevant portions to a model to inform its response. That long reach is central to the value that these agents provide, but also raises a problem, because &lt;em&gt;everything&lt;/em&gt; might include your secrets.&lt;/p&gt;&lt;p&gt;As a blunt example, earlier this month, a security researcher captured xAI&amp;#x27;s Grok Build coding agent quietly uploading developers&amp;#x27; entire Git repositories to a cloud storage bucket. A canary API key and database password placed in a &lt;code&gt;.env&lt;/code&gt; file showed up verbatim and unredacted in the transmitted traffic (&lt;a href=&quot;https://cybernews.com/ai-news/grok-build-git-repository-upload/&quot;&gt;Cybernews&lt;/a&gt;, &lt;a href=&quot;https://thenextweb.com/news/grok-build-uploaded-entire-git-repositories-secrets&quot;&gt;The Next Web&lt;/a&gt;). But oftentimes it doesn’t take a dramatic bug to expose a secret; in reality, most leaks are far less conspicuous.&lt;/p&gt;&lt;h2&gt;How a secret reaches the model&lt;/h2&gt;&lt;p&gt;Secrets can reach a model in a number of ways, but we’ll focus on the two &lt;em&gt;worst&lt;/em&gt; offenders. Sometimes you hand over a secret yourself, pasting, for example, a failing API call into the chat (key and all) to ask why it keeps returning a 401. That path is at least visible. The other is quieter than a breach: to build context, the agent reads the files sitting in your project, and that often includes a &lt;code&gt;.env&lt;/code&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;# .env — sitting in your project root, read as &amp;quot;context&amp;quot;
DATABASE_URL=postgres://app:S3cr3t-Pa55@db.internal:5432/prod
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
OPENAI_API_KEY=sk-proj-3f9a...redacted&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Here, nothing malicious has happened. The agent did its job, but those values are now part of the prompt it sent to a model provider and, as a result, that prompt can get stored: in the provider&amp;#x27;s logs, and often in the logs of whatever gateway sits between you and the model (frequently in plain text). In this case, nobody typed the key into a chat box; it rode along with the context.&lt;/p&gt;&lt;p&gt;While the first example can be attributed to human oversight, the second is more subtle (and insidious) because it results from the default behavior of a helpful tool doing exactly what you asked of it. &lt;/p&gt;&lt;h2&gt;Why secrets are now harder to contain&lt;/h2&gt;&lt;p&gt;A secret committed to Git at least sits in one or more places that you can locate and scrub. Once it has traveled through an agent, however, it&amp;#x27;s scattered across systems you don&amp;#x27;t own. Rotating a key, for example, closes the door moving forward, but does nothing to address the months of prompt history already sitting in provider and gateway logs, and you can&amp;#x27;t simply grep someone else&amp;#x27;s data retention.&lt;/p&gt;&lt;p&gt;Attackers have noticed this and are taking action. Our team recently analyzed a series of &lt;a href=&quot;https://www.sonarsource.com/blog/the-return-of-shai-hulud/&quot;&gt;Shai-Hulud attacks&lt;/a&gt;, including &lt;a href=&quot;https://www.sonarsource.com/blog/mini-shai-hulud-targets-ai-coding-agents/&quot;&gt;Mini Shai-Hulud&lt;/a&gt;, the first in-the-wild supply chain attack built to persist through AI coding agent sessions. It hunts for more than 80 environment variables and more than 130 file paths, including &lt;code&gt;~/.aws/credentials&lt;/code&gt;, &lt;code&gt;~/.ssh/&lt;/code&gt;, and &lt;code&gt;~/.npmrc&lt;/code&gt;, plus database strings and wallet files. For bad actors, the agent&amp;#x27;s context window has become a target worth attacking.&lt;/p&gt;&lt;p&gt;And even for secrets you can actually find and fix, remediation is a different matter altogether. The clock can be unforgiving as the median time to remediate one leaked secret in a public repository is 94 days, according to the &lt;a href=&quot;https://www.verizon.com/business/resources/reports/2025-dbir-data-breach-investigations-report.pdf&quot;&gt;Verizon 2025 Data Breach Investigations Report&lt;/a&gt;. Three months is more than enough time for an automated scanner, for example, to locate and abuse a leaked secret.&lt;/p&gt;&lt;h2&gt;Catch secrets before they leave the prompt&lt;/h2&gt;&lt;p&gt;As the modern &lt;a href=&quot;https://www.sonarsource.com/resources/library/sdlc/&quot;&gt;software development lifecycle&lt;/a&gt; becomes increasingly reliant on agentic workflows, it’s now imperative that &lt;a href=&quot;https://www.sonarsource.com/resources/library/what-is-secrets-detection/&quot;&gt;secrets are detected&lt;/a&gt; at the earliest possible point, before they can travel onward: as you type, before you commit, before the agent ships your context to a model, and again when a PR is opened. Detection must live where the secret is still local and still yours.&lt;/p&gt;&lt;p&gt;One principle stands above the rest here: catching a secret shouldn&amp;#x27;t depend on the model that&amp;#x27;s about to transmit it. Detection instead needs to run in a dedicated scanner, separate from the agent, that matches the prompt and files against known secret patterns and returns a plain block-or-allow. A secret is stopped by a rule, not by the model&amp;#x27;s judgment.&lt;/p&gt;&lt;h2&gt;Where SonarQube stands at every door&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/solutions/secrets-detection/&quot;&gt;Secrets detection&lt;/a&gt; from SonarQube sits at each point that a secret could potentially slip out, running the same detection engine everywhere: covering 450+ secret patterns across 248 cloud services, with a false-positive rate under 5%.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;SonarQube for IDE&lt;/strong&gt; flags a secret the moment you write it, before it ever leaves your machine.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The SonarQube CLI&lt;/strong&gt; and &lt;a href=&quot;https://github.com/SonarSource/sonarqube-agent-plugins&quot;&gt;&lt;strong&gt;SonarQube agent plugins&lt;/strong&gt;&lt;/a&gt; push secrets detection into the agent loop itself, scanning locally at roughly 100 ms per file so your flow isn&amp;#x27;t interrupted. What gets covered depends on the agent: the prompt you submit, the files the agent reads, or both. When a secret is caught before that prompt or file read goes through, it&amp;#x27;s blocked on your machine and never reaches the model. The plugins cover Claude Code, GitHub Copilot CLI, Codex, Cursor, Antigravity, and more.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;SonarQube Cloud &lt;/strong&gt;and&lt;strong&gt; &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/server/&quot;&gt;SonarQube Server&lt;/a&gt;&lt;/strong&gt; catch anything that reaches the repository, flagging secrets in PR analysis and allowing a quality gate to block the merge.&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;https://assets-eu-01.kc-usercontent.com:443/ef593040-b591-0198-9506-ed88b30bc023/126173a0-7613-421e-9d34-695331a38e04/secrets-leak-blog.png&quot; /&gt;&lt;h2&gt;Next steps&lt;/h2&gt;&lt;p&gt;Select the environment where your agents run and place a gate there. For terminal-driven workflows, install the SonarQube CLI with the plugin for your preferred agent so that prompts and file reads are scanned locally, then back it with a quality gate in SonarQube Cloud or Server so that nothing slips through at the PR level.&lt;/p&gt;&lt;p&gt;AI coding agents supercharge productivity, enabling developers to ship code faster than ever, but without zero-trust, multi-layered verification, your secrets are vulnerable to leakage. SonarQube provides verification at every step of the software development lifecycle, from prompting to PR. SonarQube secrets detection puts a door in front of your agents that your secrets can&amp;#x27;t pass through, so you ship fast without mailing credentials to systems you can&amp;#x27;t audit or control.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Claude Opus 5: An evaluation review & metrics benchmarks]]></title><description><![CDATA[Learn what Claude Opus 5 performance metrics reveal about code quality security findings review effort and the impact of generating far more code.]]></description><link>https://www.sonarsource.com/blog/claude-opus-5/</link><guid isPermaLink="false">en:adb6040d-41f7-403e-a3c8-67d39cb4cfff</guid><dc:creator><![CDATA[Prasenjit Sarkar]]></dc:creator><pubDate>Mon, 17 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://www.anthropic.com/news/claude-opus-5&quot;&gt;Claude Opus 5&lt;/a&gt; is Anthropic&amp;#x27;s latest flagship, released on July 24. Anthropic describes it as delivering frontier intelligence at half the price of Claude Fable 5, and calls out one capability in particular: Opus 5 is unusually good at verifying its own work and catching logical flaws while it plans.&lt;/p&gt;&lt;p&gt;That&amp;#x27;s an interesting claim to test with algorithmic analysis, so we ran it through Sonar&amp;#x27;s LLM evaluation framework against the same Java benchmark we use for every model.&lt;/p&gt;&lt;p&gt;The short version: correctness improved a lot. Bug density, vulnerability density, and cognitive complexity per line fell, while code smell density, overall issue density, and cyclomatic complexity rose. There&amp;#x27;s also a volume story underneath it that changes what verification looks like in practice.&lt;/p&gt;&lt;h2&gt;What was measured&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Model:&lt;/strong&gt; Claude Opus 5 Thinking (adaptive thinking mode)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Baseline:&lt;/strong&gt; Claude Opus 4.8 Thinking&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Language:&lt;/strong&gt; Java&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Benchmark:&lt;/strong&gt; 4,441 tasks (158 HumanEval, 386 MBPP, and 3,897 ComplexCodeEval tasks)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Analyzer:&lt;/strong&gt; SonarQube systematic code analysis. Density metrics are per 1,000 lines of code (kLOC); category breakdowns are per million lines (mLOC).&lt;/p&gt;&lt;p&gt;Two terms worth defining first:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Cyclomatic complexity:&lt;/strong&gt; counts independent paths through a function.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cognitive complexity:&lt;/strong&gt; a SonarQube metric that weights nested and deeply branched logic more heavily, reflecting how hard the code is for a human to read.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Neither one tells you whether the code works. Both help indicate how much logic reviewers and testers will need to reason through.&lt;/p&gt;&lt;p&gt;Opus 4.8 is the baseline here, since it&amp;#x27;s the release Opus 5 directly follows. If you read &lt;a href=&quot;https://www.sonarsource.com/blog/claude-opus-4-7-evaluation/&quot;&gt;our Opus 4.7 write-up&lt;/a&gt;, the refreshed leaderboard now reports 82.72% for 4.6, 83.66% for 4.7, and 82.9% for 4.8. Those three releases remained within one percentage point of each other.&lt;/p&gt;&lt;p&gt;The figures below use the leaderboard&amp;#x27;s August 14, 2026 refresh. The bug, vulnerability, and code smell category mappings are identical for the two models, so the category comparisons are direct. Headline metrics use the leaderboard&amp;#x27;s bug, vulnerability, and code smell measures, while the severity tables use reliability, security, and maintainability impact measures, so the two sets of measures are not expected to reconcile exactly.&lt;/p&gt;&lt;h2&gt;Key metrics at a glance&lt;/h2&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Metric&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 4.8 Thinking&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 5 Thinking&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Lines of code (total)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;391,456&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;916,813&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Comment-line density&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;6.9%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;10.5%&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cyclomatic complexity per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;228.40&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;237.82&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cognitive complexity per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;146.40&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;132.29&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Bug density per mLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;672&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;576&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Vulnerability density per mLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;314&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;251&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Code smell density per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;16.76&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;19.69&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Overall issue density per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;17.74&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;20.52&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Functional skill (pass rate)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;82.9%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;88.6%&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Missing completions&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1.22%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;88.6%&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;What is Claude Opus 5&amp;#x27;s functional pass rate?&lt;/h3&gt;&lt;p&gt;88.6%. That&amp;#x27;s the number that makes this evaluation interesting.&lt;/p&gt;&lt;p&gt;Across the 544 HumanEval and MBPP tasks with executable tests, Opus 4.8 achieved an 82.9% pass result. Opus 5 achieved 88.6%, a gain of 5.7 percentage points on the same tasks. ComplexCodeEval contributes to the code analysis but not to the functional pass rate. To put that in context, the three Opus releases before this one all landed between 82.72% and 83.66%. This is a step, not a drift.&lt;/p&gt;&lt;p&gt;Missing completions also improved, from 1.22% to 0.83%. The model finishes what it starts more reliably than its predecessor did.&lt;/p&gt;&lt;p&gt;Roughly one in nine solutions in the 544-task test-backed subset still doesn&amp;#x27;t pass its tests. Better odds than the model before it, and still a ratio that needs something downstream to catch it.&lt;/p&gt;&lt;h3&gt;Does Claude Opus 5 generate more code than Opus 4.8?&lt;/h3&gt;&lt;p&gt;Here&amp;#x27;s the change that shapes everything else. Opus 5 generated 916,813 lines of code across the benchmark. Opus 4.8 generated 391,456. That&amp;#x27;s 2.3 times more code for the same 4,441 tasks.&lt;/p&gt;&lt;p&gt;It also used 122,650 functions, up from 48,734. So the function count grew faster than the line count. More code, more functions, each one slightly tighter. That pattern points toward more decomposition rather than simple sprawl.&lt;/p&gt;&lt;p&gt;Comment lines went from 6.9% to 10.5% of code plus comment lines. In absolute terms that&amp;#x27;s 107,517 comment lines, up from 29,024. For scale, the two GPT-5.6 variants we evaluated this month came in at 1.5% and 0.9%. Opus 5&amp;#x27;s comment-line density is 7 to 12 times higher than those results.&lt;/p&gt;&lt;p&gt;For anyone maintaining this code later, that provides more inline context and more signposts, as long as the comments remain accurate.&lt;/p&gt;&lt;h3&gt;Complexity&lt;/h3&gt;&lt;p&gt;Cognitive complexity is 132.29 per kLOC, down from 146.40. That&amp;#x27;s a 10% reduction.&lt;/p&gt;&lt;p&gt;Cyclomatic complexity moved slightly the other way, from 228.40 to 237.82 per kLOC, a 4% increase.&lt;/p&gt;&lt;p&gt;Neither complexity measure moved much once normalized. Cognitive complexity is down 10%, cyclomatic up 4%. Given 2.3× more code and 2.5× more functions, shifts of that size say less about how the model writes than about what it wrote this time. Complexity density is roughly flat.&lt;/p&gt;&lt;h3&gt;Bug density and severity improvements in Claude Opus 5&lt;/h3&gt;&lt;p&gt;Bug density is 576 per mLOC, down from 672. A 14% reduction, and it happened while output volume more than doubled.&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Bug category&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 4.8&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;BLOCKER&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;66&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;41&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;HIGH&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;33&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;28&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;MEDIUM&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;286&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;241&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;LOW&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;291&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;265&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;All four severity levels improved. BLOCKER reliability impact issues fell from 38%, from 66 to 41 per mLOC. High-severity findings came down from 33 to 28. Medium from 286 to 241, and Low from 291 to 265.&lt;/p&gt;&lt;p&gt;That’s the cleanest reliability result. BLOCKER is the highest severity tier, and it moved in the right direction alongside every tier below it.&lt;/p&gt;&lt;p&gt;The category breakdown shows where the overall reduction came from:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Bug category&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 4.8&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Concurrency / threading&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;105&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;205&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;API contract violation&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;123&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;57&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Resource / stream leaks&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;97&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;63&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Type safety / casts&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;100&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;51&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Exception handling&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;66&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;32&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Null / data value&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;56&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;91&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Performance / structure&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;46&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;38&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Control flow mistake&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;43&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;21&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Pattern / regex&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;18&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;16&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Data structure&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;3&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Uncategorized&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;15&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;0&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Nine of the 11 rows improved. Exception handling dropped 52%, from 66 to 32 per mLOC. API contract violations more than halved. Control flow mistakes fell 51%. Resource leaks and type safety issues also came down.&lt;/p&gt;&lt;p&gt;Concurrency and threading nearly doubled, from 105 to 205 per mLOC, and became the largest bug category by a clear margin. Null and data-value findings also increased, from 56 to 91 per mLOC.&lt;/p&gt;&lt;p&gt;That&amp;#x27;s a familiar pattern. Concurrency was also the top bug category in all three GPT models we evaluated this month, and the reasons are inherent. Threading bugs are hard to reproduce, they depend on the environment they run in, and they show up as intermittent failures rather than clean ones. They are easy to miss in code review, which makes testing and analysis especially important.&lt;/p&gt;&lt;h3&gt;What security vulnerabilities does Claude Opus 5 generated code contain?&lt;/h3&gt;&lt;p&gt;Vulnerability density is 251 per mLOC, down from 314. A 20% reduction.&lt;/p&gt;&lt;p&gt;The security-impact severity profile is where this gets notable:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Security impact severity per mLOC&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 4.8&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;BLOCKER&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;77&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;19&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;HIGH&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;151&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;195&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;MEDIUM&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;36&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;5&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;LOW&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;82&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;32&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;BLOCKER security-impact issues went from 77 to 19 per mLOC. That&amp;#x27;s a 75% reduction. MEDIUM-severity findings dropped 86%.&lt;/p&gt;&lt;p&gt;HIGH severity findings rose, up 29%. BLOCKER, MEDIUM and LOW also came down, so three of the four tiers improved and the most severe band thinned out considerably.&lt;/p&gt;&lt;p&gt;The category breakdown uses the same rule mapping for both models:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Vulnerability category&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 4.8&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cryptography misconfiguration&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;43&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;103&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Insecure system resource handling&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;92&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;82&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Inadequate error handling (I/O)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;33&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;24&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Hard-coded credentials&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;59&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;14&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Certificate validation omissions&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;15&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;11&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Injection attack&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;18&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;7&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;XML external entity (XXE)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;23&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;4&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Path traversal / injection&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;20&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;0&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Web API security misconfiguration&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;10&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Uncategorized&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;0&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;4&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Total density&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;314&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;251&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;XML external entity findings fell from 23 to 4 per mLOC, hard-coded credentials dropped from 59 to 14, and injection findings declined from 18 to 7. Path traversal and injection findings fell from 20 to zero in this snapshot.&lt;/p&gt;&lt;p&gt;Cryptography misconfiguration moved in the other direction, from 43 to 103 per mLOC, and is now the largest vulnerability category.&lt;/p&gt;&lt;p&gt;Either way, it&amp;#x27;s the category to point automated checks at first. Crypto misconfiguration includes weak algorithms, insecure key sizes, and random number generators used in unsafe ways, which automated analysis can surface before review.&lt;/p&gt;&lt;h3&gt;How maintainable is Claude Opus 5 generated code?&lt;/h3&gt;&lt;p&gt;Code smell density is 19.69 per kLOC, up from 16.76. A 17% increase, and one of the metrics in this evaluation that moved in a worse direction.&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Maintainability impact severity per mLOC&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 4.8&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;BLOCKER&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;41&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;75&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;HIGH&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2,197&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2,332&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;MEDIUM&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;6,782&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;6,170&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;LOW&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;7,196&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;10,629&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;MEDIUM-severity maintainability-impact issues came down 9%. LOW-severity findings went up 48%, and that&amp;#x27;s where most of the increase lives.&lt;/p&gt;&lt;p&gt;The category view shows this isn&amp;#x27;t a broad shift. It&amp;#x27;s concentrated:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Code smell category&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 4.8&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Collection / generics parameter type&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;3,929&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;8,901&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Regex / pattern / string format&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2,549&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;3,270&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Naming / style / documentation&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;925&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1,601&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Design / framework best practices&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;3,196&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2,195&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Dead / unused / redundant code&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1,819&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;994&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cognitive computational complexity&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1,443&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;790&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Control / conditional logic&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1,055&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;507&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Assignment / field / scope visibility&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1,150&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;834&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Deprecation / obsolete API&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;547&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;321&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Uncategorized&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;133&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;264&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Four rows went up. Six came down, four of them by 40% or more.&lt;/p&gt;&lt;p&gt;Collection and generics issues more than doubled, from 3,929 to 8,901 per mLOC, and it&amp;#x27;s now the dominant smell category by a wide margin. These are raw types where parameterized generics belong, and collection handling that sidesteps type safety. In Java they carry a real cost: they suppress compiler warnings, make refactoring harder, and can hide the kind of bug a properly typed implementation would have caught at compile time.&lt;/p&gt;&lt;p&gt;Naming and documentation smells increased 73%, which is worth reading alongside the comment density result. More annotation overall, more findings on how some of it is written.&lt;/p&gt;&lt;p&gt;Most other named categories moved in the other direction. Design and framework issues fell 31%. Dead code fell 45%. The cognitive complexity smell dropped 45%, which lines up neatly with the cognitive complexity metric coming down.&lt;/p&gt;&lt;h2&gt;How does Claude Opus 5 code volume affect total findings&lt;/h2&gt;&lt;p&gt;The density results are mixed. Bug density fell 14%, vulnerability density fell 20%, and cognitive complexity fell 10%. Code smell density rose 17%, overall issue density rose 16%, and cyclomatic complexity rose 4%. Comment-line density increased from 6.9% to 10.5%.&lt;/p&gt;&lt;p&gt;Absolute counts are a different picture, because there&amp;#x27;s 2.3 times more code.&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Total findings&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 4.8&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Opus 5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Bugs&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;263&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;528&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Vulnerabilities&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;123&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;230&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Code smells&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;6,559&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;18,056&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;All issues&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;6,945&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;18,814&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Bugs roughly doubled, and vulnerabilities increased 1.9 times. Code smells rose 2.8 times, and since smells are about 96% of all findings, total issues came in at 2.7 times the 4.8 figure. The increase reflects 2.3 times more code together with higher code smell and overall issue density, even though bug and vulnerability density fell.&lt;/p&gt;&lt;p&gt;Both readings are true, and the gap between them is entirely the 2.3× volume multiplier. Density asks how clean the code is per unit written; absolute counts ask how much work exists. Neither answers the other&amp;#x27;s question, and substituting one for the other produces a specific error. Cite the density improvement to argue review load is unchanged and you&amp;#x27;ll under-resource by roughly a factor of three. Cite the absolute counts to argue the model writes worse code and you&amp;#x27;ll be wrong about bugs and vulnerabilities, which improved on a per-line basis.&lt;/p&gt;&lt;p&gt;The caveat sits underneath both: density is a fair comparison only if the volume itself is neutral. If Opus 5 writes 2.3× more code for the same task, that verbosity is a quality signal in its own right, and dividing by it flatters the result. Density is the right measure for comparing models on equivalent output. It&amp;#x27;s the wrong one for deciding whether the extra output was warranted.&lt;/p&gt;&lt;h2&gt;A note on tokens&lt;/h2&gt;&lt;p&gt;Input tokens were effectively identical across both runs at about 2.07 million, which is what you&amp;#x27;d expect from the same benchmark. Output was not. Opus 4.8 produced 6.00 million output tokens; Opus 5 produced 21.71 million. That&amp;#x27;s 3.6 times more output for 2.3 times more code.&lt;/p&gt;&lt;h2&gt;What does this mean for teams using Opus 5?&lt;/h2&gt;&lt;p&gt;The correctness gain is the headline and it&amp;#x27;s a real one. An 88.6% pass result across the 544 HumanEval and MBPP tasks with executable tests, after three releases that all landed between 82.72% and 83.66%, is a genuine step forward. And it arrived alongside lower bug density, lower vulnerability density, lower cognitive complexity, and better commenting. Models don&amp;#x27;t usually improve on that many axes at once.&lt;/p&gt;&lt;p&gt;Anthropic&amp;#x27;s own framing, that Opus 5 is strong at verifying its own work, is consistent with what we see. Exception handling findings dropped 52%. BLOCKER security-impact issues dropped 75%. Control flow mistakes fell 51%. Every reliability severity tier came down.&lt;/p&gt;&lt;p&gt;Three places to point verification effort.&lt;/p&gt;&lt;p&gt;Concurrency is first. At 205 per mLOC it&amp;#x27;s the largest bug category and it nearly doubled from 4.8. If what you&amp;#x27;re generating is concurrent by nature, prioritize testing and analysis for threading issues alongside code review.&lt;/p&gt;&lt;p&gt;Cryptography configuration is second. At 103 per mLOC it&amp;#x27;s the largest vulnerability category. It&amp;#x27;s also well-covered by automated analysis, so this is a solvable problem rather than a standing tax on reviewer time.&lt;/p&gt;&lt;p&gt;Collections and generics is third. At 8,901 per mLOC it dominates the smell profile, and it&amp;#x27;s the kind of issue that&amp;#x27;s cheap to fix at generation time and expensive to unpick after a codebase has grown around it.&lt;/p&gt;&lt;p&gt;And then there&amp;#x27;s volume. Opus 5 writes 2.3 times more code than the model it replaces, with more comments and smaller functions. Bug density, vulnerability density, and cognitive complexity improved per line, while code smell density, overall issue density, and cyclomatic complexity worsened. That&amp;#x27;s the tradeoff to plan for, and it&amp;#x27;s a manageable one when the verification layer is automated rather than manual.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Correctness took a real step.&lt;/strong&gt; 88.6% versus 82.9% across the same 544 HumanEval and MBPP tasks with executable tests, after three releases that stayed within one percentage point of each other.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The severity results include a strong security gain.&lt;/strong&gt; BLOCKER security-impact issues dropped 75% to 19 per mLOC, every reliability severity came down., BLOCKER included, from 66 to 41 per mLOC. Bug and vulnerability density are both down.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Volume is the thing to plan for.&lt;/strong&gt; 2.3 times more code means 2.7 times the total findings, even with lower bug and vulnerability density. Verification effort rises with code volume as well as functional correctness.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Opus 5 achieved a higher functional pass rate and lower bug density, vulnerability density, and cognitive complexity than the model it replaces, while producing more code with higher code smell density, overall issue density, and cyclomatic complexity. That doesn&amp;#x27;t remove the need for verification. It changes where verification should point, and it makes the case for pointing it automatically.&lt;/p&gt;&lt;p&gt;Full evaluation results for Claude Opus 5, along with every other model we&amp;#x27;ve measured, are on the &lt;a href=&quot;https://www.sonarsource.com/the-coding-personalities-of-leading-llms/leaderboard/&quot;&gt;Sonar LLM Leaderboard&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Sonar joins the Open Secure AI Alliance to advance AI safety and security]]></title><description><![CDATA[Sonar joins the Open Secure AI Alliance to help strengthen AI code security through open source collaboration with NVIDIA and other industry leaders.]]></description><link>https://www.sonarsource.com/blog/sonar-joins-the-open-secure-ai-alliance/</link><guid isPermaLink="false">en:b2abdb20-2d21-4eb5-966b-2dbda4f65b41</guid><dc:creator><![CDATA[Tariq Shaukat]]></dc:creator><pubDate>Mon, 10 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Open source technology is critical to the global economy. For decades, it has promoted innovation, security, and trust. That will be even more true in the AI economy. &lt;/p&gt;&lt;p&gt;Sonar is proud to have roots in the open source world, and I’m proud to share that Sonar has joined the Open Secure AI Alliance as an inaugural partner. We’re excited to contribute to this collaborative effort with NVIDIA and other industry leaders to help strengthen the foundations of secure AI.&lt;/p&gt;&lt;p&gt;As AI models become more capable, it is putting a lot of stress on the open source world. We are taking concrete steps to be part of the solution, helping developers, maintainers, and enterprises operate with openness, trust, and confidence. &lt;/p&gt;&lt;h2&gt;Some ways we&amp;#x27;re helping:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Both &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt; and &lt;a href=&quot;https://www.sonarsource.com/products/gitar/&quot;&gt;Gitar&lt;/a&gt; AI Code Review are available for free for OSS projects - helping maintainers verify the quality, reliability, and security of their projects.&lt;/li&gt;&lt;li&gt;For several years, Sonar (and previously &lt;a href=&quot;https://www.sonarsource.com/company/press-releases/sonar-to-acquire-tidelift/&quot;&gt;Tidelift which we acquired&lt;/a&gt;) has financially supported over 600 OSS maintainers across thousands of packages, ensuring they can focus on their important work.&lt;/li&gt;&lt;li&gt;SonarQube Community Build and &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/ide/&quot;&gt;SonarQube for IDE&lt;/a&gt; bring the power of SonarQube to millions of developers everywhere, for free and with transparency.&lt;/li&gt;&lt;li&gt;SonarSweep helps enterprises improve Open Weight AI models, to embed context while improving the quality and security of the output.&lt;/li&gt;&lt;li&gt;Our &lt;a href=&quot;https://www.sonarsource.com/the-coding-personalities-of-leading-llms/leaderboard/&quot;&gt;LLM Leaderboard&lt;/a&gt; helps people understand the quality and security of leading AI models, covering both proprietary and open weight models. &lt;/li&gt;&lt;li&gt;Last but not least, &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/advanced-security/&quot;&gt;SonarQube Advanced Security&lt;/a&gt; helps developers understand their third party dependencies and the risks associated with them&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Read Nvidia’s blog post to learn more: &lt;a href=&quot;https://blogs.nvidia.com/blog/open-secure-ai-alliance/&quot;&gt;https://blogs.nvidia.com/blog/open-secure-ai-alliance/&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[OpenAI GPT-5.6 Sol and Terra: An evaluation]]></title><description><![CDATA[Learn what changed in GPT 5.6 coding performance from correctness gains to new security and concurrency challenges in this detailed evaluation.]]></description><link>https://www.sonarsource.com/blog/openai-gpt-5-6-sol-and-terra/</link><guid isPermaLink="false">en:f3d7ba00-64de-4911-b190-55dc30075140</guid><dc:creator><![CDATA[Killian Carlsen-Phelan]]></dc:creator><pubDate>Thu, 06 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Every model that writes better code hands your team the same bill: more code to check, and less time to check it. That gap between how fast code arrives and how fast a team can verify it is verification debt, and a stronger model does not pay it down. It moves it.&lt;/p&gt;&lt;p&gt;GPT-5.6 is a better code generator than the model before it. This evaluation is about what that improvement actually costs you, and where.&lt;/p&gt;&lt;p&gt;OpenAI&amp;#x27;s GPT-5.6 arrived in three variants: Sol, Terra &amp;amp; Luna. We evaluated Sol and Terra here; Luna is out of scope for this run. Same generation, three different builds, and the benchmark data shows they do not behave the same way. &lt;/p&gt;&lt;p&gt;We ran the eval for both Sol and Terra through Sonar&amp;#x27;s LLM evaluation framework, which measures generated code against the same analysis  we&amp;#x27;d apply to anything a developer wrote.  Same 4,444 Java tasks, same quality profile, same reasoning effort. Because we re-ran GPT-5.5 through the same analysis, every comparison below is apples to apples.&lt;/p&gt;&lt;p&gt;The short version: Sol writes more correct code than GPT-5.5, and it is easier to read. But the security risk moved, and it moved into two places a code review will not reliably catch. Let’s get into the details and look at the full data.&lt;/p&gt;&lt;h2&gt;How was GPT-5.6 Sol and Terra evaluated?&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Models:&lt;/strong&gt; GPT-5.6 Sol, GPT-5.6 Terra, GPT-5.5 (baseline)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Language:&lt;/strong&gt; Java&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Benchmark:&lt;/strong&gt; 4,444 tasks (HumanEval, MBPP, ComplexCodeEval)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Reasoning effort:&lt;/strong&gt; medium, for all three&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Analyzer:&lt;/strong&gt; SonarQube algorithmic code analysis. Complexity and code smell densities are per 1,000 lines of code (kLOC); bug and vulnerability densities, and all category breakdowns, are per million lines (mLOC).&lt;/p&gt;&lt;p&gt;Two terms worth defining before the numbers:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Cyclomatic complexity:&lt;/strong&gt; counts independent paths through a function.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cognitive complexity:&lt;/strong&gt; a SonarQube metric that weights nested and deeply branched logic more heavily, reflecting how hard the code is for a human to read.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Neither one tells you whether the code is correct. Both tell you how long review and testing will take.&lt;/p&gt;&lt;p&gt;In the severity tables below, the per-severity rows are counted against total issues raised, so they sum slightly above the headline density figures for the 5.6 variants. Read the severities as a distribution, not as a total.&lt;/p&gt;&lt;h2&gt;Key metrics at a glance&lt;/h2&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Metric&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Sol&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Terra&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Lines of code (total)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;702,720&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;750,198&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;617,132&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Comments (% of LOC)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2.0%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1.5%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;0.9%&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cyclomatic complexity per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;250.57&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;220.45&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;236.25&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cognitive complexity per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;151.27&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;143.23&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;161.53&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Bug density per mLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;504&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;724&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;763&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Vulnerability density per mLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;68&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;197&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;203&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Code smell density per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;17.05&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;17.60&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;23.31&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Overall issue density per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;17.62&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;18.52&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;24.27&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Functional skill (pass rate)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;78.66%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;81.99%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;79.96%&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Missing completions&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;0.27%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;0.25%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;0.18%&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Functional skill&lt;/h3&gt;&lt;p&gt;Sol passes 81.99% of the benchmark, up from 78.66% for GPT-5.5. That&amp;#x27;s a 3.3 point gain on identical tasks.&lt;/p&gt;&lt;p&gt;It also leaves roughly one in five solutions failing its tests. You can&amp;#x27;t tell in advance which one. That&amp;#x27;s not a knock on the model, it&amp;#x27;s just the arithmetic of the thing.&lt;/p&gt;&lt;p&gt;Missing completions came in at 0.25% for Sol. Low, and close enough to GPT-5.5&amp;#x27;s 0.27% that the model finishes what it starts.&lt;/p&gt;&lt;h3&gt;How much code does GPT-5.6 Sol generate compared to GPT-5.5?&lt;/h3&gt;&lt;p&gt;Sol generated 750,198 lines across the benchmark, about 6.8% more than GPT-5.5. But it did that across 82,164 functions, down from 92,206. More code, fewer functions.&lt;/p&gt;&lt;p&gt;Work that out per function and you get 9.1 lines, up from 7.6. Sol writes longer functions that do more. Not a problem on its own, though it does mean each unit you review carries more logic than it used to.&lt;/p&gt;&lt;p&gt;Comments dropped to 1.5% of output, from 2.0%. In absolute terms that&amp;#x27;s 11,713 comment lines across 750,000 lines of code. For every 100 lines a reviewer opens, roughly one and a half carry any explanation. Well-named functions and variables can carry that load instead, and often do. Just worth knowing going in.&lt;/p&gt;&lt;h3&gt;Does GPT-5.6 Sol generate more complex code than GPT-5.5?&lt;/h3&gt;&lt;p&gt;Here&amp;#x27;s a nice surprise: complexity densities came down.&lt;/p&gt;&lt;p&gt;Cyclomatic complexity is 220.45 per kLOC, down from 250.57. Cognitive complexity is 143.23 per kLOC, down from 151.27. Sol writes more total code, but each thousand lines of it branches less than GPT-5.5&amp;#x27;s did.&lt;/p&gt;&lt;p&gt;That matters because cognitive complexity tracks how hard code is for a person to hold in their head. Nested conditionals, loops inside loops, branching where you have to track several states at once. Lower is easier to review, easier to test, easier to change without breaking something. Sol moved in the right direction on both counts.&lt;/p&gt;&lt;h3&gt;Bug density and severity&lt;/h3&gt;&lt;p&gt;Bug density is 724 per mLOC, up from 504. That&amp;#x27;s an increase of about 44%.&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Severity&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Sol&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Blocker&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;36&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;45&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Critical&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;26&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;33&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Major&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;238&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;327&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Minor&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;205&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;351&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Blockers and criticals are the two that cause production incidents, and both moved up, to 45 and 33 per mLOC. The bigger movement is in the long tail. Minor bugs went from 205 to 351 per mLOC, a 71% jump. Those don&amp;#x27;t break anything today. They accumulate, slow down future changes, and occasionally surface as real bugs once the codebase shifts around them.&lt;/p&gt;&lt;p&gt;The largest categories are where this gets specific:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Bug category&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Sol&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Concurrency / threading&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;165&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;352&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Performance / structure&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;47&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;83&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Resource / stream leaks&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;74&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;55&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Exception handling&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;53&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;52&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Null / data value&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;34&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;55&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Type safety / casts&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;34&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;57&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Concurrency and threading more than doubled, and it now sits well clear of everything else at 349 per mLOC. Concurrency bugs are the expensive kind. They&amp;#x27;re hard to reproduce, they depend on the environment they run in, and they show up as intermittent failures that eat days of debugging time. &lt;/p&gt;&lt;p&gt;Resource leaks, exception handling, and type safety all improved slightly. Small moves, but they&amp;#x27;re moves in the right direction.&lt;/p&gt;&lt;h2&gt;What security vulnerabilities does GPT-5.6 Sol generate in code?&lt;/h2&gt;&lt;p&gt;Vulnerability density is 197 per mLOC, up from 68. This is the biggest change in the evaluation, and the severity split is the part worth reading closely.&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Severity&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Sol&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Blocker&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;18&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;9&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Critical&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;20&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;125&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Major&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;9&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;20&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Minor&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;21&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;49&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Blocker vulnerabilities halved, from 18 to 9 per mLOC. Everything else went up, with the critical category carrying most of it.&lt;/p&gt;&lt;p&gt;So the shape of the profile changed, not just the volume. In GPT-5.5, blockers made up 27% of all vulnerabilities. In Sol they&amp;#x27;re under 5%, and criticals are just under 62%. Fewer of the most severe findings, considerably more of the tier below.&lt;/p&gt;&lt;p&gt;The category breakdown explains where the increase came from. This is the full picture for both variants, and the rows add up to the density, so nothing is hiding:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Vulnerability category&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Sol&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Terra&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cryptography misconfiguration&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;17&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;67&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;76&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Insecure system resource handling&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;60&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;50&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Inadequate error handling (I/O)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;21&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;32&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;23&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Injection attack&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;-&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;17&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;16&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Path traversal / injection&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;10&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;4&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;-&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;XML external entity (XXE)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;9&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;8&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Hard-coded credentials&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;9&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;4&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;6&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Certificate validation omissions&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;5&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Web API security misconfiguration&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;-&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;4&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Uncategorized&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;9&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;13&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;16&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;68&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;197&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;202&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Injection attack findings don&amp;#x27;t appear in the GPT-5.5 output, and together with the insecure in insecure system resource handling they account for 76 of Sol&amp;#x27;s 129-point increase.&lt;/p&gt;&lt;p&gt;Cryptography misconfiguration is the other big mover, from 17 to 67 per mLOC, and it&amp;#x27;s now the largest single category. This covers weak algorithms, insecure key sizes, and random number generators used in ways they shouldn&amp;#x27;t be. It&amp;#x27;s also a category static analysis handles reliably, which is the useful part.&lt;/p&gt;&lt;p&gt;Some categories went the other way. Path traversal and injection dropped from 10 to 4 per mLOC, and XXE from 9 to 1. Both were already low and both got lower.&lt;/p&gt;&lt;p&gt;If you&amp;#x27;re wiring Sol into a pipeline, cryptography and system resource handling are where review time pays for itself. Those two are most of the story.&lt;/p&gt;&lt;h2&gt;How maintainable is GPT-5.6 Sol generated code?&lt;/h2&gt;&lt;p&gt;Code smell density is 17.60 per kLOC, against 17.05 for GPT-5.5. That&amp;#x27;s a 3.2% difference. Effectively flat.&lt;/p&gt;&lt;p&gt;Which is a genuinely good result given the extra volume. Blocker-level smells even came down, from 78 to 72 per mLOC.&lt;/p&gt;&lt;p&gt;The drivers are the same ones we&amp;#x27;ve seen from this family:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Code smell category&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Sol&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Collection / generics parameter type&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;7,272&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;7,803&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Design / framework best practices&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2,115&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2,494&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Regex / pattern / string format&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2,219&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1,998&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cognitive computational complexity&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1,205&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1,213&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Dead / unused / redundant code&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1,434&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;862&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Deprecation / obsolete API&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;189&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;321&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Collection and generics issues are the largest named category, at 7,803 per mLOC. Raw types where parameterized generics belong, collection handling that sidesteps type safety. In Java these have a real cost: they suppress compiler warnings, make refactoring harder, and hide the kind of bug a properly typed implementation would have caught at compile time.&lt;/p&gt;&lt;p&gt;Dead and unused code dropped by about 40%, from 1,434 to 862 per mLOC. Deprecated API usage went the other way, from 189 to 321.&lt;/p&gt;&lt;h2&gt;How does GPT-5.6 Terra differ from GPT-5.6 Sol?&lt;/h2&gt;&lt;p&gt;Terra takes a visibly different approach to the same 4,444 tasks, and if you&amp;#x27;re choosing between the two variants the differences are worth having in front of you.&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Metric&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.5&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Sol&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;GPT-5.6 Terra&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Lines of code&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;702,720&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;750,198&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;617,132&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Functions&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;92,206&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;82,164&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;70,378&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Comments (% of LOC)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;2.0%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;1.5%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;0.9%&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Cognitive complexity per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;151.27&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;143.23&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;161.53&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Pass rate&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;78.66%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;81.99%&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;79.96%&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Bug density per mLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;504&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;724&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;763&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Vulnerability density per mLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;68&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;197&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;203&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Code smell density per kLOC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;17.05&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;17.60&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;23.31&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Start with volume. Terra wrote 617,132 lines, 12.2% fewer than GPT-5.5 and 18% fewer than Sol. It used 70,378 functions to do it, roughly a quarter fewer than GPT-5.5. Terra is the concise one.&lt;/p&gt;&lt;p&gt;Its pass rate is 79.96%, a little above GPT-5.5 and a little under Sol. It also had the fewest missing completions of the three, at 0.18%.&lt;/p&gt;&lt;p&gt;The tradeoff shows up in density. Because Terra packs the same work into fewer lines, its per-kLOC figures run higher. Code smell density is 23.31 per kLOC, 37% above GPT-5.5. Cognitive complexity is 161.53 per kLOC, the highest of the three. Comments are 0.9% of output, which works out to 5,600 comment lines in total.&lt;/p&gt;&lt;p&gt;Most of the extra smell volume is minor severity, which went from 6,145 to 10,367 per mLOC. Blocker-level smells actually came down, from 78 to 62 per mLOC, the best of the three. And collection and generics issues nearly doubled to 11,843 per mLOC, which is the single largest driver.&lt;/p&gt;&lt;p&gt;On security, Terra lands close to Sol: 203 vulnerabilities per mLOC, with cryptography misconfiguration at 76 and blockers at 11. Its bug profile is close too. Bug density is 763 per mLOC, about 51% above GPT-5.5, and concurrency and threading leads at 350 per mLOC.&lt;/p&gt;&lt;p&gt;The short version: Sol gives you the higher pass rate and flat maintainability at slightly more volume. Terra gives you meaningfully less code and the lowest blocker-smell density, with more findings per line. Neither is strictly ahead of the other, and which one fits depends on whether your bottleneck is review volume or review depth.&lt;/p&gt;&lt;h2&gt;How do GPT-5.6 Sol and Terra token usage compare to GPT-5.5?&lt;/h2&gt;&lt;p&gt;One more thing from the data, with a caveat attached.&lt;/p&gt;&lt;p&gt;Input tokens were effectively identical across all three runs at about 1.32 million, which is what you&amp;#x27;d expect from the same benchmark. Output tokens weren&amp;#x27;t. GPT-5.5 produced 5.55 million, Sol produced 9.58 million, and Terra produced 8.37 million. That&amp;#x27;s 73% and 51% more output for code volume that moved a lot less.&lt;/p&gt;&lt;p&gt;Both 5.6 variants also report reasoning tokens: 4.00 million for Sol, 3.66 million for Terra.&lt;/p&gt;&lt;h2&gt;What are the biggest risks of using GPT-5.6 generated code in production?&lt;/h2&gt;&lt;p&gt;GPT-5.6 writes more correct code, and code that is easier to read. Neither of those removes the need to verify what it produces. They change where verification has to point, and this evaluation says exactly where.&lt;/p&gt;&lt;p&gt;Two areas earn that attention, and both are places a read-through tends to miss.&lt;/p&gt;&lt;p&gt;Concurrency is the first. At 352 per mLOC for Sol and 350 for Terra, threading is comfortably the largest bug category in both variants. Concurrency bugs are intermittent, environment-dependent, and expensive to reproduce. If what you generate is concurrent by nature, plan to catch these at the testing and analysis stage, because they do not reliably surface in review. &lt;/p&gt;&lt;p&gt;Security configuration is the second, and it is narrower than you might expect. Cryptography misconfiguration and insecure system resource handling are the top two vulnerability categories in both variants, and between them they explain most of the rise over GPT-5.5. Both are exactly the kind of finding automated analysis that catches reliably that makes this a solvable problem, not a standing tax on reviewer time.&lt;/p&gt;&lt;p&gt;The variant choice is a real one. Sol for the higher pass rate and flat maintainability. Terra if less code matters more to you than fewer findings per line.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Three takeaways:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Correctness improved, clearly.&lt;/strong&gt; Sol&amp;#x27;s 81.99% pass rate is 3.3 points above GPT-5.5 on identical tasks, and complexity density came down at the same time.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The security profile changed shape.&lt;/strong&gt; Blocker vulnerabilities halved to 9 per mLOC while criticals moved to 125. Cryptography and system resource handling are where verification should focus.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The two variants are genuinely different.&lt;/strong&gt; Terra writes 12% less code than GPT-5.5 with the lowest blocker-smell density of the three, at a higher findings-per-line rate. Pick the profile that matches your bottleneck.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Full evaluation results for both GPT-5.6 variants, along with every other model we&amp;#x27;ve measured, are on the &lt;a href=&quot;https://www.sonarsource.com/the-coding-personalities-of-leading-llms/leaderboard/&quot;&gt;Sonar LLM Leaderboard&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The return of Shai-Hulud: How SonarQube detects and contains the npm worm]]></title><description><![CDATA[Learn how the Shai-Hulud npm worm spreads and see how SonarQube detects malicious packages before they reach production and steal credentials.]]></description><link>https://www.sonarsource.com/blog/the-return-of-shai-hulud/</link><guid isPermaLink="false">en:ac171cea-7b03-4922-9815-f8dfec76a599</guid><dc:creator><![CDATA[Taylor Luttrell-Williams]]></dc:creator><pubDate>Wed, 05 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here we go again. A fresh wave of the self-propagating Shai-Hulud worm is surging through the npm ecosystem. Its goal now is the same as it was with every prior wave: steal developer and CI credentials, then use those credentials to republish itself inside more packages. The name is a callback to the sandworms of &lt;em&gt;Dune&lt;/em&gt;, and the worm’s behavior tracks. Once it&amp;#x27;s burrowed itself into your dependency tree, it&amp;#x27;s hard to detect and it doesn&amp;#x27;t stay put.&lt;/p&gt;&lt;p&gt;If you maintain Node.js projects or run npm installs anywhere in your pipelines, this post is for you. Here we cover what the worm does, how it spreads, and how &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt; detects and contains known bad packages before they reach production.&lt;/p&gt;&lt;h2&gt;What is the Shai-Hulud worm and how did it start?&lt;/h2&gt;&lt;p&gt;Shai-Hulud is a self-replicating supply chain worm targeting npm, and it has erupted in waves since September 2025. GitHub, which operates the registry, has watched the campaign escalate from opportunistic compromises into &lt;a href=&quot;https://github.blog/security/supply-chain-security/disrupting-supply-chain-attacks-on-npm-and-github-actions/&quot;&gt;engineered attacks on maintainer workflows and CI pipelines&lt;/a&gt;. CISA documented one earlier wave that compromised over 500 npm packages. The mechanics are consistent across waves: an attacker gets control of a maintainer account, publishes a trojanized version of a popular package, and the malicious code gets to work the moment it&amp;#x27;s installed.&lt;/p&gt;&lt;p&gt;According to &lt;a href=&quot;https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem&quot;&gt;CISA&amp;#x27;s advisory&lt;/a&gt;, the payload scans the environment for sensitive credentials, targets GitHub personal access tokens and cloud API keys for AWS, GCP, and Azure, and exfiltrates what it finds. It then authenticates to the registry as the compromised maintainer and publishes infected versions of other packages that account can touch. One stolen token thereby becomes the seed for the next round of infections.&lt;/p&gt;&lt;h2&gt;How the worm operates&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Infection&lt;/strong&gt; — A compromised maintainer account ships a malicious version of a package. It lands in your project through a normal install or a lockfile update. It doesn&amp;#x27;t have to be a direct dependency, as a transitive package located five levels down is just as effective.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Credential harvest&lt;/strong&gt; — Once the code runs, it reads environment variables and well known credential file paths: npm tokens, cloud keys, SSH keys, CI secrets, etc. Anything a build agent can see, the payload can see too.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Propagation&lt;/strong&gt; — The worm uses the stolen npm token to authenticate as the victim and republish trojanized versions of every package that account maintains. Those packages flow out to their own dependents, and the loop repeats.&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;https://assets-eu-01.kc-usercontent.com:443/ef593040-b591-0198-9506-ed88b30bc023/d58f6d88-624f-496b-b854-045c542a0e01/shai-hulud-blog-2.png&quot; /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Evolution&lt;/strong&gt; — The newer variants go after AI coding agents for persistence. As our team documented in &lt;a href=&quot;https://www.sonarsource.com/blog/mini-shai-hulud-targets-ai-coding-agents/&quot;&gt;Mini Shai-Hulud targets AI coding agents&lt;/a&gt;, one variant writes a &lt;code&gt;SessionStart&lt;/code&gt; hook into &lt;code&gt;.claude/settings.json&lt;/code&gt; so that opening a repo runs &lt;code&gt;node .claude/setup.mjs&lt;/code&gt; every session, with a VS Code &lt;code&gt;tasks.json&lt;/code&gt; equivalent that fires on &lt;code&gt;folderOpen&lt;/code&gt;. Once you open an infected repo in a trusted workspace, the attacker&amp;#x27;s code runs, with no install step required.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;How SonarQube detects and contains it&lt;/h2&gt;&lt;p&gt;SonarQube&amp;#x27;s &lt;a href=&quot;https://www.sonarsource.com/blog/stop-malicious-packages-in-your-ci-cd-pipeline-with-sonarqube/&quot;&gt;malicious package detection&lt;/a&gt; compares your dependencies against a live feed of known bad packages and flags a match as soon as its scan finds one. This is the layer that catches the worm during its propagation phase, when a compromised version is actively spreading across the ecosystem.&lt;/p&gt;&lt;img src=&quot;https://assets-eu-01.kc-usercontent.com:443/ef593040-b591-0198-9506-ed88b30bc023/ae94eb76-a93d-4df1-97f8-a87f82b4c06f/shai-hulud-blog-1.png&quot; /&gt;&lt;h3&gt;The primary layer — malicious package detection&lt;/h3&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/advanced-security/&quot;&gt;SonarQube Advanced Security&lt;/a&gt; includes software composition analysis that checks your dependency tree against constantly updated lists of known malicious packages, drawing on community threat intelligence such as the &lt;a href=&quot;https://github.com/ossf/malicious-packages&quot;&gt;OpenSSF Malicious Packages&lt;/a&gt; database. This is different from traditional CVE-based scanning. A worm like Shai-Hulud is active malware, not a vulnerability sitting in otherwise legitimate code, and it often never gets a CVE at all. It also catches what signing can&amp;#x27;t: a package can carry valid build provenance and signed attestations and still be malicious, because those verify how it was built, not whether the code that entered the pipeline was safe. This check matches the package and version against known malicious package intelligence, which is why it holds up even when a poisoned release rides a trusted, fully attested CI pipeline.&lt;/p&gt;&lt;p&gt;When a known bad package turns up in your tree, SonarQube surfaces it as a blocker-severity dependency risk. Add a dependency-risk condition to your &lt;a href=&quot;https://www.sonarsource.com/blog/stop-malicious-packages-in-your-ci-cd-pipeline-with-sonarqube/&quot;&gt;quality gate&lt;/a&gt;, and with your pipeline set to break on a failing gate, that risk stops the build before the compromised dependency ships. npm, Yarn, pnpm, and Bun are all &lt;a href=&quot;https://docs.sonarsource.com/sonarqube-server/advanced-security/analyzing-projects-for-dependencies&quot;&gt;supported ecosystems&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;SonarQube re-checks the dependencies on your permanent branches against the latest feed on a schedule, once per day by default. So a package that was clean when you installed it and later gets catalogued as malicious will be flagged on the next rescan, with no new commit required. That&amp;#x27;s the exact failure mode this attack creates: the version you pulled last week is the version that goes bad this week.&lt;/p&gt;&lt;h3&gt;Supporting layer — catch before commit&lt;/h3&gt;&lt;p&gt;The &lt;a href=&quot;https://www.sonarsource.com/sonarqube/cli/&quot;&gt;SonarQube CLI&lt;/a&gt; installs a Git pre-commit hook that runs on the developer&amp;#x27;s machine, before anything reaches CI. When a commit changes a dependency manifest or lockfile, the hook scans the changed dependencies and blocks the commit on any new risk rated medium severity or higher, which covers every malicious package risk, since those are always blocker severity. That pushes the catch point as early as it goes: a known bad package never makes it into a commit. If the scanner can&amp;#x27;t run or the network is unavailable, the hook fails open and allows the commit through, so treat it as a first line of defense rather than the only one.&lt;/p&gt;&lt;h3&gt;Supporting layer — dependency pre-flight for agents&lt;/h3&gt;&lt;p&gt;The &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/mcp-server/&quot;&gt;SonarQube MCP Server&lt;/a&gt; can require a dependency check against the same threat intelligence before an agent modifies a manifest or lockfile. This class of malware spreads through dependency changes, so the check catches a known bad package at the exact point it would enter your project. It&amp;#x27;s a guardrail rather than a hard block, and like every feed-based check, it&amp;#x27;s only as good as the feed is current.&lt;/p&gt;&lt;h3&gt;Supporting layer — secrets detection&lt;/h3&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/solutions/secrets-detection/&quot;&gt;Secrets detection&lt;/a&gt; won&amp;#x27;t stop the infection, but the worm&amp;#x27;s entire payoff is credential theft. If a stolen or hardcoded credential lands in your code, rules like S6418 and S2068 catch it and shrink the impacted area. Note that this serves as a containment layer, not a prevention layer.&lt;/p&gt;&lt;p&gt;In summary, SonarQube detects and contains known Shai-Hulud packages and helps shrink the blast radius when a stolen or hardcoded credential ends up in your code. No feed-based check catches a compromise the instant it&amp;#x27;s published, and you should be skeptical of any tool that claims to prevent every supply chain attack. SonarQube, however, gives you a net that catches this worm while it spreads and the daily rescan that flags it after the fact, the two windows through which it wreaks havoc.&lt;/p&gt;&lt;h2&gt;Next steps&lt;/h2&gt;&lt;p&gt;If you think you&amp;#x27;ve been affected, time is of the essence and your order of operations is consequential. Work through this list from top to bottom:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Stop the bleed&lt;/strong&gt; — Halt affected CI/CD pipelines. If you find persistence artifacts (unexpected &lt;code&gt;SessionStart&lt;/code&gt; hooks, rogue background services), remove them &lt;em&gt;before&lt;/em&gt; rotating tokens so a live payload can&amp;#x27;t recapture the new credentials.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Rotate credentials&lt;/strong&gt; — Rotate npm tokens, GitHub personal access tokens, cloud keys (AWS, GCP, Azure), SSH keys, and CI secrets. Perform this step even if you have MFA enabled.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Clean the tree&lt;/strong&gt; — Audit your dependencies, remove &lt;code&gt;node_modules&lt;/code&gt;, and reinstall from a known good lockfile. Don&amp;#x27;t rely on &lt;code&gt;latest&lt;/code&gt; or a version bump alone; attackers flip tags, so pin and verify the exact resolved versions your lockfile installs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Turn on the net&lt;/strong&gt; — Enable software composition analysis in SonarQube Advanced Security with quality gate enforcement in CI/CD, and confirm the daily rescan is running on your permanent branches.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Guard the agents&lt;/strong&gt; — If you use coding agents, wire the MCP dependency pre-flight and audit your &lt;code&gt;.claude/&lt;/code&gt; and &lt;code&gt;.vscode/&lt;/code&gt; config directories for injected hooks.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Catch the leaks&lt;/strong&gt; — Enable secrets detection so that any credential that does slip into code gets flagged fast.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Harden the install path&lt;/strong&gt; — Disable or restrict npm install scripts (for example, install with &lt;code&gt;--ignore-scripts&lt;/code&gt; in CI, or use an npm release that blocks unapproved lifecycle scripts by default) so a malicious &lt;code&gt;preinstall&lt;/code&gt; can&amp;#x27;t execute in the first place.&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;Here we go again&lt;/h2&gt;&lt;p&gt;Supply chain attacks used to run once, at install time, but the newer Shai-Hulud variants persist inside the tools developers use every day, including AI coding agents that add and change dependencies on their own. That shift is exactly why defense has to live at the point of change. A feed-backed quality gate that fails the build on a known bad package is how you keep the loop clean as more of that loop becomes automated.&lt;/p&gt;&lt;p&gt;Shai-Hulud will likely return. The packages may carry different names, and the mechanics may shift, but the defense mustn’t: know what&amp;#x27;s in your dependencies, block the versions that are known bad, and rotate fast when something gets through.&lt;/p&gt;&lt;h3&gt;Further reading&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/blog/mini-shai-hulud-targets-ai-coding-agents/&quot;&gt;Mini Shai-Hulud targets AI coding agents&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/blog/why-your-supply-chain-attack-surface-is-expanding/&quot;&gt;Why your supply chain attack surface is expanding&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/blog/stop-malicious-packages-in-your-ci-cd-pipeline-with-sonarqube/&quot;&gt;Stop malicious packages in your CI/CD pipeline with SonarQube&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://docs.sonarsource.com/sonarqube-server/advanced-security/analyzing-projects-for-dependencies&quot;&gt;Analyzing projects for dependencies (SonarQube docs)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/advanced-security/&quot;&gt;SonarQube Advanced Security&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Migrating to SonarQube Cloud just got a whole lot easier]]></title><description><![CDATA[Introducing the new Sonar Migration Tool to automate moving from SonarQube Server to SonarQube Cloud. Now migrating is easier than ever.]]></description><link>https://www.sonarsource.com/blog/migrating-to-sonarqube-cloud-just-got-a-whole-lot-easier/</link><guid isPermaLink="false">en:8e3801da-f561-4932-bf90-a8a8f973c571</guid><dc:creator><![CDATA[Olivier Korach]]></dc:creator><pubDate>Fri, 31 Jul 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;We are excited to announce the launch of the &lt;strong&gt;Sonar Migration Tool&lt;/strong&gt;, a new, purpose-built utility that makes migrating from &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/server/&quot;&gt;SonarQube Server&lt;/a&gt; to &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/cloud/&quot;&gt;SonarQube Cloud&lt;/a&gt; faster, more reliable, and accessible to every team, regardless of the size or complexity of their setup.&lt;/p&gt;&lt;h2&gt;What does the Sonar Migration Tool do?&lt;/h2&gt;&lt;p&gt;The Sonar Migration Tool automates the end-to-end migration of a SonarQube Server instance to SonarQube Cloud Enterprise. It is robust, fully documented, and designed from the ground up with ease and self-service in mind.&lt;/p&gt;&lt;p&gt;It migrates:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Projects&lt;/strong&gt;, with all their settings, webhooks, links, and new code period configuration&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Quality Gates and Quality Profiles&lt;/strong&gt;, including custom rules and parent relationships&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Groups, Permissions, and Permission Templates&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Portfolios&lt;/strong&gt; (Enterprise edition)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Issue and Security Hotspot history&lt;/strong&gt;, statuses, comments, tags, and triage decisions are preserved&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Source code and metrics&lt;/strong&gt;, so your projects on SonarQube Cloud are seeded immediately, no immediate re-scan required&lt;/li&gt;&lt;li&gt;&lt;strong&gt;All branches&lt;/strong&gt;, non-main branches migrate as long-lived branches with their full issue history intact&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Issue creation dates&lt;/strong&gt;:, preserved via backdating, so your new-code-period baseline remains accurate from day one&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;How do you run the Sonar Migration Tool step by step?&lt;/h2&gt;&lt;p&gt;For teams with a straightforward setup, one SonarQube Server instance feeding a single SonarQube Cloud organization, migration now takes &lt;strong&gt;four commands&lt;/strong&gt; and a config file.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sonar-migration-tool extract --config my-config.json
sonar-migration-tool structure --config my-config.json
sonar-migration-tool mappings --config my-config.json
sonar-migration-tool migrate --config my-config.json \
    --default_organization &amp;lt;someOrg&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;The config file itself is minimal, just your SonarQube Server URL and token, and your SonarQube Cloud token and enterprise key.&lt;/p&gt;&lt;p&gt;For even simpler cases, such as migrating a single project or a small known set of projects, the &lt;code&gt;transfer&lt;/code&gt; command chains all four phases into one.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sonar-migration-tool transfer \
  --source_url https://sonarqube.example.com \
  --source_token squ_xxx \
  --project_key &amp;lt;myProjectKey&amp;gt; \
  --target_token squ_xxx \
  --default_organization &amp;lt;someOrg&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;One command. Done.&lt;/p&gt;&lt;p&gt;For teams who prefer not to type commands at all, a browser-based GUI is also available.&lt;/p&gt;&lt;p&gt;The GUI is currently experimental in the first release, but will be fully supported in a coming release.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sonar-migration-tool gui --config my-config.json  &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;This opens a guided migration interface in your default browser with progress bars, an event log, and visual CSV editors.&lt;/p&gt;&lt;h2&gt;Customers can run it themselves&lt;/h2&gt;&lt;p&gt;One of the core design objectives of the Sonar Migration Tool is &lt;strong&gt;self-service&lt;/strong&gt;. For customers with a simple setup, such as a single SonarQube Server instance and a single SonarQube Cloud organization, no technical assistance from Sonar is needed. Download the binary, prepare a config file, run four commands.&lt;/p&gt;&lt;p&gt;The tool ships as a &lt;strong&gt;single static binary&lt;/strong&gt; with no installer, no runtime dependencies, and no database. It runs on macOS, Linux, and Windows (X64 and ARM64). There is nothing to install beyond downloading and making it executable.&lt;/p&gt;&lt;p&gt;For more complex migrations, like multiple SonarQube Server instances, multiple target organizations, or environments requiring careful review of the mapping between &lt;a href=&quot;https://www.sonarsource.com/resources/library/devops/&quot;&gt;DevOps platforms&lt;/a&gt; and SonarQube Cloud organizations, the multi-phase workflow gives full control over each step. It also includes the ability to review and edit intermediate CSV files before committing to the migration in order to plan your migration.&lt;/p&gt;&lt;h2&gt;How fast is it?&lt;/h2&gt;&lt;p&gt;Migration speed depends on a number of factors: the number of projects, total lines of code, branch count, the number of issues with manual triage, and network latency. As a general reference point, the tool has been benchmarked against a representative small platform: &lt;strong&gt;70 projects, 100 branches, 500K lines of code, and 1,000 issues with manual changes&lt;/strong&gt;. Performance figures for this configuration are available in the quick-start guide.&lt;/p&gt;&lt;p&gt;For large instances (50,000+ projects), concurrency and timeout settings can be tuned, and the tool&amp;#x27;s resume capability ensures that a failure (OOM, network disconnection…) at any point does not require restarting from scratch.&lt;/p&gt;&lt;h2&gt;Which SonarQube Server versions are supported by the Sonar Migration Tool?&lt;/h2&gt;&lt;p&gt;The Sonar Migration Tool is compatible with:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;All editions&lt;/strong&gt; of SonarQube Server: Developer, Enterprise, and Data Center and even SonarQube Community Build&lt;/li&gt;&lt;li&gt;&lt;strong&gt;All LTA versions from SonarQube Server 9.9 and above&lt;/strong&gt; (intermediate versions are likely to work but have not been formally validated)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;All Active SonarQube Server&lt;/strong&gt; versions at any given moment (currently 2026.3 and 2026.4 as of Aug 1st, 2026)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Authentication is version-aware: Basic auth is used for SonarQube Server versions below 10, and Bearer token for version 10 and above.&lt;/p&gt;&lt;h2&gt;What are the prerequisites for migrating to SonarQube Cloud?&lt;/h2&gt;&lt;p&gt;Before running the tool, you will need:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;A &lt;strong&gt;SonarQube Cloud Enterprise&lt;/strong&gt; account with the target organizations already created&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Admin access&lt;/strong&gt; to your SonarQube Server or Community Build instance (System Admin token)&lt;/li&gt;&lt;li&gt;A &lt;strong&gt;SonarQube Cloud admin token&lt;/strong&gt; with enterprise-level permissions&lt;/li&gt;&lt;li&gt;A machine with at least &lt;strong&gt;8 GB of RAM&lt;/strong&gt; (the tool itself uses around 3 GB)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Local disk space&lt;/strong&gt; equal to at least 5× the size of your SonarQube Server database (the extracted data is stored locally before being pushed to the cloud)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Installation is a single step: download the binary for your operating system from the &lt;a href=&quot;https://github.com/sonar-solutions/sonar-migration-tool/releases&quot;&gt;releases page&lt;/a&gt;, extract the archive, and make it executable.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;mv sonar-migration-tool-&amp;lt;OS&amp;gt;-&amp;lt;ARCH&amp;gt; sonar-migration-tool
    chmod +x sonar-migration-tool
    ./sonar-migration-tool --help    &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;No Go installation, no package manager, no configuration files required to get started.&lt;/p&gt;&lt;h2&gt;Detailed migration reporting&lt;/h2&gt;&lt;p&gt;One of the most important capabilities of the Sonar Migration Tool is its &lt;strong&gt;migration report&lt;/strong&gt;. Because SonarQube Server and SonarQube Cloud are not feature-identical, a migration is rarely 100% perfect, and the tool is transparent about this.&lt;/p&gt;&lt;p&gt;After every migration run, a report is generated in both PDF and Markdown formats (&lt;code&gt;migration_summary.pdf&lt;/code&gt; / &lt;code&gt;migration_summary.md&lt;/code&gt;). Every migrated object is classified as:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Perfect&lt;/strong&gt; — migrated with 100% fidelity&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Near Perfect&lt;/strong&gt; — migrated with minor, acceptable loss of fidelity&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Partial&lt;/strong&gt; — migrated with significant loss of fidelity (with explanation)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Failed&lt;/strong&gt; — an error occurred during migration (with detail)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Skipped&lt;/strong&gt; — not migrated, either by configuration or because the concept does not exist in SonarQube Cloud&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The report explains &lt;em&gt;why&lt;/em&gt; each non-perfect result occurred. Common reasons include: Quality Gates using metrics that don&amp;#x27;t exist in SonarQube Cloud, Quality Profiles with rules from third-party plugins, permissions granted to individual users (SonarQube Cloud manages identity through an IdP), or projects using a reference branch as their new code period.&lt;/p&gt;&lt;p&gt;Before running the actual migration, teams can generate a &lt;strong&gt;predictive report&lt;/strong&gt; using only the output extract, no SonarQube Cloud credentials required. This makes it possible to review expected results in advance, including sending the output extract to Sonar&amp;#x27;s technical team for a pre-migration review.&lt;/p&gt;&lt;h2&gt;What are the limitations of migrating from SonarQube Server to SonarQube Cloud?&lt;/h2&gt;&lt;p&gt;The tool migrates everything it can, but some aspects of a SonarQube Server configuration have no equivalent in SonarQube Cloud or require manual steps post-migration:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Project analysis history&lt;/strong&gt; is not migrated, only the latest analysis state is preserved&lt;/li&gt;&lt;li&gt;&lt;strong&gt;User accounts and authentication&lt;/strong&gt; are not migrated, identity management in SonarQube Cloud is handled by your identity provider and must be configured separately&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Permissions granted to individual users&lt;/strong&gt; (as opposed to groups) are not migrated.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Applications&lt;/strong&gt; are not migrated&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Portfolio hierarchies&lt;/strong&gt; are not migrated (flat portfolios are)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Issue assignments&lt;/strong&gt; are not preserved&lt;/li&gt;&lt;li&gt;&lt;strong&gt;SCM blame data&lt;/strong&gt; is attributed to a generic &lt;code&gt;sonar-migration-tool&lt;/code&gt; committer, this resolves itself after the first real scan on SonarQube Cloud&lt;/li&gt;&lt;li&gt;&lt;strong&gt;CI/CD pipeline configuration&lt;/strong&gt; must be updated manually (change &lt;code&gt;SONAR_HOST_URL&lt;/code&gt; and &lt;code&gt;SONAR_TOKEN&lt;/code&gt; in your pipelines)&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Post-migration activities&lt;/h2&gt;&lt;p&gt;Once the migration tool completes successfully, a few manual steps are needed to finish the transition:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Verify in SonarQube Cloud:&lt;/strong&gt;  confirm projects appear under the target organization, spot-check quality gates and profiles, and verify issue history and branches&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bind projects to DevOps platforms&lt;/strong&gt;: repository bindings (GitHub, GitLab, Azure DevOps, Bitbucket) are not migrated and must be configured in SonarQube Cloud&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Update CI/CD pipelines&lt;/strong&gt;: point your pipelines at SonarQube Cloud by updating &lt;code&gt;SONAR_HOST_URL&lt;/code&gt; and &lt;code&gt;SONAR_TOKEN&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Re-scan your projects&lt;/strong&gt;: run a normal analysis from your CI pipelines to confirm everything works end to end on the new platform&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Migrate other integrations&lt;/strong&gt;: IDE Connected Mode settings, email notifications, and any custom API integrations or provisioning scripts will need to be reconfigured for SonarQube Cloud&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Decommission your SonarQube Server instance&lt;/strong&gt; once you are satisfied with the migration&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;For complex environments, Sonar&amp;#x27;s Solutions Engineering and Onboarding teams can assist with a structured four-phase engagement: discovery and planning, migration strategy definition, migration execution, and post-migration validation.&lt;/p&gt;&lt;h2&gt;The time to move to SonarQube Cloud is now&lt;/h2&gt;&lt;p&gt;SonarQube Cloud is where Sonar&amp;#x27;s rapid investments in code analysis, AI coding workflows, AI-assisted remediation, and developer experience show up first. With the launch of the Sonar Migration Tool, the last significant barrier to migration, the effort and risk of the move itself, has been removed.&lt;/p&gt;&lt;p&gt;Whether your team wants to run the migration independently over a weekend or work with Sonar&amp;#x27;s technical team on a structured project, the path is now clear, automated, and transparent.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/sonar-solutions/sonar-migration-tool&quot;&gt;&lt;strong&gt;Get started with the Sonar Migration Tool →&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;The Sonar Migration Tool is available now. Download the binary for your platform from the releases page and follow the quick-start guide to begin your migration to SonarQube Cloud.&lt;/em&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Why Sonar signed the Open Weights and American AI Leadership letter]]></title><description><![CDATA[Discover why Sonar signed the Open Weights and American AI Leadership letter and why openness and verification matter for trusted AI.]]></description><link>https://www.sonarsource.com/blog/why-sonar-signed-the-open-weights-and-american-ai-leadership-letter/</link><guid isPermaLink="false">en:d1c7b9ab-e08d-492f-a6e8-df11759afe41</guid><dc:creator><![CDATA[Harry Wang]]></dc:creator><pubDate>Fri, 31 Jul 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;AI leadership will not be decided by a single model, or a single provider. It will be shaped by whether organizations across the economy can adopt AI in ways that are practical, adaptable, secure, and sustainable.&lt;/p&gt;&lt;p&gt;That is why Sonar has signed the Open Weights and American AI Leadership letter. The &lt;a href=&quot;https://www.microsoft.com/en-us/corporate-responsibility/topics/open-weight/&quot;&gt;letter&lt;/a&gt; makes the case for an AI ecosystem where open-weight models — models organizations can download, inspect, adapt, and run on their own infrastructure — help expand access, strengthen competition, and give organizations greater control over the AI capabilities they depend on.&lt;/p&gt;&lt;p&gt;For Sonar, this is ultimately about choice and confidence.&lt;/p&gt;&lt;h2&gt;Choice matters in the AI era&lt;/h2&gt;&lt;p&gt;No single model is right for every workload. Proprietary models can be the right option where simplicity, low infrastructure overhead, and scalability are essential. Open-weight models can be a strong fit where organizations need greater control over deployment, data, cost, latency, or customization.&lt;/p&gt;&lt;p&gt;The question is not frontier or open weight. It is which model is right for a particular job, and whether an organization can make that choice without being locked into a single approach.&lt;/p&gt;&lt;p&gt;Open weights give more teams the ability to build, evaluate, and deploy AI on terms that fit their needs. They can help startups, enterprises, public institutions, and researchers access advanced capabilities without training models from scratch or relying on a single provider for every use case. They also broaden the competition and experimentation that move the entire ecosystem forward.&lt;/p&gt;&lt;h2&gt;Openness requires accountability&lt;/h2&gt;&lt;p&gt;The case for open weights is not a case for ignoring risk. The letter recognizes that open-weight models carry real considerations, including the fact that released weights cannot be fully controlled or recalled. Those risks deserve serious attention and targeted, practical responses.&lt;/p&gt;&lt;p&gt;But restricting access is not the only path to security. Transparency can enable more researchers, developers, and defenders to inspect systems, identify weaknesses, test safeguards, and improve them over time. A resilient AI ecosystem needs both innovation and accountability.&lt;/p&gt;&lt;p&gt;That is particularly important as AI moves from answering questions to writing, reviewing, and modifying production software.&lt;/p&gt;&lt;h2&gt;Every model needs verification&lt;/h2&gt;&lt;p&gt;AI is accelerating the pace of software development. Whether code originates from a model accessed through an API, a self-hosted open-weight model, or an AI agent that uses several models, the code still has to meet the standards organizations rely on for &lt;a href=&quot;https://www.sonarsource.com/solutions/security/&quot;&gt;security&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/solutions/reliability/&quot;&gt;reliability&lt;/a&gt;, and &lt;a href=&quot;https://www.sonarsource.com/solutions/maintainability/&quot;&gt;maintainability&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Model choice does not replace analysis, testing, or review. In fact, as code generation accelerates, independent verification becomes more important.&lt;/p&gt;&lt;p&gt;Sonar helps organizations apply a consistent, zero-trust, multilayered verification standard across the software development lifecycle. That means teams can adopt the models and &lt;a href=&quot;https://www.sonarsource.com/resources/library/what-is-an-ai-agent/&quot;&gt;AI agents&lt;/a&gt; that best fit each workload while holding every line of code to the same engineering standard.&lt;/p&gt;&lt;p&gt;This is how organizations can make AI adoption durable: by pairing flexibility in how they build with confidence in what they ship.&lt;/p&gt;&lt;h2&gt;Building an AI ecosystem that lasts&lt;/h2&gt;&lt;p&gt;A strong American AI ecosystem should create more opportunity for organizations to innovate, compete, and build with confidence. Open-weight models are an important part of that ecosystem because they give organizations more options to apply AI where it can create real value.&lt;/p&gt;&lt;p&gt;Sonar is proud to support the Open Weights and American AI Leadership letter. We believe the future of AI development should give organizations the freedom to choose the right tools for the job, alongside the independent verification needed to turn that choice into trustworthy software.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[CLI vs. IDE: How to choose the best environment]]></title><description><![CDATA[Choose the AI coding environment that fits your style and use SonarQube to keep code quality, security, and reliability consistent everywhere.]]></description><link>https://www.sonarsource.com/blog/cli-vs-ide/</link><guid isPermaLink="false">en:8eff411a-f592-49e2-8b90-26f4c0ca4baa</guid><dc:creator><![CDATA[Taylor Luttrell-Williams]]></dc:creator><pubDate>Tue, 28 Jul 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In the agentic era, a great debate is stirring up the developer community: CLI vs. IDE for AI coding. Ask two developers where their &lt;a href=&quot;https://www.sonarsource.com/resources/library/what-is-an-ai-agent/&quot;&gt;AI coding agent&lt;/a&gt; should live and you might start an argument. One swears by the IDE, where the agent works inside a comprehensive editing environment: live diffs, project-wide navigation, language tooling, and an integrated debugger all within reach. The other runs the agent from the terminal, where it reads files, runs commands, and applies edits directly through the shell. Both ship code, and both think the other camp is driving their agents from the wrong seat. But while each side has compelling evidence to support their claim, what matters more than your preferred agentic environment is whether the code your agent produces is any good, and whether you can trust it, no matter which environment you’re working from.&lt;/p&gt;&lt;h2&gt;The case for the IDE&lt;/h2&gt;&lt;p&gt;The IDE has years of ergonomics supporting it. When an agent runs inside &lt;a href=&quot;https://cursor.com/&quot;&gt;Cursor&lt;/a&gt;, &lt;a href=&quot;https://devin.ai/&quot;&gt;Devin&lt;/a&gt;, &lt;a href=&quot;https://kiro.dev/&quot;&gt;Kiro&lt;/a&gt;, &lt;a href=&quot;https://zed.dev/&quot;&gt;Zed&lt;/a&gt;, or &lt;a href=&quot;https://code.visualstudio.com/&quot;&gt;VS Code&lt;/a&gt;, it inherits all of that: syntax highlighting, inline diffs, a file explorer, integrated source control, and a debugger within click’s&lt;em&gt; &lt;/em&gt;reach. You can watch a change land, scan the surrounding code, and accept or reject a suggestion without breaking focus and do so all in real time.&lt;/p&gt;&lt;p&gt;That visual context is the meat behind the pitch. The UI/UX is familiar, the learning curve is gentle, and reviewing what the agent accomplishes feels intuitive. For developers who think in terms of files and windows, the IDE keeps the agent close to the work at hand and close to the tools that verify it.&lt;/p&gt;&lt;p&gt;The trade-off is weight. IDEs carry overhead, they can feel busy when you want to move fast, and the graphical layer sometimes sits between you and the raw mechanics of what your agent is actually doing.&lt;/p&gt;&lt;h2&gt;The case for the CLI&lt;/h2&gt;&lt;p&gt;Then there’s the so-called &lt;em&gt;terminal renaissance &lt;/em&gt;that’s sweeping the developer community. Command line agents like &lt;a href=&quot;https://claude.com/product/claude-code&quot;&gt;Claude Code&lt;/a&gt;, &lt;a href=&quot;https://github.com/features/copilot/cli&quot;&gt;GitHub Copilot CLI&lt;/a&gt;, &lt;a href=&quot;https://chatgpt.com/codex/&quot;&gt;Codex CLI&lt;/a&gt;, &lt;a href=&quot;https://opencode.ai/&quot;&gt;OpenCode CLI&lt;/a&gt;, and &lt;a href=&quot;https://antigravity.google/product/antigravity-cli&quot;&gt;Antigravity CLI&lt;/a&gt; have pulled developers back to the shell, and the appeal is efficiency. The terminal is fast, scriptable, and composable. It pipes into everything else you already run, drops cleanly into CI, and strips away unnecessary visual chrome so that you can focus on intent and output.&lt;/p&gt;&lt;p&gt;The CLI carries a simplicity that many developers missed: one prompt, one clear result, without the context switching between panels. You can chain an agent into a git workflow, a build script, or a scheduled job without leaving the environment where the rest of your automation lives. For developers who value convenience measured in keystrokes and scripts rather than clicks, the CLI feels like home.&lt;/p&gt;&lt;p&gt;The cost lies on the flip side of its strength: less visual feedback, a steeper ramp for those not fluent in the shell, and fewer guardrails between a suggestion and your codebase.&lt;/p&gt;&lt;h2&gt;The debate misses the point&lt;/h2&gt;&lt;p&gt;Regarding ease of use, efficiency, convenience, and simplicity: each side has real claims to some, but neither checks all of the boxes. At the end of the day, the CLI vs. IDE debate is mostly a question of taste and workflow preference, and neither is as important as the code being produced.&lt;/p&gt;&lt;p&gt;AI agents generate code quickly in both environments, and speed without verification is how bugs, security vulnerabilities, and maintainability issues slip into and accumulate within your projects. The agent does not care where it runs and neither do the issues it can introduce. To that end, the &lt;em&gt;environment&lt;/em&gt; in question is far less important than the &lt;em&gt;code&lt;/em&gt;, which itself raises an important question: how do you ensure code quality and security wherever your agent happens to be working?&lt;/p&gt;&lt;h2&gt;SonarQube meets you where you work&lt;/h2&gt;&lt;p&gt;SonarQube’s zero trust, multilayered verification process ensures that the code produced by your agents hits the mark from the start, and integrates wherever you drive your agents. It plugs the same, trusted analysis you rely on into whichever environment you choose, so you never have to trade your preferred workflow for code you can trust.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;In the terminal, there’s the &lt;a href=&quot;https://www.sonarsource.com/sonarqube/cli/&quot;&gt;SonarQube CLI&lt;/a&gt;:&lt;/strong&gt; a command line companion for &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/cloud/&quot;&gt;SonarQube Cloud&lt;/a&gt; and &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/server/&quot;&gt;SonarQube Server&lt;/a&gt; that lets you scan for secrets, analyze local changes, and query your projects and issues without leaving the shell. It also wires SonarQube directly into your AI coding assistants, so the analysis runs where the agent runs.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;For CLI-based agents, there are the &lt;a href=&quot;https://github.com/SonarSource/sonarqube-agent-plugins&quot;&gt;SonarQube agent integrations&lt;/a&gt;:&lt;/strong&gt; plugins that connect agents to the SonarQube CLI and SonarQube MCP Server for issue detection, project metrics like test coverage and duplications, dependency risk checks, and more. Claude Code, Copilot CLI, Codex CLI, and Antigravity CLI install agent hooks for secrets scanning through the SonarQube CLI, and, when entitled, &lt;a href=&quot;https://www.sonarsource.com/products/sonar-vortex/&quot;&gt;Sonar Vortex&lt;/a&gt; lends your agents project &lt;a href=&quot;https://www.sonarsource.com/products/context-augmentation/&quot;&gt;context and constraints&lt;/a&gt;, and provides &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/agentic-analysis/&quot;&gt;agentic loop verification&lt;/a&gt;. Your agent gets a quality and security check built into its loop instead of bolted on afterward.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;In AI-native IDEs, there’s the &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/mcp-server/&quot;&gt;SonarQube MCP Server&lt;/a&gt;&lt;/strong&gt;, which&lt;strong&gt; &lt;/strong&gt;lets your agents pull trusted SonarQube analysis directly into the editor to review AI-generated code and hold it to your standards. Cursor, Kiro, Devin Desktop, and Gemini or Copilot&amp;#x27;s VS Code agent modes all connect to SonarQube this way, so the same coding standards that govern your terminal-based workflow govern your IDE workflow too.&lt;/p&gt;&lt;p&gt;With the SonarQube MCP Server, CLI, and agent integrations, you stick to your preferred environment and habits. SonarQube adapts to you, not the other way around.&lt;/p&gt;&lt;h2&gt;The environment is yours, the standard is constant&lt;/h2&gt;&lt;p&gt;Regardless of your preferred AI coding environment, every line of code that an agent writes should be verified against a consistent standard before it reaches your codebase, and that standard cannot depend on whether you happen to prefer the terminal or a graphical editor.&lt;/p&gt;&lt;p&gt;So pick the environment that fits how you think and how you work. Run your agent in the IDE if you want the visual context, or in the CLI if you want the speed and composability. The CLI vs. IDE debate is one based on taste, and the choice is yours to make. What isn’t up for debate, however, is whether the code holds up. With SonarQube available to either side, it does.&lt;/p&gt;&lt;h2&gt;Next steps&lt;/h2&gt;&lt;p&gt;Explore the SonarQube products that plug into AI coding agents, in your CLI or IDE:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://github.com/SonarSource/sonarqube-cli&quot;&gt;SonarQube CLI &lt;/a&gt;— the command line companion for SonarQube Cloud and Server&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://github.com/SonarSource/sonarqube-agent-plugins&quot;&gt;SonarQube agent integrations&lt;/a&gt; — plugins that connect AI agents to SonarQube&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://github.com/SonarSource/sonarqube-mcp-server&quot;&gt;SonarQube MCP Server&lt;/a&gt; — trusted SonarQube analysis inside your AI-native IDE or CLI&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Consult our developer guides to set up SonarQube within your preferred environment:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;CLI&lt;/strong&gt; — SonarQube plugin for&lt;strong&gt; &lt;/strong&gt;&lt;a href=&quot;https://www.sonarsource.com/resources/library/set-up-the-sonarqube-plugin-for-claude-code/&quot;&gt;Claude Code&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/resources/library/set-up-the-sonarqube-plugin-for-github-copilot-cli/&quot;&gt;GitHub Copilot CLI&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/resources/library/set-up-the-sonarqube-plugin-for-codex/&quot;&gt;Codex CLI&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/resources/library/configure-opencode-cli-for-sonar-context-augmentation-and-agentic-analysis/&quot;&gt;OpenCode CLI&lt;/a&gt;, and &lt;a href=&quot;https://www.sonarsource.com/resources/library/set-up-the-sonarqube-plugin-for-antigravity/&quot;&gt;Antigravity CLI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;IDE &lt;/strong&gt;—  &lt;a href=&quot;https://www.sonarsource.com/resources/library/set-up-the-sonarqube-plugin-for-cursor/&quot;&gt;Cursor&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/resources/library/configure-zed-for-sonar-context-augmentation-and-agentic-analysis/&quot;&gt;Zed&lt;/a&gt;, VS Code for &lt;a href=&quot;https://www.sonarsource.com/resources/library/sonarqube-agentic-analysis-in-vs-code-with-github-copilot/&quot;&gt;GitHub Copilot&lt;/a&gt;, &lt;a href=&quot;https://chatgpt.com/codex/&quot;&gt;Codex&lt;/a&gt;, and &lt;a href=&quot;https://www.sonarsource.com/resources/library/get-started-with-sonarqube-mcp-server-and-gemini-code-assist-agent-mode/&quot;&gt;Gemini&lt;/a&gt;, and &lt;a href=&quot;https://www.sonarsource.com/resources/library/set-up-the-sonarqube-power-for-kiro/&quot;&gt;Kiro&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If you also want real-time feedback while you write code yourself,&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/ide/&quot;&gt; SonarQube for IDE&lt;/a&gt; runs alongside you in the editor.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Scaling AI-assisted development in US financial services without losing control]]></title><description><![CDATA[Learn how AI-assisted development helps US financial institutions deliver software faster while maintaining security, quality, and FFIEC-aligned controls.]]></description><link>https://www.sonarsource.com/blog/scaling-ai-assisted-development-in-us-financial-services/</link><guid isPermaLink="false">en:3c706761-55a7-4565-ba47-ae0ece40c58e</guid><dc:creator><![CDATA[Ekaterina Okuneva]]></dc:creator><pubDate>Tue, 28 Jul 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;US financial institutions are entering a new phase of software delivery. Banks, credit unions, payment providers, fintech teams, and other financial services organizations need to modernize legacy systems, improve digital experiences, automate internal workflows, and respond faster to operational change.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/resources/library/ai-assisted-software-development/&quot;&gt;AI-assisted development&lt;/a&gt; can expand what those teams are able to build. It can help engineers move faster through repetitive implementation work, generate tests, understand legacy code, and collaborate more directly with business, risk, and compliance stakeholders. But in financial services, faster code creation is only useful if the resulting software remains secure, maintainable, reviewable, and controlled.&lt;/p&gt;&lt;p&gt;That is the real adoption challenge. AI can increase software development velocity, but financial institutions still need evidence that software is being reviewed consistently, vulnerabilities are being identified early, dependencies are understood, and remediation is tracked before code reaches production.&lt;/p&gt;&lt;p&gt;To understand the impact &lt;a href=&quot;https://www.sonarsource.com/solutions/automated-code-review/&quot;&gt;automated code verification&lt;/a&gt; can have on a software development pipeline in a financial institution, it helps to look at how it supports the control expectations already used to govern software delivery in the industry. The &lt;a href=&quot;https://ithandbook.ffiec.gov/it-booklets/development-acquisition-and-maintenance/&quot;&gt;FFIEC Development, Acquisition, and Maintenance booklet&lt;/a&gt; is a useful example. It does not create a separate regime for AI-assisted development or prescribe a specific tool, but it does describe the governance, secure development, testing, DevSecOps, supply chain, and change management practices that financial institutions are expected to manage across the SDLC.&lt;/p&gt;&lt;p&gt;That makes it a practical lens for evaluating AI-assisted development. As AI increases the speed and volume of code moving through the pipeline, the underlying expectations remain. Institutions still need consistent review, vulnerability detection, remediation tracking, software composition visibility, and evidence that controls are operating, and &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt; is the code verification layer that supports all of the above without adding a strain on a normal engineering workflow.&lt;/p&gt;&lt;h2&gt;How SonarQube maps to FFIEC DAM expectations&lt;/h2&gt;&lt;h3&gt;Governance and risk management&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;FFIEC DAM area&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Compliance theme&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;How SonarQube supports it&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section II: Governance - QA reports and coding error detection&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Governance evidence for coding-error detection&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Provides reports on code quality, security findings, remediation progress, and quality gate outcomes, giving institutions evidence that coding errors are detected and tracked through a systematic process.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section III.C: Risk Monitoring and Reporting&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Timely software risk reporting&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Surfaces open vulnerabilities, dependency risks, issue trends, policy exceptions, remediation status, and quality gate results across analyzed projects, helping management monitor software risk with clearer metrics.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section III.D: Risk Mitigation - Early detection through developer feedback&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Earlier detection and lower remediation burden&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Brings findings into IDEs, pull requests, branches, and CI/CD pipelines so developers can address vulnerabilities, defects, and security hotspots earlier in the development process.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;em&gt;Governance and risk management&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Development, quality, and SDLC controls&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;FFIEC DAM area&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Compliance theme&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;How SonarQube supports it&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section IV.D: Secure Development - Automated Code Review&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Automated secure code review&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Performs automated code analysis to identify vulnerabilities, security hotspots, coding weaknesses, and quality issues before release, making code review more scalable and consistent.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section IV.D: Vulnerability Scanning in Development Environments&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Development-stage vulnerability detection&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Analyzes code in development workflows, branches, pull requests, and CI/CD pipelines so code-level vulnerabilities and weaknesses can be addressed before promotion to production.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section IV.K: Quality Management&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Measurable QA/QC and remediation tracking&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Provides quality and security metrics, issue trends, remediation visibility, and project-level reporting, giving QA, security, and engineering teams a repeatable way to track defects and validate quality practices.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section IV.O: System Development Life Cycle - Security Throughout SDLC Phases&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Traceable security and quality review across the SDLC&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Creates code-level evidence that security and quality risks are being reviewed as systems are developed, implemented, changed, and maintained.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section V.A: Development Standards and Controls&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Consistent coding and security standards&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Applies defined coding rules, security rules, quality profiles, and quality gates across projects, helping institutions enforce standards and document whether software meets expected thresholds.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;em&gt;Development, quality, and SDLC controls&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Testing, DevOps, and DevSecOps&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;FFIEC DAM area&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Compliance theme&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;How SonarQube supports it&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section V.B: Testing - Static Analysis&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Static code testing&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Examines source code without executing it to identify vulnerabilities, reliability issues, maintainability problems, and other code defects, making static analysis part of the ongoing testing program.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section V.B: Testing Documentation and Corrective Action&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Testing records and remediation evidence&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Maintains records of findings, issue status, severity, assignment, remediation activity, and quality gate outcomes, helping teams document what was tested, what was found, and how issues were addressed.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section V.C.1: DevOps Risk Controls&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Controls for fast-moving delivery pipelines&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Adds automated analysis, quality gates, and visible issue tracking to delivery workflows, helping reduce DevOps risks related to unscanned code, inadequate metrics, and bypassed coding standards.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section V.C.2: DevSecOps&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Security embedded throughout delivery&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Integrates code analysis into CI/CD and developer workflows, helping teams apply security and quality checks continuously while giving developers timely feedback.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;em&gt;Testing, DevOps, and DevSecOps&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Open source and software supply chain&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;FFIEC DAM area&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Compliance theme&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;How SonarQube supports it&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section IV.A: Open-Source - Component Analysis&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Open-source and third-party component risk&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Identifies third-party and open-source dependencies, vulnerability and license-policy risks, and direct and transitive dependency exposure, helping institutions assess inherited software risk from analyzed components.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section IV.A and IV.C.1(a): Open-Source License Risk and Compliance&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;License visibility and policy review&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Identifies licenses associated with open-source dependencies and flags license-policy concerns for legal, procurement, security, and engineering review.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Sections IV.D and IV.Q.1: Third-Party Secure Development and Supply Chain Risk Review&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Externally supplied code and supply chain software risk&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Allows third-party-supplied code and dependency manifests to be analyzed against the same security, quality, and policy checks used for internal development.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section IV.Q.2: Software Bill of Materials&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Software composition transparency&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Maintains visibility into analyzed software dependencies and SBOM-related component information, helping institutions document software composition and match components to known vulnerabilities.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;em&gt;Open source and software supply chain&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Containers and repository-based change&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;FFIEC DAM area&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Compliance theme&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;How SonarQube supports it&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section IV.H: Containers - Embedded Secrets and Component Risk&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Secrets and vulnerable components before packaging&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Detects secrets, credentials, and private keys in source code and configuration files before they are packaged into container images, and identifies dependency risks in containerized applications. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;Section VII.B.2(c): Code Repository Controls&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Automated review evidence in repository workflows&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Analyzes code from connected repositories and pull requests before changes are merged or released, adding automated review evidence to repository-based workflows. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;em&gt;Containers and repository-based change&lt;/em&gt;&lt;/p&gt;&lt;h2&gt;Why does this matter for AI-assisted development?&lt;/h2&gt;&lt;p&gt;AI-assisted development changes the economics of software creation: it allows teams to produce more code, move through routine work faster, and bring business expertise closer to implementation. For US financial institutions, that creates a meaningful opportunity: more software can be built closer to the workflows, risks, and controls it is meant to support.&lt;/p&gt;&lt;p&gt;AI can increase the volume of code, dependencies, and change events moving through the SDLC. But every one of those changes still needs to be reviewed against the institution’s standards for security, quality, maintainability, and software supply chain risk. If verification remains manual or late-stage, the institution does not gain speed; it moves the bottleneck to review, remediation, and approval.&lt;/p&gt;&lt;p&gt;For financial institutions, the goal is to increase delivery capacity while preserving confidence in the software being built. &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt; makes that model practical: AI can accelerate development, while continuous verification keeps &lt;a href=&quot;https://www.sonarsource.com/solutions/ai-code-quality/&quot;&gt;quality&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/solutions/security/&quot;&gt;security&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/solutions/maintainability/&quot;&gt;maintainability&lt;/a&gt;, and &lt;a href=&quot;https://www.sonarsource.com/solutions/software-supply-chain-security/&quot;&gt;software supply chain&lt;/a&gt; risk visible across the SDLC. &lt;a href=&quot;https://www.sonarsource.com/company/contact/&quot;&gt;Get in touch&lt;/a&gt; to learn more. &lt;/p&gt;</content:encoded></item><item><title><![CDATA[Now available: SonarQube plugin for Antigravity]]></title><description><![CDATA[Discover the SonarQube plugin for Antigravity and verify AI generated code with trusted quality security and coverage checks in every session.]]></description><link>https://www.sonarsource.com/blog/now-available-sonarqube-plugin-for-antigravity/</link><guid isPermaLink="false">en:3fcd2345-fe66-4a41-b7e2-c95966efcb8e</guid><dc:creator><![CDATA[Brooks Naylor]]></dc:creator><pubDate>Mon, 27 Jul 2026 13:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;What is the SonarQube plugin for Antigravity?&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/resources/library/what-is-an-ai-agent/&quot;&gt;AI coding agents&lt;/a&gt; generate code faster than any team can review. Google Antigravity lets software developers architect and implement entire features in minutes. That velocity creates a new risk: code quality and security debt accumulates faster than anyone can catch it.&lt;/p&gt;&lt;p&gt;The &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt; plugin for Antigravity closes that gap. It embeds deterministic code verification inside the agent&amp;#x27;s own workflow, so the same standards you enforce in CI apply the moment code is generated.&lt;/p&gt;&lt;p&gt;The plugin connects Antigravity to your SonarQube instance through the &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/mcp-server/&quot;&gt;SonarQube MCP Server&lt;/a&gt; and the &lt;a href=&quot;https://sonarsource.com/sonarqube/cli/&quot;&gt;SonarQube CLI&lt;/a&gt;. Once installed, Antigravity agents can query quality gate status, list open issues, review coverage and duplication, and assess dependency risks, all without leaving the session. Verification runs against the quality profiles and gates your organization already maintains.&lt;/p&gt;&lt;p&gt;The Antigravity plugin joins the wave of SonarQube agent plugins released in 2026, extending consistent code verification to another environment where your software developers generate code. No tool left behind, no quality gap left open.&lt;/p&gt;&lt;h2&gt;How do I set up the SonarQube plugin for Antigravity?&lt;/h2&gt;&lt;p&gt;Antigravity uses two install surfaces, both backed by the SonarQube CLI, so the full setup only takes two steps. First, install the plugin bundle, which delivers skills, agent rules, and SonarQube MCP Server configuration:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;agy plugin install https://GitHub.com/SonarSource/sonarqube-agent-plugins&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Then authenticate and wire up the rest with the SonarQube CLI:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sonar auth login -o &amp;lt;your-organization-key-here&amp;gt;
    sonar integrate antigravity    &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;That second command installs secrets scanning hooks, Sonar Vortex agentic analysis instructions and a context augmentation skill, and the SonarQube MCP Server patch. Prefer a guided flow? Run &lt;code&gt;/sonarqube:sonar-integrate&lt;/code&gt; inside Antigravity to walk through the CLI installation, authentication, and plugin integration.&lt;/p&gt;&lt;p&gt;From there, use slash commands like &lt;code&gt;/sonarqube:sonar-quality-gate&lt;/code&gt; or  use natural language prompts such as &amp;quot;analyze my code for issues&amp;quot; or &amp;quot;check my coverage.&amp;quot;&lt;/p&gt;&lt;img src=&quot;https://assets-eu-01.kc-usercontent.com:443/ef593040-b591-0198-9506-ed88b30bc023/729be48b-e40c-4d1b-a94d-527fc537ae3d/antigravity-plugin-1.png&quot; /&gt;&lt;p&gt;&lt;strong&gt;Sonar Vortex delivers inner-loop verification.&lt;/strong&gt; For organizations with &lt;a href=&quot;https://www.sonarsource.com/products/sonar-vortex/&quot;&gt;Sonar Vortex&lt;/a&gt; enabled, verification runs automatically at the end of each turn, across every file the agent changed, before it hands the turn back, with no manual invocation required. Vortex feeds the agent your context and constraints before it writes, verifies each change in session and in real time , and prompts the agent to correct its output when a check fails. The result is a closed loop: guide the agent with the right context, verify every edit deterministically, and fix issues before they leave the session.&lt;/p&gt;&lt;h2&gt;Why does AI-generated code need independent quality verification?&lt;/h2&gt;&lt;p&gt;AI models are probabilistic. The same prompt can produce different results on different days. That makes independent, deterministic verification mandatory, not optional. SonarQube is the independent verification layer: the same code produces the same result every time, giving you an auditable standard that AI self-review cannot.&lt;/p&gt;&lt;p&gt;This is the &lt;a href=&quot;https://www.sonarsource.com/agent-centric-development/&quot;&gt;Agent Centric Development Cycle (AC/DC)&lt;/a&gt; in practice. The framework rests on three pillars. &lt;strong&gt;Guide&lt;/strong&gt; agents with your standards, architecture, and constraints before they write. &lt;strong&gt;Verify&lt;/strong&gt; every change with zero-trust, multilayered verification across quality, security, and compliance. &lt;strong&gt;Solve&lt;/strong&gt; the issues verification finds, in the same session. The plugin places Guide and Verify inside Antigravity&amp;#x27;s own generation loop rather than deferring verification to the next CI run.&lt;/p&gt;&lt;p&gt;Verification at this pillar matters because small errors compound. When agents work for extended sessions and produce large payloads, a missed issue early on cascades through thousands of lines. Catching it at the point of generation is faster, cheaper, and far less disruptive than catching it downstream. That is why developers who verify their code with SonarQube are 44% less likely to report outages due to AI-generated code.&lt;/p&gt;&lt;h2&gt;How do I install and configure the SonarQube plugin for Antigravity?&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/resources/library/set-up-the-sonarqube-plugin-for-antigravity/&quot;&gt;The plugin is available now&lt;/a&gt;. Launch Antigravity, install the plugin bundle with &lt;code&gt;agy plugin install https://GitHub.com/SonarSource/sonarqube-agent-plugins&lt;/code&gt;, then run &lt;code&gt;sonar auth login&lt;/code&gt; and &lt;code&gt;sonar integrate antigravity&lt;/code&gt; to configure authentication, the MCP server, a secrets-scanning hook, prompt-secrets rules, and Sonar Vortex. Within minutes, every Antigravity session benefits from automated verification by SonarQube.&lt;/p&gt;&lt;p&gt;Use Antigravity for speed. Use SonarQube for trust.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/cloud/signup/&quot;&gt;Get started with SonarQube Cloud&lt;/a&gt; |&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/contact-sales/&quot;&gt; Contact sales&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[COBOL is back, and AI is writing it. Who's verifying the code?]]></title><description><![CDATA[As AI accelerates COBOL modernization, organizations face a new bottleneck. See why trusted verification is essential for every commit.]]></description><link>https://www.sonarsource.com/blog/cobol-is-back/</link><guid isPermaLink="false">en:61c798e6-c012-43ff-8389-b2b184e618d4</guid><dc:creator><![CDATA[Taylor Luttrell-Williams]]></dc:creator><pubDate>Thu, 23 Jul 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/cobol/&quot;&gt;COBOL&lt;/a&gt; wasn&amp;#x27;t supposed to be a 2026 story. The programming language turns 67 this year, most universities stopped teaching it in the 1990s, and for two decades the standard industry take assumed that it would quietly age out. Instead, COBOL’s back in the headlines because the two forces bearing down on it have finally collided: the people who understand COBOL are retiring, and AI has become capable enough to be pointed straight at the code they&amp;#x27;re leaving behind.&lt;/p&gt;&lt;p&gt;This confluence of factors is driving genuine investment, but most of its coverage is fixated on the wrong angle. Businesses and government agencies alike want to understand whether AI can write and translate COBOL. The harder question, and the one that actually decides whether any of this is viable, is &lt;em&gt;who&lt;/em&gt; verifies what the AI produces before, for example, it runs the payroll for a state government or clears a few billion dollars in overnight settlement.&lt;/p&gt;&lt;h2&gt;COBOL&amp;#x27;s comeback is a survival move&lt;/h2&gt;&lt;p&gt;This isn&amp;#x27;t a hype cycle, but rather triage, and the systems in question are load bearing for the economy. According to &lt;a href=&quot;https://www.reuters.com/article/us-usa-banks-cobol-idUSKBN17C0D8&quot;&gt;reporting by Reuters&lt;/a&gt;, an estimated $3 trillion in daily commerce flows through COBOL systems, with roughly 220 billion lines of code still running in production. Those figures are order-of-magnitude estimates from 2017, but nobody disputes the shape of it: banks, insurers, airlines, and government agencies like the IRS and the Social Security Administration still run core operations on COBOL. When several U.S. states sought out COBOL developers during the 2020 unemployment surge and couldn&amp;#x27;t find them, that wasn&amp;#x27;t a fluke, but instead a preview of what was to follow in the coming years.&lt;/p&gt;&lt;p&gt;The workforce math is central to this problem. The engineers who wrote and maintained these systems are reaching retirement, and the pipeline behind them dried up 30 years ago. Organizations aren&amp;#x27;t investing in COBOL because it&amp;#x27;s novel, they&amp;#x27;re investing because the alternative involves losing the institutional knowledge encoded in millions of lines of code that few engineers fully understand anymore, and that they cannot afford to get wrong. When assigned to COBOL, that&amp;#x27;s the context AI walked into.&lt;/p&gt;&lt;h2&gt;Can AI write and translate COBOL code?&lt;/h2&gt;&lt;p&gt;The most valuable thing AI does with COBOL isn&amp;#x27;t writing new code, it&amp;#x27;s explaining old code. Business-rule extraction, pointing a model at an undocumented paragraph and getting back a plain-language description of what it does, attacks the exact problem the retirement cliff creates. Knowledge that lives in one senior engineer&amp;#x27;s head can be surfaced, documented, and preserved before that engineer retires.&lt;/p&gt;&lt;p&gt;From there, AI accelerates the work that historically stalled COBOL modernization:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Translation &lt;/strong&gt;— agents can rewrite COBOL business logic into modular components or modern languages like &lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/java/&quot;&gt;Java&lt;/a&gt;, producing a first draft in a fraction of the time that a manual port would take.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Testing and debugging &lt;/strong&gt;— models generate test cases against existing behavior and refactor tangled procedures into something more legible.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;AI compresses the &lt;em&gt;understanding&lt;/em&gt; phase, which is the part that used to make COBOL modernization cost more than it was worth. The shift is monumental, and it&amp;#x27;s why the market suddenly cares about a language it had once written off.&lt;/p&gt;&lt;h2&gt;What are the risks of using AI to modernize COBOL systems?&lt;/h2&gt;&lt;p&gt;AI output is often a draft, not a finished product: a translation can look right but behave differently in subtle ways, or quietly reproduce the insecure patterns models pick up from their training data. And agents produce those mistakes at a scale and speed no human review process was designed to absorb. In an ordinary web app, you catch those in staging; in a benefits-disbursement system, you catch them when the checks are wrong.&lt;/p&gt;&lt;p&gt;Now layer another problem on top: the people qualified to catch these mistakes are the same people who are exiting the workforce. The COBOL expertise shortage isn&amp;#x27;t only a code-writing problem, but also a code-&lt;em&gt;reviewing&lt;/em&gt; problem. Every argument in favor of using AI (because human experts are scarce) is also, quietly, an argument that there are fewer humans left to verify what the AI wrote. The shortage doesn&amp;#x27;t just create the need for automation, it removes the safety net underneath it.&lt;/p&gt;&lt;p&gt;There&amp;#x27;s a more hopeful reading too, but one which also points toward verification: in the case of COBOL, agents can make good teachers. They help explain unfamiliar code, so a developer who has never before opened a COBOL program can become productive in weeks instead of months. Understandably, however, the developer learning COBOL with an AI agent is not as well equipped to notice when that agent is subtly wrong, and lowering the barrier to writing COBOL merely grows the pool producing it faster than the pool that can vouch for it.&lt;/p&gt;&lt;p&gt;Such are situations where more code is being generated faster, by tools that make subtle errors, headed into systems that genuinely cannot fail, reviewed by a shrinking pool of experts. That gap between how fast code is produced and how fast it can be verified is the real bottleneck in COBOL modernization: not generation, but trust.&lt;/p&gt;&lt;h2&gt;SonarQube: the verification layer for COBOL&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/cobol/&quot;&gt;SonarQube analyzes COBOL&lt;/a&gt; directly, with nearly 200 rules covering reliability, security, and maintainability issues across 10 COBOL dialects, reaching into the embedded DB2 SQL and CICS statements where real mainframe logic actually lives. When an issue spans more than one spot in the code, the analyzer highlights each location, and its rules carry remediation guidance, so a fix is legible even to someone who isn&amp;#x27;t a 30-year COBOL veteran.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt; analysis doesn&amp;#x27;t care &lt;em&gt;who&lt;/em&gt; wrote the code, so a quality gate applies the same pass-or-fail bar to a retiring expert&amp;#x27;s hand-written paragraph and an agent&amp;#x27;s freshly translated module. The goal is to verify all code, whether it&amp;#x27;s first-party, AI-generated, or open source. For COBOL specifically, this neutrality &lt;em&gt;is&lt;/em&gt; the point: when there aren’t enough human reviewers to keep up with what your agents produce, a deterministic analysis layer becomes the consistent second set of eyes, except that it doesn&amp;#x27;t retire, it doesn&amp;#x27;t skim, and it checks every line the same way, on every commit.&lt;/p&gt;&lt;p&gt;Consider a small, familiar example: an EVALUATE statement with no WHEN OTHER branch silently ignores every value that it wasn&amp;#x27;t explicitly told to handle. A rushed reviewer scrolls past it, and an AI agent translating a paragraph reproduces the omission without a second thought. Static analysis flags the unhandled case every single time, before it becomes the edge case that only ever lived in an expert’s memory. Multiply that across a modernization program running thousands of files, and the value of an automated bar that never gets tired becomes glaringly obvious.&lt;/p&gt;&lt;p&gt;Practically, the capability spans the products you&amp;#x27;d already reach for: &lt;a href=&quot;https://www.sonarsource.com/sem/knowledge/languages/cobol/&quot;&gt;COBOL analysis&lt;/a&gt; is available in &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/server/&quot;&gt;SonarQube Server&lt;/a&gt; (&lt;a href=&quot;https://www.sonarsource.com/get-started/server/&quot;&gt;Enterprise Edition&lt;/a&gt;) and &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/cloud/&quot;&gt;SonarQube Cloud&lt;/a&gt; (on an &lt;a href=&quot;https://www.sonarsource.com/plans-and-pricing/&quot;&gt;Enterprise plan&lt;/a&gt;), with in-editor feedback through &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/ide/&quot;&gt;SonarQube for IDE&lt;/a&gt; in &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/ide/features/connected-mode/&quot;&gt;connected mode&lt;/a&gt;. You extract the source to a filesystem and analyze it where the rest of your quality checks already live.&lt;/p&gt;&lt;h2&gt;Accelerate with AI agents, verify with SonarQube&lt;/h2&gt;&lt;p&gt;Strip away the COBOL specifics and you’ll reveal the broader direction of modern software development: agents generate, and an independent layer verifies. It&amp;#x27;s the pattern Sonar calls the &lt;a href=&quot;https://www.sonarsource.com/agent-centric-development/&quot;&gt;Agent Centric Development Cycle&lt;/a&gt;, where verification is mandatory, not optional, and is grounded in deterministic analysis (rather than asking a model to grade its own homework). COBOL represents a vivid proof case: the oldest and (arguably) highest-stakes code in the world, now being touched by the newest tools. AI didn&amp;#x27;t remove the need for rigor in COBOL; it raised it, and moved it to the verification layer.&lt;/p&gt;&lt;p&gt;If your organization is modernizing COBOL with AI in the loop, the question to answer before you scale it isn&amp;#x27;t whether the agents are fast and capable, but instead whether every line they produce has to clear the same gate as everything else. That gate is the difference between modernizing with confidence, and shipping expensive surprises into systems that were never allowed to have any.&lt;/p&gt;&lt;h2&gt;Where to go next&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/cobol/&quot;&gt;&lt;strong&gt;SonarQube COBOL analysis&lt;/strong&gt;&lt;/a&gt; — supported dialects, rule coverage, and how COBOL analysis fits your pipeline.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/languages/cobol&quot;&gt;&lt;strong&gt;SonarQube Server COBOL docs&lt;/strong&gt;&lt;/a&gt; and &lt;a href=&quot;https://docs.sonarsource.com/sonarqube-cloud/analyzing-source-code/languages/cobol&quot;&gt;&lt;strong&gt;SonarQube Cloud COBOL docs&lt;/strong&gt;&lt;/a&gt; — configuration, dialects, and embedded SQL/CICS setup.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/solutions/ai-code-quality/&quot;&gt;&lt;strong&gt;Verify AI-generated code with Sonar&lt;/strong&gt;&lt;/a&gt; — how the same verification bar applies to AI-generated and developer-written code.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/blog/the-future-is-ac-dc-the-agent-centric-development-cycle/&quot;&gt;&lt;strong&gt;The future is AC/DC&lt;/strong&gt;&lt;/a&gt; — why an independent verification layer is the center of gravity in agent-driven development.&lt;/li&gt;&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Escape from AppleScript: Even folder names can be user input]]></title><description><![CDATA[Learn how an AppleScript injection flaw in OpenInTerminal let crafted folder names execute arbitrary code and how safer APIs prevent similar attacks.]]></description><link>https://www.sonarsource.com/blog/escape-from-applescript/</link><guid isPermaLink="false">en:63685409-e9a2-4f6d-927c-b2c8b66232a2</guid><dc:creator><![CDATA[Paul Gerste]]></dc:creator><pubDate>Wed, 22 Jul 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://github.com/Ji4n1ng/OpenInTerminal&quot;&gt;OpenInTerminal&lt;/a&gt; is a popular macOS utility written in Swift that enhances the Finder by allowing users to quickly open the current directory in their preferred terminal application. It achieves this by integrating with the Finder&amp;#x27;s toolbar and context menu.&lt;/p&gt;&lt;p&gt;When we investigated the code base, we noticed that developers often use AppleScript as a replacement for the missing eval() function in Swift. This practice of dynamically creating and executing scripts brings the risks usually associated with dynamic languages into a compiled language.&lt;/p&gt;&lt;p&gt;This blog post will cover the technical details of an AppleScript Injection vulnerability discovered in OpenInTerminal, detected by SonarQube. We will walk through how a maliciously crafted folder could be used to execute arbitrary code on a victim&amp;#x27;s machine. Finally, we will look at how you can avoid such flaws in your code.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/embed/ovMuxFURI4Y?si=Tg6xgI6FTOcJMaew&quot;&gt;Escape from AppleScript&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;Impact&lt;/h2&gt;&lt;p&gt;An attacker can exploit this vulnerability to execute arbitrary code on a victim&amp;#x27;s computer. For a successful attack, the victim must download or receive a malicious folder structure (for example, by cloning an untrusted Git repository or extracting a ZIP archive) and then attempt to open one of the nested folders using OpenInTerminal&amp;#x27;s functionality with a non-standard terminal or editor.&lt;/p&gt;&lt;p&gt;The attack can be disguised by using symbolic links to make the trigger folder more accessible, reducing the amount of user interaction required.&lt;/p&gt;&lt;h2&gt;Technical details&lt;/h2&gt;&lt;p&gt;After scanning the OpenInTerminal code with SonarQube Cloud, we are presented with &lt;a href=&quot;https://sonarcloud.io/project/issues?impactSoftwareQualities=SECURITY&amp;amp;issueStatuses=OPEN%2CCONFIRMED&amp;amp;id=sonarsourceresearch_openinterminal-blog-post&amp;amp;open=AZ-EG_hbc7bYHbjQCH2S&quot;&gt;a vulnerability finding&lt;/a&gt;:&lt;/p&gt;&lt;img src=&quot;https://assets-eu-01.kc-usercontent.com:443/ef593040-b591-0198-9506-ed88b30bc023/160848ad-93d7-4ee8-9cee-cee0fccf5d75/openinterminal-issue.png&quot; /&gt;&lt;p&gt;The highlighted line of code will run arbitrary AppleScript code snippets passed to the &lt;code&gt;execute()&lt;/code&gt; function. To understand if this is indeed a vulnerability, we need to verify where these scripts are coming from. For example, OpenInTerminal uses AppleScript to launch external applications. To open a given file system path in a terminal, the application constructs and executes an AppleScript &lt;code&gt;do shell script&lt;/code&gt; command:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/Ji4n1ng/OpenInTerminal/blob/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminalCore/App.swift&quot;&gt;OpenInTerminalCore/App.swift&lt;/a&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;var openCommand = DefaultsManager.shared.getOpenCommand(self, escapeCount: 2)
openCommand += &amp;quot; &amp;quot; + path.specialCharEscaped(2)
let source = &amp;quot;&amp;quot;&amp;quot;
    do shell script &amp;quot;\(openCommand)&amp;quot;
    &amp;quot;&amp;quot;&amp;quot;
try excute(source)&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;The core issue lies in how special characters within the folder path are escaped. The application attempts to escape special characters for a shell context, but this escaping is insufficient for the surrounding AppleScript context.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;specialCharEscaped(2)&lt;/code&gt; function escapes characters like a double quote (&lt;code&gt;&amp;quot;&lt;/code&gt;) with two backslashes (&lt;code&gt;\\&amp;quot;&lt;/code&gt;). While this correctly escapes the quote for the &lt;code&gt;shell script&lt;/code&gt; portion of the command, it leaves the double quote &amp;quot;unescaped&amp;quot; from the perspective of the outer AppleScript interpreter.&lt;/p&gt;&lt;p&gt;For example, a folder named &lt;code&gt;foo&amp;quot;bar&lt;/code&gt; would be escaped into the following AppleScript source code:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;do shell script &amp;quot;open -a iTerm /Users/paul/foo\\&amp;quot;bar&amp;quot;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;This breaks the AppleScript syntax, as the lone &lt;code&gt;&amp;quot;&lt;/code&gt; prematurely terminates the string, leading to an error. An attacker can leverage this escaping flaw to break out of the string context and inject their own AppleScript commands.&lt;/p&gt;&lt;h3&gt;Exploitation path&lt;/h3&gt;&lt;p&gt;Executing a payload isn&amp;#x27;t straightforward because many special characters needed for simple commands (like spaces and double quotes) are escaped. To build a working exploit, an attacker must overcome several limitations:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Bypassing character restrictions:&lt;/strong&gt; To form a command string without using double quotes, an attacker can build it by converting ASCII character codes into characters (e.g., &lt;code&gt;ASCII character 65&lt;/code&gt; becomes &lt;code&gt;&amp;quot;A&amp;quot;&lt;/code&gt;). Since the &lt;code&gt;&amp;amp;&lt;/code&gt; character for concatenation is also escaped, an array of characters can be created and then coerced into a single string using the &lt;code&gt;as text&lt;/code&gt; keyword. Additionally, since the space character (0x20) would be escaped, the attacker can use tabs instead.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;-- create a char list: [&amp;#39;i&amp;#39;, &amp;#39;d&amp;#39;]
set charlist  to  {ASCII  character 105,ASCII character 100}
-- cast to text, joining chars to a single string
set cmd to  charlist  as  text&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Overcoming path length limits:&lt;/strong&gt; macOS limits a single folder or file name to 255 characters, which is too short for a complex payload. The payload can be split across multiple nested folders. The path separator (&lt;code&gt;/&lt;/code&gt;) that would break the script is hidden inside AppleScript line comments (&lt;code&gt;--&lt;/code&gt;), which causes the interpreter to ignore it and treat the content of the nested folder names as a continuation of the script.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;set a to  {ASCII  character 111,ASCII character 112,ASCII character 101,ASCIIcharacter  110,ASCII character 32,ASCII character 45,ASCII  character 97,ASCIIcharacter 32,ASCII character 67,ASCII  character 97}--/
set b to  {ASCII character 108,ASCII character 99,ASCII  character 117,ASCIIcharacter  108,ASCII character 97,ASCII  character 116,ASCII character 111,ASCIIcharacter 114}--/
set cmd to  {a,b} as  text
do  shell script  cmd --/interesting&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Finalizing the payload:&lt;/strong&gt; The final part of the payload must also start with a line comment (&lt;code&gt;--&lt;/code&gt;) to ensure the original, trailing double quote from the &lt;code&gt;do shell script&lt;/code&gt; command is ignored, preventing a syntax error. To make the attack more convincing, the attacker can add a top-level symlink pointing to the innermost folder so that the victim can end up in a folder whose path contains the payload without seeing or navigating through the suspicious intermediate folders.&lt;/p&gt;&lt;p&gt;When a user with a vulnerable version of OpenInTerminal tries to open the innermost &lt;code&gt;interesting&lt;/code&gt; folder, the chained AppleScript payload executes, in this case launching the Calculator application.&lt;/p&gt;&lt;h2&gt;Patch&lt;/h2&gt;&lt;p&gt;The vulnerability can be mitigated by avoiding AppleScript for running shell commands. The recommended approach is to use the native &lt;code&gt;Process&lt;/code&gt; interface to execute commands directly. This avoids passing the command through a secondary interpreter like AppleScript, eliminating the risk of an injection flaw caused by mismatched escaping rules.&lt;/p&gt;&lt;p&gt;The OpenInTerminal maintainer fixed this vulnerability by replacing string-built shell commands with structured argument passing. Previously, the application name and selected path were concatenated into a single command string, manually escaping a denylist of metacharacters before passing it to AppleScript’s &lt;code&gt;do shell script&lt;/code&gt;. This was brittle: crafted filenames or application names could cross the data/code boundary and be interpreted as shell syntax.&lt;/p&gt;&lt;p&gt;The fixed implementation sends &lt;code&gt;/usr/bin/open&lt;/code&gt;, its options, and each path as separate AppleEvent arguments. The AppleScript then applies POSIX &lt;code&gt;quoted form of&lt;/code&gt; to every element individually before execution, ensuring untrusted values remain literal arguments. This mirrors APIs such as &lt;code&gt;execve()&lt;/code&gt; or &lt;code&gt;subprocess.run([...], shell=False)&lt;/code&gt;: preserve argument boundaries instead of trying to sanitize a command string.&lt;/p&gt;&lt;h2&gt;Timeline&lt;/h2&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Action&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;2025-05-08&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;We report the vulnerabilities to OpenInTerminal&amp;#x27;s maintainer&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;2025-05-22&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The maintainer confirms the issues and states they will work on it in July&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;2025-08-07&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;We inform the maintainer that our 90-day disclosure deadline has elapsed&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;2026-07-13&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The maintainer fixes the issues and releases &lt;a href=&quot;https://github.com/Ji4n1ng/OpenInTerminal/releases/tag/v2.3.9&quot;&gt;v2.3.9&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;This vulnerability in OpenInTerminal is a good reminder of the risks associated with dynamically generating and executing scripts from user-controlled data, which includes something as seemingly innocuous as a file path. When one programming context (Swift) creates code for another (AppleScript) which in turn executes a third (shell), the escaping and sanitization rules must be perfectly aligned for all layers. A mismatch in these rules, as seen here, can create subtle but critical injection vulnerabilities. Developers should always favor native, safer APIs for process execution over dynamic script generation whenever possible.&lt;/p&gt;&lt;h2&gt;Related blog posts&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/blog/jellyfin-remote-code-execution/&quot;&gt;Jellyfin RCE | Inconsistent Validation Leads to Argument Injection&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/blog/claude-arbitrary-code-execution/&quot;&gt;Arbitrary code execution and Claude Code CLI: How Claude executed code before you click &amp;#x27;trust&amp;#x27;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/blog/ytdlnis-argument-injection-rce/&quot;&gt;Argument injection in YTDLnis via Android intent&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.sonarsource.com/blog/hidden-security-risks-in-jupyter-notebooks/&quot;&gt;More than just data: The hidden security risks in Jupyter notebooks&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Introducing SonarQube Server 2026.4]]></title><description><![CDATA[Discover SonarQube Server 2026.4 with architecture management, faster scans and stronger verification for agent generated code.]]></description><link>https://www.sonarsource.com/blog/introducing-sonarqube-server-2026-4/</link><guid isPermaLink="false">en:438779fd-f5b8-42cd-a03d-0cbe0f77d347</guid><dc:creator><![CDATA[Robert Curlee]]></dc:creator><pubDate>Wed, 22 Jul 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/resources/library/what-is-an-ai-agent/&quot;&gt;AI coding agents&lt;/a&gt; are writing more code than ever, and the pace is not slowing down. Pull requests that used to run a few hundred lines now run into the thousands. The question engineering organizations face is no longer whether to adopt agentic development. It&amp;#x27;s whether they can verify what agents produce fast enough, and rigorously enough, to ship it safely.&lt;/p&gt;&lt;p&gt;Today, Sonar is announcing &lt;strong&gt;SonarQube Server 2026.4&lt;/strong&gt;. This release strengthens the code verification layer your organization needs for the agentic era: a quality gate purpose-built for AI-generated code, architecture management now available on &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/server/&quot;&gt;SonarQube Server&lt;/a&gt;, and organization-wide visibility into whether quality gates are holding or quietly being bypassed.&lt;/p&gt;&lt;p&gt;At the center of this release is the new &amp;quot;Sonar way for Agentic AI&amp;quot; quality gate. Agent-generated code carries a different risk profile than code written by humans, agents rarely produce sloppy style, but they can introduce new dependency risk, security gaps, and reliability issues at a higher rate. This gate is calibrated to that reality: stricter on code security, reliability, and new dependencies, more permissive on minor maintainability issues that don&amp;#x27;t carry real risk. It includes new supply chain conditions built specifically for agentic threats, including agents that autonomously pull in typosquatted, hallucinated, or vulnerable packages. Alongside the new gate, this release expands in-product promotion of the Agentic AI quality profiles for &lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/js/&quot;&gt;JavaScript&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/ts/&quot;&gt;TypeScript&lt;/a&gt;, &lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/python/&quot;&gt;Python&lt;/a&gt;, and &lt;a href=&quot;https://www.sonarsource.com/knowledge/languages/java/&quot;&gt;Java&lt;/a&gt;, making it easier for teams to discover and adopt rule sets focused on where AI-introduced risk actually lives. AI security detection is extended with a dedicated family of agentic-security rules that cover the injection surface unique to CLI code, additional MCP-based security risks, and data leaks in AI mechanisms, catching the threat classes that emerge specifically when agents write the code&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/solutions/architecture/&quot;&gt;Architecture management&lt;/a&gt; also comes to&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/server/&quot;&gt; SonarQube Server&lt;/a&gt; for the first time, at no additional cost. Software architects can now visualize current architecture, define which components are allowed to depend on each other, and let &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt; automatically flag violations, closing a capability gap that previously existed only in &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/cloud/&quot;&gt;SonarQube Cloud&lt;/a&gt; and giving teams a way to manage structural drift before it becomes expensive technical debt.&lt;/p&gt;&lt;p&gt;To help teams see whether their quality gates are working in practice, not just in theory, a new dashboard tracks how often main branch releases pass or fail the gate over time and flags &amp;quot;risky releases&amp;quot; where code shipped despite a failing check. Developer leads get evidence instead of anecdotes. Engineering executives get a way to quantify the organizational risk created when &lt;a href=&quot;https://www.sonarsource.com/resources/library/quality-gate/&quot;&gt;quality gates&lt;/a&gt; are treated as optional.&lt;/p&gt;&lt;p&gt;This release also delivers meaningful speed improvements. Codebases with many entry points and large taint graphs now see up to 90% faster scans, with some large Java projects dropping from roughly 20 minutes to under a minute. Coverage is unchanged. No configuration change is required. Security-relevant findings, including injection-style vulnerabilities and other dataflow issues, reach developers far sooner in the review cycle. GitHub App setup is also faster: a new guided, one-click flow cuts integration time from around 12 minutes to under two, eliminating manual configuration and the risk of over-privileging the connection. Bulk actions for dependency risk triage round out the efficiency gains, bringing &lt;a href=&quot;https://www.sonarsource.com/solutions/security/sca/&quot;&gt;software composition analysis&lt;/a&gt; workflows in line with how standard code issues are already managed.&lt;/p&gt;&lt;p&gt;Rounding out the release: new rules catch notoriously hard-to-reproduce &lt;a href=&quot;https://www.sonarsource.com/resources/library/software-bugs/&quot;&gt;bugs&lt;/a&gt; in Java date and time handling, full support for the Gosu language opens SonarQube to Guidewire-based insurance organizations for the first time, and new performance baselines give teams a shared definition of &amp;quot;normal&amp;quot; analysis duration.&lt;/p&gt;&lt;p&gt;SonarQube Server 2026.4 is available now. &lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/whats-new/2026-4/&quot;&gt;Explore the full release notes&lt;/a&gt; to see everything included, and start verifying agent-generated code with the rigor it demands.&lt;/p&gt;</content:encoded></item></channel></rss>