Back to skill

Security audit

sonarqube-autofix

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly fits a SonarQube autofix workflow, but it needs review because it can make broad repository changes and remove scanner configuration outside the selected issue scope.

Install only if you are comfortable with an agent that may modify code, run local build/test tools, create GitHub issues, and change repository configuration. Before use, require explicit confirmation before publishing SonarQube issue details to GitHub, before deleting scanner files or Maven scanner configuration, and before running unpinned npx-based validation scripts.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:424
Finding

Unapproved Removal of Repository Security-Analysis Configuration

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 424
Vulnerability Type: Destructive modification of security tooling outside the authorized issue scope
Risk Level: Medium

Code Snippet:

markdown
- ✅ Remove SonarQube scanner files that may be present, such as `sonar-project.properties`, `sonar-scanner.properties`, etc. Also remove other scanners, such as the `SonarScanner for Maven` usually present in the POM.xml, since our pipeline is autonomous and does not depend on these files to work. (For now, keep only SonarQube-related configurations in `.csproj` files).

Technical Analysis

The skill instructs the implementing agent to remove existing SonarQube configuration files and scanner integration from Maven configuration. This is a repository-wide modification that is not conditioned on a downloaded SonarQube issue explicitly requiring the change.

The instruction has no mandatory confirmation, dry-run, exact-target allowlist, or requirement to present a proposed diff. It also conflicts with the scope restriction at SKILL.md:628, which directs the agent to fix exclusively the issues listed in sonarqube_issues.json.

The trust boundary is crossed when a user authorizes analysis and remediation of specified SonarQube findings, but the bundled skill instruction expands that authorization into deleting unrelated security-analysis configuration. This is a reachable high-risk behavior, although the reviewed evidence does not establish malicious intent.

Attack Path

  1. A user invokes the skill to analyze and remediate selected SonarQube issues.
  2. The skill generates approved specifications and hands them to the implementation workflow.
  3. During implementation or validation, the agent follows the unconditional cleanup instruction at line 424.
  4. The agent deletes sonar-project.properties, sonar-scanner.properties, or scanner configuration from pom.xml, even when no selected issue author ...[truncated 733 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the unconditional instruction to delete scanner files and Maven scanner configuration.
  • Preserve existing security-analysis configuration by default.
  • Permit scanner configuration changes only when a specific issue in sonarqube_issues.json explicitly requires them.
  • Before any deletion, enumerate the exact files and configuration sections, present the proposed diff, and obtain explicit user confirmation.
  • Add a dry-run mode and create a recoverable backup or rely on a verified clean version-control state before destructive changes.
  • Restrict modifications to an allowlist of issue-referenced paths and reject unrelated cleanup actions.
  • Reconcile the workflow with the scope restriction at SKILL.md:628 so implementation agents cannot interpret general cleanup guidance as authorization to modify unrelated files.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (40)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Scala build/test/coverage execution similarly broadens the skill beyond passive issue handling. Hidden invocation of sbt and related tooling can execute repository-controlled build logic, which is more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest frames the skill as analysis/spec/GitHub issue generation, but the workflow goes further into implementing fixes, validating code, and potentially modifying the repository. This scope inflation is dangerous because reviewers and automated policy may approve the skill under a much narrower understanding of its effects.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill says not to implement code in this skill, then later requires all issues to be fixed, tested, and validated. Contradictory instructions create unsafe operator assumptions and increase the chance that an agent performs repository-changing actions despite an earlier apparent limitation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares no explicit tool permissions or allowed-tools scope while extensively directing shell execution, filesystem modification, network access, and build tooling invocation. In an agent environment, that broad implicit capability increases the blast radius of prompt-influenced actions and makes it harder to constrain unsafe command execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation guidance states the skill should be used when the user asks or mentions it in English or Portuguese. This imposes a language constraint in natural-language instructions without documenting an opt-in or broader language support, which matches the locale-policy concern for forced language requirements.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The untrusted-input guidance says downloaded issue data should not be sent to other endpoints without explicit approval, but the default workflow later opens GitHub issues from that data. That can cause unreviewed exfiltration of externally sourced content into another service, including sensitive paths, messages, or snippets.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.