·
Last changedVersion:
This version passed the hardening gate. Hardening updated the skill content and independently checked the resulting changes. Classified findings before hardening: 10. Classified findings closed: 1. Classified findings remaining: 9. Unclassified scanner findings remaining: 0. Review findings closed: 11. Review findings remaining: 3.
2
6
2
1
6
2
Expand | File | Group | Subtype | Severity | Status |
|---|---|---|---|---|---|
references/versions.md | Supply Chain & Install-Time Trust | Dependency or plugin compromise | High | Closed | |
SKILL.md | Obfuscation & Evasion | Trigger-based activation | High | Open | |
assets/Dockerfile-native-gradle | Supply Chain & Install-Time Trust | — | Medium | Open | |
assets/Dockerfile-gradle | Supply Chain & Install-Time Trust | — | Medium | Open | |
assets/Dockerfile | Supply Chain & Install-Time Trust | — | Medium | Open | |
assets/Dockerfile-native | Supply Chain & Install-Time Trust | — | Medium | Open | |
references/docker.md | Supply Chain & Install-Time Trust | — | Medium | Open | |
SKILL.md | Sensitive Data & Secret Exposure | Data exfiltration | Medium | Open |
10 findings
Scaffold a Spring Boot application with start.spring.io, then apply a small set of opinionated defaults. Out of scope for now: front-ends (Vue/React/Angular), cloud deployment (Azure), Git setup, CRaC and AOT images.
pom.xml or build.gradle(.kts), this is an existing project: do not regenerate it. Read its Spring Boot, Java and test-framework versions and follow them. Never upgrade versions implicitly; propose an upgrade and wait for the user's decision.java -version (JDK matching the chosen Java version), docker --version (needed for Testcontainers and Compose). On the default path (current Boot via start.spring.io) Maven/Gradle need not be installed: the generated wrapper is used. The Boot 3.5 fallback needs Maven or Gradle installed once to create the wrapper (see versions.md).data-jpa, postgresql, security, docker-compose, testcontainers when a database or auth is needed).Follow references/versions.md: query https://start.spring.io/metadata/client at run time for the latest stable Spring Boot release, fall back to the documented pinned values if offline. Do not hardcode latest anywhere.
Accept only a plain numeric release version (no snapshot, milestone or release candidate). Show the resolved Boot and Java versions and their source to the user and get the user's confirmation before generating. Include them in the Step 4 report.
Use the start.spring.io HTTP API with explicit, pinned parameters (no piped installers). Replace the values in capitals.
Before substituting, check every value the user supplied. Group id and package may contain only lowercase letters, digits, underscores and dots, and must start with a letter. Artifact id, name and base folder may contain only letters, digits, dots, hyphens and underscores. Dependencies must be a comma separated list of ids offered by start.spring.io. Boot and Java versions must be plain dotted numbers. If a value contains spaces, quotes, slashes or other shell characters, stop and ask the user for a corrected value.
Before downloading, confirm that neither a folder named after the chosen base folder nor the archive file already exists in the working directory. If either exists, ask the user how to proceed before continuing.
Maven:
Then list the archive entries and confirm every entry sits inside the base folder, with only relative paths and no parent folder segments. If any entry falls outside, stop and report it to the user. Extract the archive, keeping any existing files, and delete the archive only after extraction succeeds:
Gradle: same command with -d type=gradle-project (Groovy DSL) or -d type=gradle-project-kotlin (Kotlin DSL; the language stays java).
Inspect the result (ls demo, read the build file) and make sure the wrapper (mvnw or gradlew) is executable. Add -d dependencies=...,data-jpa,postgresql,docker-compose,testcontainers for a database project.
Before the first wrapper run, read the wrapper properties file under the .mvn or gradle folder. Confirm that the distribution address points to the official Maven or Gradle download host with a fixed version, and report that version and source to the user. If the address looks unexpected, stop and ask the user.
| Area | What to do | Reference |
|---|---|---|
Boot 3 vs 4 differences | Starter names, Jackson 3, test modules | |
Configuration |
| |
Database | PostgreSQL, Hibernate settings, Compose for dev, Testcontainers for tests | |
Logging | SLF4J, parameterized messages, levels, structured logging | |
Security | Spring Security basics, secure defaults, Problem Details | |
Docker | JVM image and GraalVM native image Dockerfiles | |
Testing (optional) | See the |
|
Best practices (optional) | See the |
|
Keep dotfiles minimal: a .gitignore covering target/, build/, .gradle/, IDE folders and .env; never commit .env (commit a .env.sample).
In an existing project, keep the current files: add only the missing ignore entries, and propose configuration and Dockerfile changes to the user, applying them only after the user approves.
./mvnw verify (Maven) or ./gradlew build (Gradle)../mvnw spring-boot:run or ./gradlew bootRun in the background, then poll curl -fsS localhost:8080/actuator/health for a limited time (a few minutes at most); it must return {"status":"UP"}. Stop the application process afterwards, whether or not the check passed.Adapted from the Apache-2.0 skill jdubois/dr-jskill; see references/PROVENANCE.md.
Get started with chainctlchainctl skill install public/github/create-spring-boot-java-project:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.chainreg.biz/public/github.com/github/skills/create-spring-boot-java-project:latest
MIT
HARDENING.md
LICENSE
SKILL.md
assets/Dockerfile
assets/Dockerfile-gradle
assets/Dockerfile-native
assets/Dockerfile-native-gradle
references/PROVENANCE.md
references/configuration.md
references/database.md
references/docker.md
references/logging.md
references/security.md
references/spring-boot-4.md
references/versions.md