Skip to content

feat(agents): Copilot scanner agent using the Nexus-bootstrap wrapper#12

Open
aksOps wants to merge 1 commit into
mainfrom
feat/agents-copilot-nexus-scanner
Open

feat(agents): Copilot scanner agent using the Nexus-bootstrap wrapper#12
aksOps wants to merge 1 commit into
mainfrom
feat/agents-copilot-nexus-scanner

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 26, 2026

Summary

A single-file addition: agents/sonar-scanner-copilot-nexus.md — a
GitHub-Copilot-CLI sibling of the existing sonar-scanner-copilot
agent. Where the existing agent invokes the sonar-predictor skill,
this one shells out to the wrapper added in #10
(scripts/sonar-cli.sh / scripts/sonar-cli.ps1) so it works in
corporate / air-gapped setups where the dist and Java 21 must come
from a Nexus mirror.

Contract

  • Scan-only; never edits code.
  • Reads SONAR_NEXUS_BASE from env; fails fast with an actionable
    message if unset.
  • Writes the JSON report to .sonar-predictor/scan-<id>.json with a
    unique suffix so parallel scanner instances don't stomp each other.
  • Returns exactly two things to the orchestrator: the report path
    and a one-line headline derived from a single jq pass.
    Drill-down is the orchestrator's job — the agent never dumps raw
    JSON into upstream context.
  • Runs on GPT-5-mini to keep the mechanical-scan path cheap.

Differences vs the existing sonar-scanner-copilot agent

sonar-scanner-copilot (existing) sonar-scanner-copilot-nexus (new)
Invocation sonar-predictor skill scripts/sonar-cli.sh / .ps1
Tools bash, view, glob, skill bash, view, glob
Pre-flight (none) SONAR_NEXUS_BASE required
Report path Single .sonar-predictor/scan.json Unique scan-<id>.json for fan-out safety
Primary deliverable Concise summary from the model Path + one-line headline; orchestrator drills in

Test plan

  • Both jq snippets verified against a real scan.json:
    • Headline: totals: BLOCKER=0 CRITICAL=1 MAJOR=12 MINOR=14 INFO=3 files=20 coverage=85.14%
    • Top-8 drill-down sorts BLOCKER→INFO and formats correctly.
  • Loaded in a Copilot session against this repo end-to-end (your side).

…pper

A GitHub-Copilot-CLI sibling of the existing sonar-scanner-copilot agent.
Where the existing agent invokes the sonar-predictor skill, this one
shells out to the wrapper added in #10 (scripts/sonar-cli.sh /
scripts/sonar-cli.ps1) so it works in corporate / air-gapped setups
where the dist + Java 21 must come from a Nexus mirror.

Contract:

  - Scan-only; never edits code.
  - Reads SONAR_NEXUS_BASE from env; fails fast with an actionable
    message if unset (the wrapper would otherwise fail later with a
    less obvious error).
  - Writes the JSON report to .sonar-predictor/scan-<id>.json with a
    unique suffix so parallel scanner instances do not stomp each
    other's reports.
  - Returns exactly two things to the orchestrator: the report path and
    a one-line headline derived from a single jq pass. Drill-down is
    the orchestrator's job — the agent never dumps raw JSON into
    upstream context.
  - Runs on GPT-5-mini to keep the mechanical-scan path cheap.

The bundled jq snippets were verified against a real scan.json against
this repo (1 CRITICAL, 12 MAJOR, 14 MINOR, 3 INFO, 20 files, 85.14%
coverage) — the headline and top-8 drill-down both render correctly.
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant