Back to skill

Security audit

Spring Boot Production Engineering

Security checks for vulnerabilities and agentic risk

Overview

This is a Spring Boot guidance skill with no executable payload, but users should review its example templates before copying them into production.

Install only if you want Spring Boot production-engineering guidance. Treat its snippets as starting points: remove database credential defaults, avoid logging personal data such as full email addresses, and explicitly invoke the skill for Spring Boot work if your environment auto-routes broad commands.

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

Warning
Location
SKILL.md:124
Finding
Predictable Database Credentials in a Production Configuration Template<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 124–126 **Vulnerability Type**: Insecure default credentials **Risk Level**: Medium ### Vulnerable Code ```yaml url: ${DATABASE_URL:jdbc:postgresql://localhost:5432/mydb} username: ${DATABASE_USERNAME:postgres} password: ${DATABASE_PASSWORD:postgres} ``` ### Technical Analysis The configuration is explicitly presented as an `application.yml` production template but supplies the predictable `postgres/postgres` credential pair when the corresponding environment variables are missing. This is a fail-open configuration: an incomplete deployment can start successfully with known credentials rather than failing because a required secret was not provided. It also conflicts with the Skill's own recommendation not to hardcode secrets. The documentation itself does not connect to a database or expose an existing deployment. Exploitation becomes possible when a user copies this template into an application without replacing or removing the fallback values. ### Attack Path 1. A developer copies the production configuration template into a Spring Boot application. 2. The deployment omits `DATABASE_USERNAME` or `DATABASE_PASSWORD`. 3. Spring resolves the missing values to `postgres` and `postgres`. 4. The PostgreSQL service is exposed to an attacker through the network or another compromised workload. 5. The attacker authenticates using the documented credential pair. 6. The attacker obtains all database permissions assigned to that account. ### Impact Assessment A successful attacker can exercise the privileges of the configured PostgreSQL account. Depending on how that account is provisioned, this may permit reading, modifying, or deleting application data, changing database objects, and disrupting service availability. If the default `postgres` role retains administrative privileges, the impact can extend to other databases and roles in the same PostgreSQL instance. This issue does not in ...[truncated 196 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Remove all production credential defaults and require explicit secret injection: ```yaml spring: datasource: url: ${DATABASE_URL} username: ${DATABASE_USERNAME} password: ${DATABASE_PASSWORD} ``` Apply the following hardening measures: 1. Configure startup validation so the application fails when any required database variable is absent. 2. Retrieve credentials from a managed secret store rather than source-controlled configuration. 3. Use a dedicated application database role instead of the PostgreSQL administrative role. 4. Grant only the minimum required schema and data permissions. 5. Restrict database ingress to authorized application workloads. 6. Rotate any default credentials that may already have been deployed. 7. Add CI/CD policy checks that reject production configuration containing fallback passwords or known credential pairs. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:561
Finding
Plaintext User Email Address Written to Application Logs<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 561–568 **Vulnerability Type**: Plaintext sensitive information in logs **Risk Level**: Low ### Vulnerable Code ```java user = userRepository.save(user); eventPublisher.publishEvent(new UserCreatedEvent(user.getId(), user.getEmail())); log.info("User created: id={}, email={}", user.getId(), user.getEmail()); return user; ``` ### Technical Analysis The production service example records a user's complete email address at information level. An email address is personal information and is not required to identify the event operationally when an internal user ID is already available. Production logs are frequently exported to centralized observability services, retained in backups, copied into incident reports, and made accessible to personnel who do not otherwise require access to user records. Logging the email therefore expands the data's exposure and retention boundaries. Passing the email address through `UserCreatedEvent` is consistent with the later welcome-email example and can be functionally necessary for that feature. Writing the same value to logs is unnecessary and exceeds minimum data use for observability. ### Attack Path 1. A developer adopts the documented service implementation. 2. A user creates an account. 3. The application writes the user's full email address to its production logs. 4. A log collector forwards and retains the entry in a centralized logging platform or backup. 5. A person or compromised account with access to that platform searches or exports registration logs. 6. The email addresses are disclosed without requiring direct access to the application's primary database. ### Impact Assessment The issue can disclose user email addresses to log readers and systems in the logging pipeline. This may enable privacy violations, user enumeration, phishing, spam, or correlation with other leaked data. It grants no additional application, database, operat ...[truncated 212 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Log only the internal identifier: ```java eventPublisher.publishEvent(new UserCreatedEvent(user.getId(), user.getEmail())); log.info("User created: id={}", user.getId()); ``` Apply the following controls: 1. Do not log full email addresses, authentication tokens, passwords, or other personal information. 2. If correlation by email is unavoidable, use an approved irreversible keyed hash or a consistently masked representation. 3. Configure structured-log redaction for known sensitive field names. 4. Restrict log-platform access according to least privilege. 5. Define retention periods appropriate for operational data and delete expired logs and backups. 6. Review existing logs and exports for plaintext email addresses and purge them where legally and operationally appropriate. 7. Add automated tests or static checks that detect sensitive values passed to logging APIs. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Confidence
94% confidence
Finding
The README advertises generic trigger phrases such as 'review my Spring Boot app' and 'Dockerize my app' that are broad enough to match ordinary user requests in many contexts. If the platform auto-invokes skills based on these phrases, this can cause unintended activation, routing user content into this skill without clear consent and potentially overriding more appropriate or safer skills.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The skill defines very generic natural-language triggers such as 'review my Spring Boot app' and 'review my security config', which are likely to overlap with common user requests in unrelated contexts. In an agent environment, this can cause the skill to activate unexpectedly and steer the assistant into applying this skill when the user did not explicitly intend it, creating prompt-routing confusion and increasing the chance of unintended behavior or policy bypass through scope overreach.