Back to skill

Security audit

java&vue代码生成

Security checks for vulnerabilities and agentic risk

Overview

This skill is a normal project generator, but its generated deployment templates can create insecure database setups that users should review before running.

Review all generated code and deployment files before running them. Replace default database usernames and passwords, avoid using root/postgres for the app, remove or restrict database port publishing, and do not build or deploy projects generated from untrusted specifications in an environment with secrets.

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
assets/templates/docker-compose-mysql.txt:8
Finding

Generated deployment configurations use predictable privileged database credentials and publicly exposed database ports

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate-backend.py:217
Finding

Unvalidated specification values are interpolated into generated Java, TypeScript, Vue, URL, and Maven syntax

Content
View full analysis
com.example {project_name} 1.0.0 jar ``` `scripts/generate-backend.py:217-246`: ```python def generate_entity(entity_spec, tech_stack): """Generate JPA Entity class with optional audit/soft delete""" class_name = entity_spec['name'] fields = entity_spec.get('fields', []) features = tech_stack.get('features', []) use_audit = 'audit' in features use_soft_delete = 'softDelete' in features imports = [ 'import jakarta.persistence.*;', 'import java.time.LocalDateTime;' ] # ... for field in fields: field_type = field['type'] field_name = field['name'] nullable = 'nullable=false' if field.get('required') else 'nullable=true' if field_type == 'String': field_lines.append(f' @Column({nullable})') field_lines.append(f' private String {field_name};') ``` `scripts/generate-backend.py:303-322`: ```python template = f'''package com.example.entity; {chr(10).join(sorted(set(imports)))} @Entity @Table(name = "{class_name.lower()}s") {annotations_str}public class {class_name} {{ {chr(10).join(field_lines)} // Getters and Setters public Long getId() {{ return id; }} public void setId(Long id) {{ this.id = id; }} ''' # Add getters/setters for each field getter_setters = [] for field in fields: field_type = field['type'] field_name = field['name'] capitalized = field_name[0].upper() + field_name[1:] getter_setters.append(f' public {field_type} get{capitalized}() {{ return {field_ ...[truncated 4457 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (15)

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 · SKILL.md (reported line 481)May include surrounding context.

Maven (pom.txt → rename to pom.xml) - Java 17 vs 21

xml
<!-- Java 17 -->
<properties>
    <java.version>17</java.version>
    <maven.compiler.source>17</maven.compiler.source>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 531)May include surrounding context.

md
- `scripts/generate-frontend.py` - Generate Vue frontend with UI library selection

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file contains multiple mandatory interaction instructions in Chinese, such as the required mode notice, while the overall document is otherwise in English. Because the skill does not offer users a language/locale choice or justify a Chinese-only constraint, it risks violating language/locale policy by effectively forcing one language for key workflow steps.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The requirement-description section defines acceptable inputs and examples primarily in Chinese, including mandatory user behavior, but the file does not state that the skill is region-specific or let users choose their preferred language. This can exclude or mislead users who expect the skill to operate in English based on the surrounding documentation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill's required tech-stack selection flow is shown entirely in Chinese for the actual prompts users must follow. Since this is a central interaction path and there is no opt-in or locale justification, the file embeds a natural-language policy violation related to forced language use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This JSON manifest contains user-facing descriptions, option names, notes, and selection instructions in Chinese only. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring states that it generates Java entity, repository, service, and controller artifacts. In this file, the implemented functions generate Maven configuration, application.yml, and an entity class, with no code paths generating repository, service, or controller classes. This is an active documentation-to-code mismatch, not just an omission in comments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The generated JDBC URL includes serverTimezone=Asia/Shanghai, which imposes a specific locale-related setting in produced application configuration. This is a natural-language/policy-style locale constraint that is neither optional nor documented as region-specific, so it may violate language/locale neutrality expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The datasource URL sets serverTimezone=Asia/Shanghai, which imposes a specific locale-related behavior in natural-language/config semantics for all consumers of the template. The policy allows locale constraints only when they are justified or user-selectable, and this file provides neither choice nor documentation.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This is a plain-text template file, so vague-trigger review applies. The template exposes generic placeholders like {{projectName}} and provides no surrounding natural-language description of when this template should be used or excluded, which makes invocation scope ambiguous if this file is used as a skill-facing artifact.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The natural-language/config value forces SPRING_PROFILES_ACTIVE=prod with no indication that the user can opt into another environment or that the production-only setting is required. This can violate language/locale-style policy constraints around forcing a specific operational mode without user choice or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file presents all example user inputs in Chinese and does not indicate that other languages are supported or that the skill is intentionally limited to a Chinese-speaking context. That can imply a fixed language expectation without user opt-in, which matches the locale-policy concern for natural-language content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file contains user-facing schema documentation where multiple field/type descriptions and feature labels are presented in Chinese alongside English identifiers. Because the document does not state that it is intended for a Chinese-speaking audience or offer an alternative language, it may violate a language/locale policy requiring user choice or explicit justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The docstring suggests a broader test harness for the generator using a sample tech stack. However, main() only constructs a sample tech_stack and prints the result of generate_pom_xml, without testing application.yml or entity generation. This contradicts the stated intent of the function as a representative test entry point.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

In the Naive UI variant, the inline comments say Open create dialog and Open edit dialog, but both handleCreate and handleEdit are empty no-op functions. This is an active contradiction between the code comments and actual behavior, not merely missing detail.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.