Back to skill

Security audit

spring-to-solon-skill

Security checks for vulnerabilities and agentic risk

Overview

This migration guide does not appear to run hidden code, but several copy-ready examples teach unsafe authentication, file handling, and secret practices.

Review this skill before relying on its examples in real code. Treat the migration mappings as reference material, but replace the file upload/download, login/session, authorization filter, and configuration examples with secure implementations using canonical path checks, real token validation, password hashing or an identity provider, and environment-backed 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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
references/web_advanced_migration.md:48
Finding

Path Traversal in File Upload and Download Examples

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/config_system_migration.md:76
Finding

Hardcoded Database Passwords and JWT Signing Secrets in Configuration Examples

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/web_advanced_migration.md:365
Finding

Hardcoded Administrative Credentials in Session Login Example

Content
View full analysis
login(@Param String username, @Param String password, Context ctx) { if ("admin".equals(username) && "123456".equals(password)) { ctx.sessionSet("userId", 1001L); ctx.sessionSet("username", username); return Map.of("code", 200, "message", "登录成功"); } return Map.of("code", 401, "message", "用户名或密码错误"); } @Post @Mapping("/logout") public Map logout(Context ctx) { ctx.sessionClear(); return Map.of("code", 200, "message", "已退出"); } } ``` The corresponding Spring example contains the same fixed credential comparison: ```java if ("admin".equals(username) && "123456".equals(password)) { session.setAttribute("userId", 1001L); session.setAttribute("username", username); } ``` ### Technical Analysis The login handler authenticates every request against a fixed administrative username and plaintext password embedded in source code. It does not use an identity store, password hashing, credential rotation, account state validation, or multi-factor authentication. Because the credentials are visible in the guide, any application that adopts the example unchanged has a publicly known administrative credential. Source-code modification is required to rotate it, and every deployment using the example shares the same value. ### Attack Path 1. A developer copies the migration example into an application. 2. The `/api/session/login` endpoint becomes externally reachable. 3. An attacker submits `username=admin` and `password=123456`. 4. The fixed equality checks suc ...[truncated 636 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/web_filter_interceptor_migration.md:48
Finding

Authentication Bypass Through Authorization Header Presence Check

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (30)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 注解替换对照表 / 完整的 Spring→Solon 注解映射 | `references/annotation_mapping.md` | `@Autowired`, `@Inject`, `@RequestMapping`, `@Mapping`, `@Service`, `@Component`, `@Val

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 注解替换对照表 / 完整的 Spring→Solon 注解映射 | `references/annotation_mapping.md` | `@Autowired`, `@Inject`, `@RequestMapping`, `@Mapping`, `@Service`, `@Component`, `@Val

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 注解替换对照表 / 完整的 Spring→Solon 注解映射 | `references/annotation_mapping.md` | `@Autowired`, `@Inject`, `@RequestMapping`, `@Mapping`, `@Service`, `@Component`, `@Val

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| IoC 容器 / DI / 组件注册 / 作用域 / 生命周期 / AOP / 事件 / 包扫描 | `references/ioc_aop_migration.md` | `@Inject`, `@Configuration`, `@Bean`, `LifecycleBean`, `@Init`, `@Destr

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 配置文件 / 属性注入 / 配置类 / Bean 定义 / 条件装配 | `references/config_system_migration.md` | `app.yml`, `@Inject("${")`, `@Configuration`, `@Bean`, `@Condition`, `solon.con

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 配置文件 / 属性注入 / 配置类 / Bean 定义 / 条件装配 | `references/config_system_migration.md` | `app.yml`, `@Inject("${")`, `@Configuration`, `@Bean`, `@Condition`, `solon.con

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 事务 / 缓存 / Redis / 陷阱清单 | `references/transaction_cache_migration.md` | `@Transaction`, `@Cache`, `Redis`, `@CacheRemove`, `CacheService` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 事务 / 缓存 / Redis / 陷阱清单 | `references/transaction_cache_migration.md` | `@Transaction`, `@Cache`, `Redis`, `@CacheRemove`, `CacheService` |

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/datasource_orm_migration.md (reported line 100)May include surrounding context.

2.1 依赖替换

xml
<!-- Spring Before -->
<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>

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/datasource_orm_migration.md (reported line 216)May include surrounding context.

md
<version>3.5.5</version>
</dependency>

<!-- Solon After:自 3.5.9 起 baomidou 官方发布 Solon 适配 -->
<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus-solon-plugin</artifactId>

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/datasource_orm_migration.md (reported line 216)May include surrounding context.

md
<version>3.5.5</version>
</dependency>

<!-- Solon After:自 3.5.9 起 baomidou 官方发布 Solon 适配 -->
<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus-solon-plugin</artifactId>

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Line L025 states that when the user communicates in Chinese, all responses and code comments must be in Chinese. This imposes a language policy automatically based on user input rather than offering a choice or obtaining explicit opt-in, which matches the locale/language policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file title and all instructional content are presented in Chinese, and there is no indication that users may choose another language or that the document is intentionally limited to a China-specific or Chinese-speaking context. Under the policy, a skill or reference that effectively mandates a specific language without opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document includes realistic-looking plaintext secrets and credentials in configuration examples, including a database password and a JWT secret, without clearly labeling them as placeholders or warning against real-world reuse. In a migration guide, readers may copy these examples directly into working applications, normalizing insecure secret handling and potentially causing accidental credential exposure if committed to source control.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The development environment example repeats hardcoded usernames and passwords in plaintext without any cautionary note. Even if intended as sample data, this can encourage unsafe copying patterns and teaches readers to store secrets directly in environment-specific YAML files, which are commonly checked into repositories.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The Solon-side migration examples again show plaintext database passwords and a JWT secret, which is especially risky because they appear in the 'after' target-state configuration that readers are expected to adopt. This reinforces insecure migration outcomes by presenting hardcoded secrets as an acceptable Solon configuration pattern.

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 is entirely written in Chinese and presents the skill/reference content in a single language without any user opt-in or alternate locale option. Under the policy rule for natural-language violations, forcing a specific language is reportable unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file is written entirely in Chinese and does not indicate that language selection is optional or user-configurable. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all instructional content in Chinese and does not indicate that the user can choose another language or that the skill is intentionally restricted to a Chinese-speaking audience. Under the natural-language policy rule, forcing a specific language without user opt-in is a locale/language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The upload and download examples concatenate user-controlled filenames directly into filesystem paths, which can enable path traversal (../), overwrite of arbitrary files, or unauthorized file read access if copied into production code. In a migration guide, this is more dangerous because readers are likely to reuse the sample verbatim as framework-approved practice.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

At L434 and again at L464, the file asserts that one @Mapping can only map one path pattern and that multi-path mappings must be split into multiple methods. This is a concrete behavioral claim in migration guidance; if untrue, it creates a direct contradiction between documentation intent and actual code developers would write.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Lines L437 and L457 state that Solon has no @ControllerAdvice and that global exception handling must be implemented with Filter + try-catch. This is intent-level guidance embedded in documentation, and if inaccurate it would directly mislead developers about framework capabilities and migration strategy.

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 presents the skill documentation entirely in Chinese and does not offer any language choice, translation note, or justification for a Chinese-only locale. The policy explicitly flags language or locale constraints when they are imposed without user opt-in or a documented region-specific need.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file title and all instructional content are presented in Chinese, and there is no indication that users may choose another language or that the locale restriction is required for a region-specific purpose. Under the policy rules, natural-language content that implicitly forces a specific language without opt-in can be a locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents the entire skill reference in Chinese, beginning with a Chinese-only title and continuing throughout without offering a language option or stating that the content is intentionally region-specific. The policy explicitly flags language or locale constraints when they are imposed without user opt-in or documented justification.

Content

No source excerpt is available for this finding.