Back to skill

Security audit

jar冲突检测器

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent dependency-conflict scanner, but it automatically runs Maven or Gradle project build logic, including repository-provided Gradle wrappers, without clear isolation or informed opt-in.

Install only if you intend to run dependency analysis on projects you trust, or if you can run it in a disposable sandbox/container with no secrets, limited filesystem access, and controlled network access. Avoid pointing it at untrusted Maven or Gradle repositories unless live build execution is disabled or isolated, and treat generated HTML reports as untrusted content.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/detect_conflicts.py:198
Finding

Untrusted Maven and Gradle Projects Can Execute Arbitrary Build Logic During Scanning

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/detect_conflicts.py:532
Finding

Unescaped Project Metadata Allows Stored HTML Injection in Generated Reports

Content
View full analysis
{c.severity} {c.artifact_key} {type_label} {', '.join(c.versions[:4])} {', '.join(c.modules[:3])} {c.suggestion} """ ``` ```python

Spring Boot microservice project · {result.project_dir} · {result.scan_time}

``` ### Technical Analysis The HTML report generator interpolates dynamic values directly into HTML without context-appropriate escaping. Relevant values include: - `c.artifact_key` - Dependency versions in `c.versions` - Module names in `c.modules` - `c.suggestion` - `result.project_dir` Artifact identifiers, versions, and module names may originate from project-controlled POM files or build-tool output. A malicious repository can therefore place HTML markup into values that eventually reach a generated conflict row. The attacker can ensure that such data is included in the report by defining multiple versions of an artifact or constructing metadata that triggers a known incompatibility rule. Because the values are inserted as raw markup, injected tags and event handlers can alter the report or execute script in environments that permit active content in local HTML files. The report also lacks a Content Security Policy that could reduce the effect of successful injection. ### Attack Path 1. An attacker creates a project containing crafted dependency or module metadata with an HTML payload. 2. The attacker defines conflicting versions or an incompatible dependency combination so the ...[truncated 1181 chars]
Remediation
View remediation
``` 5. Avoid adding inline event handlers or dynamically generated script content to the report. 6. Add regression tests containing characters and payloads such as `<`, `>`, `&`, `"`, `'`, ``, and `` in dependency and module metadata. 7. Treat build-tool output and repository metadata as untrusted even when the project is local. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (11)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/conflict_patterns.md (reported line 15)May include surrounding context.

解决方案:

xml
<!-- 在父 POM 的 dependencyManagement 中统一版本 -->
<dependencyManagement>
  <dependencies>
    <dependency>

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The skill explicitly runs project-provided Gradle tooling for analysis, which lets a malicious repository execute arbitrary build logic during what should be a read-only scan. In this skill context, the danger is elevated because users will point it at untrusted source trees and expect dependency inspection, not code execution.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs running a local Python script and dependency-inspection shell commands, and it also generates report files, but it does not declare any explicit tool scope such as allowed-tools or permissions. That omission weakens least-privilege boundaries and can lead to unintended shell execution or file creation in the user's environment without clear policy constraints.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger description includes broad phrases like any request involving Maven/Gradle dependency resolution issues in a Java/Spring Boot project, which can cause the skill to activate in situations where the user did not intend local project scanning or shell-based analysis. Over-broad triggering increases the chance of unnecessary command execution and file generation, especially when combined with undeclared tool scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file contains extensive user-facing natural language in Chinese, including incompatibility descriptions, suggestions, CLI help, console output, and HTML metadata, while providing no option to select another language. That can violate the policy against forcing a specific language or locale without user opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Running Maven for dependency resolution introduces executable build behavior and side effects that are broader than parsing manifests. Although less risky than invoking a project-local Gradle wrapper, it still processes untrusted project configuration and can perform network access or trigger unsafe plugin-related behavior in an analyst environment.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
93% confidence
Finding

This subprocess invocation executes Maven against an untrusted repository. While the command is fixed and not shell-injected, Maven dependency resolution can trigger plugin behavior, read project configuration, and perform network/file access, so analyzing a hostile project can cause unintended code execution or other side effects beyond passive inspection.

Content

Scanner excerpt · scripts/detect_conflicts.py (reported line 198)May include surrounding context.

python
"""Run mvn dependency:tree and capture output."""
    mvn_cmd = "mvn"
    try:
        result = subprocess.run(
            [mvn_cmd, "dependency:tree", "-DoutputType=text", "--batch-mode", "-q"],
            cwd=project_dir,
            capture_output=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
99% confidence
Finding

This subprocess call may execute ./gradlew from the target project, which is code supplied by the scanned repository. Running a project-provided wrapper is effectively arbitrary code execution in the analyst's environment and exceeds the narrow purpose of dependency conflict detection.

Content

Scanner excerpt · scripts/detect_conflicts.py (reported line 253)May include surrounding context.

python
gradle_cmd = "gradle"

    try:
        result = subprocess.run(
            [str(gradle_path) if gradle_path.exists() else gradle_cmd,
             "dependencies", "--configuration", "compileClasspath"],
            cwd=project_dir,

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The skill is presented primarily in Chinese for headings and user-facing guidance, while some operational text is in English, but it never states that the response language should follow user preference. This can violate language-choice policy if the skill implicitly defaults to a language without opt-in or explicit flexibility.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill directs the agent to run local inspection commands and create report files but does not explicitly warn the user that shell commands will be executed against their project and that artifacts will be written to disk. This can surprise users, create unwanted files, and expose project metadata through generated reports if execution occurs without informed consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file uses Chinese from the title onward and does not indicate that the language choice is optional or region-specific. Under the natural-language policy rule, forcing a specific language without user opt-in can be a locale policy violation.

Content

No source excerpt is available for this finding.