Back to skill

Security audit

senior-java

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Java/Spring helper, but some generators can write outside the intended output area and create insecure production-style security defaults.

Review the scripts before using them on important repositories. Run generators only in a disposable or clearly selected output directory, avoid untrusted project/package names, and replace generated production security settings before deployment, especially JWT secrets, database credentials, and actuator access rules.

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
scripts/spring_project_scaffolder.py:62
Finding

Project Name Path Traversal Allows Writes Outside the Selected Output Directory

Content
View full analysis
Dict[str, Any]: """Generate the complete project structure""" logger.debug(f"Scaffolding {self.config.project_type} Spring Boot project: {self.config.name}") if self.verbose: print(f"Scaffolding Spring Boot {self.config.project_type}: {self.config.name}") print(f"Java Version: {self.config.java_version}") print(f"Database: {self.config.database}") print(f"Security: {self.config.security or 'None'}") print(f"Output: {self.output_dir}\n") # Create project directory self.output_dir.mkdir(parents=True, exist_ok=True) ``` The command-line argument is described as kebab-case but is not validated: ```python parser.add_argument("name", help="Project name (kebab-case)") ``` Generated files are subsequently written without containment or overwrite checks: ```python def _write_file(self, path: str, content: str): """Write content to a file""" file_path = self.output_dir / path file_path.parent.mkdir(parents=True, exist_ok=True) file_path.write_text(content) self.files_created.append(path) logger.debug(f"Created file: {path}") ``` ### Technical Analysis `config.name` is controlled by the command-line caller and is joined directly to the selected output directory. The code does not reject absolute paths, `..` co ...[truncated 1961 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/entity_generator.py:132
Finding

Unvalidated Java Package Values Can Escape Generated Source Directories

Content
View full analysis
/...` to normalize outside the expected Java package tree and potentially outside the selected generation root. The resulting pack ...[truncated 1628 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/spring_project_scaffolder.py:290
Finding

Production Templates Fall Back to Predictable JWT and Database Credentials

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/spring_project_scaffolder.py:580
Finding

Generated JWT Security Configuration Permits Unauthenticated Access to All Actuator Endpoints

Content
View full analysis
csrf.disable()) .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .authorizeHttpRequests(auth -> auth .requestMatchers("/api/auth/**").permitAll() .requestMatchers("/api-docs/**", "/swagger-ui/**", "/swagger-ui.html").permitAll() .requestMatchers("/actuator/**").permitAll() .anyRequest().authenticated() ) .addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class); return http.build(); } ``` ### Technical Analysis The authorization rule operates on the entire `/actuator/**` namespace rather than a minimal set of health-check paths. It therefore permits anonymous access to all currently enabled Actuator endpoints and automatically permits any sensitive endpoint enabled in the future. In the generated development configuration, this includes `health`, `info`, `metrics`, and `prometheus`. The `health.show-details: always` setting can reveal component-level operational details. Metrics and Prometheus output may reveal internal class names, endpoint behavior, process characteristics, database pool information, request patterns, or other deployment metadata. The configuration creates a latent escalation risk: if operators later enable end ...[truncated 1461 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (40)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill claims comprehensive Java/Spring development assistance, yet part of the behavior described is a standalone Python performance-analysis/reporting workflow with filesystem scanning and output generation. That discrepancy reduces transparency about the true operational scope and can cause users to invoke code-analysis or profiling actions they did not reasonably expect from the declared identity of the skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill claims comprehensive Java/Spring development assistance, yet part of the behavior described is a standalone Python performance-analysis/reporting workflow with filesystem scanning and output generation. That discrepancy reduces transparency about the true operational scope and can cause users to invoke code-analysis or profiling actions they did not reasonably expect from the declared identity of the skill.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
input: "python scripts/entity_generator.py User --fields 'id:Long,email:String,name:String,createdAt:LocalDateTime'"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Spring Boot patterns: `references/spring-boot-best-practices.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Spring Boot patterns: `references/spring-boot-best-practices.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Spring Boot patterns: `references/spring-boot-best-practices.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Spring Boot patterns: `references/spring-boot-best-practices.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Spring Boot patterns: `references/spring-boot-best-practices.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Spring Boot patterns: `references/spring-boot-best-practices.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Spring Boot patterns: `references/spring-boot-best-practices.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Security reference: `references/spring-security-reference.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Security reference: `references/spring-security-reference.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Security reference: `references/spring-security-reference.md`

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/spring-security-reference.md (reported line 461)May include surrounding context.

md
- [ ] Use HTTPS in production
- [ ] Store passwords with bcrypt (strength 12+)
- [ ] Implement rate limiting for auth endpoints
- [ ] Use short-lived access tokens (15-60 min)
- [ ] Implement token refresh mechanism
- [ ] Validate and sanitize all input
- [ ] Use CSRF protection for browser clients

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation phrase 'Hey Claude—I just added the "senior-java" skill. Can you help me with [describe your task]?' is extremely generic and closely resembles ordinary user conversation. This can cause accidental or ambiguous skill activation, making it easier for unrelated prompts to invoke the skill unintentionally or for prompt-routing logic to misapply the skill in contexts the user did not clearly intend.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises multiple scripts with clear shell, filesystem, and likely network-facing capabilities, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization ambiguity where an orchestrator or user may trust the documentation without understanding the full execution surface, increasing the risk of unintended file modification, command execution, or outbound access.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.