T08 · Insecure Dependencies
- Location
ddd-architecture/references/gradle-dependencies.md:15- Finding
Mutable Gradle Plugin Versions Undermine Build Reproducibility and Supply-Chain Integrity
- Content
View full analysis
Vulnerability Details
File Location:
ddd-architecture/references/gradle-dependencies.md, lines 15–22
Vulnerability Type: Mutable third-party dependency versions
Risk Level: MediumVulnerable Code
groovy plugins { id 'java' id 'org.springframework.boot' version '3.2.x' apply false id 'io.spring.dependency-management' version '1.1.x' apply false } ext { set('springBootVersion', '3.2.x') }Technical Analysis
The Gradle template uses the wildcard version
3.2.xfor Spring Boot and1.1.xfor the Spring dependency-management plugin. These mutable selectors can resolve to different releases over time without any corresponding source-code change.Because Gradle plugins execute code during build configuration and execution, resolving an unreviewed matching release expands the build's supply-chain trust boundary. The use of recognized plugin identifiers and standard repositories reduces the likelihood of dependency confusion or typosquatting, but wildcard versions still prevent deterministic review and make it possible for future releases, compromised artifacts, or vulnerable transitive dependencies to enter generated projects automatically.
Attack Path
- A user follows the Skill guidance and copies the provided Gradle configuration into a project.
- Gradle queries the configured plugin and artifact repositories for versions matching
3.2.xand1.1.x. - A later matching release is published after the original configuration was reviewed.
- A subsequent build resolves that new release instead of a previously reviewed artifact.
- Gradle loads and executes the plugin under the privileges of the build process.
- If the newly resolved artifact is compromised or contains a security regression, it can affect the build environment and generated application without a source-code change alerting reviewers.
Impact Assessment
A malicious Gradle plugin could ...[truncated 566 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace every wildcard selector with an exact, reviewed version, for example:
groovy plugins { id 'java' id 'org.springframework.boot' version '3.2.12' apply false id 'io.spring.dependency-management' version '1.1.7' apply false } ext { set('springBootVersion', '3.2.12') } -
Verify that the selected versions are supported and free of known vulnerabilities before documenting them.
-
Enable Gradle dependency locking and commit the generated lock files.
-
Enable Gradle dependency verification using trusted checksums or signatures and commit
gradle/verification-metadata.xml. -
Restrict plugin and dependency resolution to an explicit allowlist of trusted repositories.
-
Configure CI to reject dynamic versions such as
+,latest.release, and version wildcards. -
Use automated dependency-update tooling to propose explicit, reviewable version changes rather than silently accepting future releases.
-
Review transitive dependency changes and run security scanning whenever pinned versions are upgraded.
-
