Repository navigation
AP-1543 Run Vortex analysis before agent replies - #6599
erwan-leforestier-sonarsource wants to merge 1 commit into
Conversation
|
|
||
| # Before you reply: Vortex analysis | ||
|
|
||
| Install the [SonarQube CLI](https://docs.sonarsource.com/sonarqube-cli/), run `sonar auth login --server https://next.sonarqube.com/sonarqube/`, and optionally configure user-level integration with `sonar integrate claude` or `sonar integrate codex`. |
There was a problem hiding this comment.
💡 Quality: Skip example says SonarQube Cloud, but project binds to SonarQube Server
Step 3 (line 343) gives "no SonarQube Cloud connection" as the example skip reason. This checkout is bound to a SonarQube Server instance (serverUrl: https://next.sonarqube.com/sonarqube/ in .sonar-config.json), and line 312 asks users to authenticate against that server. An agent hitting an auth or connection failure may report or diagnose it as a missing Cloud connection, sending users to the wrong service. Use a server-neutral example, or one that names the Next server.
Make the example match the configured server:
3. If analysis is skipped for another reason (for example, no connection to https://next.sonarqube.com/sonarqube/ or missing authentication), state the reason once in your reply and continue without retrying this session.
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
|
|
||
| # Before you reply: Vortex analysis | ||
|
|
||
| Install the [SonarQube CLI](https://docs.sonarsource.com/sonarqube-cli/), run `sonar auth login --server https://next.sonarqube.com/sonarqube/`, and optionally configure user-level integration with `sonar integrate claude` or `sonar integrate codex`. |
There was a problem hiding this comment.
💡 Security: Agents may install user-level hooks without the user opting in
AGENTS.md is the instruction file coding agents read. Line 312 tells the reader to install the SonarQube CLI, run sonar auth login, and "optionally configure user-level integration with sonar integrate claude or sonar integrate codex". Nothing says only a human may do this, or that the agent needs the user's explicit consent first. Line 319 then says the protocol was "installed by sonar integrate at the user's request", so an agent may assume that consent already exists. Line 335 mentions "Per-edit hooks", which tells the agent that integration adds hooks.
The risk: an agent doing an ordinary repository task could choose that "optional" step on its own. It would then change the user's global agent configuration and install hooks that keep running after the task and in other checkouts, without the user asking for it.
Fix: say that CLI installation, authentication and sonar integrate are manual setup steps for the human developer, and that agents must not run them unless the user explicitly asks. Also remove the false "installed at the user's request" provenance.
Limit persistent user-level setup to the human, or to an explicit user request:
Developer setup (manual; agents must not run these steps unless the user explicitly asks): install the [SonarQube CLI](https://docs.sonarsource.com/sonarqube-cli/), run `sonar auth login --server https://next.sonarqube.com/sonarqube/`, and optionally configure user-level integration with `sonar integrate claude` or `sonar integrate codex`.
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
This comment has been minimized.
This comment has been minimized.
d57301d to
aff5c35
Compare
|
|
|
||
| # Before you reply: Vortex analysis | ||
|
|
||
| Install the [SonarQube CLI](https://docs.sonarsource.com/sonarqube-cli/), run `sonar auth login --server https://next.sonarqube.com/sonarqube/`, and optionally configure user-level integration with `sonar integrate claude` or `sonar integrate codex`. |
There was a problem hiding this comment.
💡 Quality: Protocol says sonar integrate installed it, but it's committed
Line 68 tells agents "These instructions were installed by sonar integrate at the user's request." That isn't true here. The block is committed to the repository's AGENTS.md, and line 61 calls sonar integrate an optional, user-level step that contributors may skip. An agent reading this file is told the user explicitly opted in when they may never have run the CLI, which misstates where the requirement comes from. Change the sentence to say the protocol is part of the repository's agent guide (for example, "This repository requires Vortex analysis…"), or leave the CLI-generated wording out of the committed copy.
Describe the actual source of the instruction:
This repository's agent guide requires Vortex analysis. It checks the final change set for issues before you reply.
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
CI failed: Two unrelated infrastructure failures were reported: the Sanity Test job hit Java heap exhaustion in Develocity resource collector threads, and the Ruling Update job failed to find actual_* artifacts after upstream ruling QA was cancelled. Both findings are marked related_to_pr=no, so neither is attributed to this PR, and the root causes beyond the immediate errors remain unestablished.OverviewTwo unrelated infrastructure failures were reported: the Sanity Test job hit Java heap exhaustion in Develocity resource collector threads, and the Ruling Update job failed to find actual_* artifacts after upstream ruling QA was cancelled. Both findings are marked related_to_pr=no, so neither is attributed to this PR, and the root causes beyond the immediate errors remain unestablished. FailuresSanity Test job failed with Java heap exhaustion in Develocity resource collector threads
Ruling Update and Notify failed after upstream ruling QA cancellation left no actual_* artifacts
Summary
Code Review 👍 Approved with suggestions 🟡 Medium risk 0 closed / 3 findingsAdding agent instructions to submit changed files to SonarQube for Vortex analysis could expose code if agents misidentify the intended scope. Documents the Vortex analysis protocol for coding agents in AGENTS.md and binds the checkout to the SonarJava project on Next. Consider using a server-neutral skip example instead of "SonarQube Cloud", since this checkout binds to a SonarQube Server instance. Clarify that CLI installation, authentication, and 💡 Quality: Skip example says SonarQube Cloud, but project binds to SonarQube Server📄 AGENTS.md:312 📄 AGENTS.md:343 📄 .sonar-config.json:5 Step 3 (line 343) gives "no SonarQube Cloud connection" as the example skip reason. This checkout is bound to a SonarQube Server instance ( Make the example match the configured server💡 Security: Agents may install user-level hooks without the user opting in📄 AGENTS.md:312 📄 AGENTS.md:319 📄 AGENTS.md:335 AGENTS.md is the instruction file coding agents read. Line 312 tells the reader to install the SonarQube CLI, run The risk: an agent doing an ordinary repository task could choose that "optional" step on its own. It would then change the user's global agent configuration and install hooks that keep running after the task and in other checkouts, without the user asking for it. Fix: say that CLI installation, authentication and Limit persistent user-level setup to the human, or to an explicit user request💡 Quality: Protocol says
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar




Jira: AP-1543