Back to skill

Security audit

Xbatis AI Skill

Security checks for vulnerabilities and agentic risk

Overview

This xbatis coding skill is not clearly malicious, but it should be reviewed because it tells the agent to download live external repositories and includes weak database credentials in setup examples.

Install only if you are comfortable with the agent using live xbatis GitHub or Gitee sources during xbatis tasks. Require confirmation before any repository download, prefer pinned releases or user-provided local source snapshots, and replace all sample database credentials with environment variables or a dedicated least-privileged local account before generating project configuration.

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
references/environment-setup.md:88
Finding

Weak Hardcoded Database Credentials in Generated Configuration

Content
View full analysis

Vulnerability Details

File Location: references/environment-setup.md:88-90
Vulnerability Type: Hardcoded weak database credentials
Risk Level: Medium

Vulnerable Code

yaml
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/demo
    username: root
    password: 123456

The same insecure credential pattern also appears at references/environment-setup.md:196-199:

yaml
ds:
  schema: demo
  jdbcUrl: jdbc:mysql://localhost:3306/demo?useUnicode=true&characterEncoding=utf8
  driverClassName: com.mysql.cj.jdbc.Driver
  username: root
  password: 123456

Technical Analysis

The environment setup reference presents the privileged MySQL root account and the weak literal password 123456 as preferred configuration examples. The primary skill directs agents handling environment setup to read this reference, creating a realistic chance that these values will be copied into generated application configuration without replacement.

This is not evidence of a leaked production secret. However, it is an insecure code-generation practice because it normalizes:

  • A predictable password.
  • Plaintext credentials in configuration files.
  • Use of a highly privileged database account.
  • Storage of credentials in files likely to enter version control or deployment artifacts.

The vulnerability becomes exploitable when generated configuration is retained in a real environment and the database is reachable by an attacker.

Attack Path

  1. An agent loads the skill while creating or integrating an xbatis application.
  2. The agent follows the environment setup reference and generates the documented datasource configuration.
  3. A developer retains root / 123456, potentially committing it to source control or deploying it unchanged.
  4. The database becomes reachable through the application network, an exposed database port, a compromised internal host, or another network foothold.
  5. An attacker authenticates to MySQL using the p ...[truncated 666 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace concrete credentials with mandatory environment substitutions:
yaml
spring:
  datasource:
    url: ${DB_URL}
    username: ${DB_USERNAME}
    password: ${DB_PASSWORD}
yaml
ds:
  schema: ${DB_SCHEMA}
  jdbcUrl: ${DB_URL}
  driverClassName: com.mysql.cj.jdbc.Driver
  username: ${DB_USERNAME}
  password: ${DB_PASSWORD}
  1. Explicitly instruct generated projects to use a dedicated, least-privileged application account rather than root.
  2. Require startup to fail when required secret variables are absent; do not provide insecure fallback values.
  3. Store deployed credentials in an approved secret manager or container-orchestration secret facility.
  4. Add secret scanning and configuration linting to CI so literal passwords and privileged database usernames are rejected.
  5. Clarify that any local-development example must use placeholders and must never be committed or reused in test, staging, or production environments.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Hidden Instructions

High
Category
Prompt Injection
Confidence
80% confidence
Finding

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

Content

Scanner excerpt · README.md (reported line 1)May include surrounding context.

md
[//]: # ([![skills.sh](https://skills.sh/b/anthropics/skills)](https://gitee.com/xbatis/xbatis-skills))

# Xbatis Skills

Hidden Instructions

High
Category
Prompt Injection
Confidence
80% confidence
Finding

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

Content

Scanner excerpt · README.md (reported line 1)May include surrounding context.

md
[//]: # ([![skills.sh](https://skills.sh/b/anthropics/skills)](https://gitee.com/xbatis/xbatis-skills))

# Xbatis Skills

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 执行代码审查、PR Review、实现偏差排查时,读取 `references/review-checklist.md`

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README explicitly instructs the agent to first download source code from external GitHub/Gitee repositories before performing its task. That expands the skill from local ORM guidance into network-capable behavior, creating supply-chain and prompt-injection risk because repository contents are untrusted and could influence later code generation or review decisions. In this context, the instruction is especially dangerous because it is mandatory ('第一件事') and repeated as a prerequisite for normal operation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes the skill as focused on xbatis code implementation/review, but the body requires acquiring and mirroring external repositories locally. This mismatch obscures a materially broader capability than advertised, reducing operator awareness and making unsafe network/file actions more likely to occur without informed consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill mandates downloading source code from external GitHub/Gitee repositories to a local directory before performing normal ORM-related work. This expands the skill from code guidance into unsolicited network access and filesystem modification, creating supply-chain and data-exfiltration risk if an agent follows the instruction automatically or fetches tampered content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to download external source code before use but provides no warning, confirmation step, or safety boundary around network access and writing to disk. In an agent environment, this can trigger unauthorized outbound requests, unreviewed code ingestion, and persistence of untrusted content, which is especially risky as a prerequisite rather than an optional, user-approved action.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language description is written as 面向 Agent 的专业 xbatis 编码与审查规则, indicating a Chinese-language skill presentation. There is no visible indication in this file that users may choose their preferred language or that the locale restriction is intentionally documented for a region-specific use case.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest enables implicit invocation with no trigger constraints, scoping rules, or exclusion conditions, which allows the skill to be auto-selected in contexts the user did not explicitly request. Because the default prompt contains extensive prescriptive coding instructions, unintended activation could steer outputs, override user preferences, or inject persistence-layer guidance into unrelated tasks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown skill is written entirely in Chinese and provides no indication that language selection is optional or that the skill is intentionally restricted to Chinese-speaking users. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The operational instructions throughout the file are presented only in Chinese, which effectively forces a specific language for users consuming this skill. Under the language/locale policy, this is a violation unless the file offers user opt-in or clearly documents a justified locale-specific constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document includes example Spring datasource settings with plaintext credentials (root / 123456) and does not warn readers not to reuse them or to source secrets from environment variables or a secret manager. In an environment-setup skill, users may copy these snippets directly into real projects, which can normalize insecure secret handling and lead to accidental credential exposure in source control or deployed configs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Solon solon.yml example exposes a full plaintext database configuration including username and password without any safety guidance. Because this file is specifically instructing users how to bootstrap an application, the likelihood of insecure copy-paste into real repositories is high, increasing the chance of secret leakage and poor credential hygiene.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s instructional content is entirely in Chinese, including all agent rules and usage guidance, with no indication that the skill supports other languages or that Chinese is a required locale. This creates a natural-language policy concern because it effectively imposes a specific language on users without opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file presents its operational guidance entirely in Chinese, which imposes a specific language on users without any opt-in or stated justification. The policy requires either a user language choice or a clearly documented reason for the locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document is written entirely in Chinese and provides no indication that other languages are supported or that the user may choose their preferred language. This creates a natural-language policy concern because it effectively imposes a locale on all users without documented opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains user-facing natural-language instructions exclusively in Chinese, beginning at L003 and continuing throughout the checklist. 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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. This markdown guidance forces a specific language for all users of the skill reference, and the file does not provide an opt-in, alternative language, or a stated region-specific justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.