56 results available
Sign in
Skills directory

create-spring-boot-java-project

github

·

Last changed
Hardened

This skill has been hardened by Chainguard

Last changed

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.


Open before hardening

2

High

6

Medium

2

Low
Open after hardening

1

High

6

Medium

2

Low

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


SKILL.md

Create a Spring Boot Java project

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.

Step 0: Detect before you create

  • If the working directory already contains a 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.
  • Check the tools: 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).
  • Ask only for what is missing: project name, group id, package, build tool (default Maven), dependencies (default: web, actuator, validation, devtools; add data-jpa, postgresql, security, docker-compose, testcontainers when a database or auth is needed).

Step 1: Resolve versions

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.

Step 2: Generate the project

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:

curl -fsS https://start.spring.io/starter.zip \
  -d type=maven-project -d language=java -d packaging=jar \
  -d bootVersion=BOOT_VERSION -d javaVersion=JAVA_VERSION \
  -d groupId=com.example -d artifactId=demo -d name=demo \
  -d packageName=com.example.demo -d baseDir=demo \
  -d dependencies=web,actuator,validation,devtools \
  -o demo.zip

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:

unzip -q demo.zip
rm demo.zip

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.

Step 3: Apply the defaults

AreaWhat to doReference

Boot 3 vs 4 differences

Starter names, Jackson 3, test modules

references/spring-boot-4.md

Configuration

application.properties or .yml (match the project), profiles, @ConfigurationProperties, secrets via environment

references/configuration.md

Database

PostgreSQL, Hibernate settings, Compose for dev, Testcontainers for tests

references/database.md

Logging

SLF4J, parameterized messages, levels, structured logging

references/logging.md

Security

Spring Security basics, secure defaults, Problem Details

references/security.md

Docker

JVM image and GraalVM native image Dockerfiles

references/docker.md

Testing (optional)

See the spring-boot-testing skill (slices, Testcontainers, Failsafe) if it is available; otherwise continue

skills/spring-boot-testing

Best practices (optional)

See the java-springboot skill and instructions/springboot.instructions.md if they are available; otherwise continue

skills/java-springboot

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.

Step 4: Verify

  1. Before the first build, tell the user that tests and Compose start containers through the local Docker daemon. Build and test: ./mvnw verify (Maven) or ./gradlew build (Gradle).
  2. Run: first confirm that port 8080 is free; if it is in use, report that to the user and leave the other process alone. Start ./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.
  3. Report the chosen versions and anything that was skipped or deferred.

Provenance

Adapted from the Apache-2.0 skill jdubois/dr-jskill; see references/PROVENANCE.md.

Install

Install with chainctl
chainctl skill install public/github/create-spring-boot-java-project:latest
Get started with chainctl
View source

Harden your own skills

Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.

Provenance

Upstream sourcehttps://github.com/github/awesome-copilot
Upstream commit7318064697ad4bba7192a5f551b759489c359484
OCI reference

skills.chainreg.biz/public/github.com/github/skills/create-spring-boot-java-project:latest

License

MIT

Files

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


The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.