Commit 8dfe77e
Fix dependency vulnerabilities in buildscript classpath (#217)
## Summary
Resolves 5 open Dependabot alerts for vulnerable transitive dependencies
on the plugin buildscript classpath (alerts 21, 22, 25, 26, 27). The 6
`com.fasterxml.jackson.core` alerts are intentionally left untouched.
## Changes
- **Update the Shadow plugin** from
`com.github.johnrengelman.shadow:8.1.1` to `com.gradleup.shadow:8.3.6`,
which pulls `plexus-utils` up to `4.0.2`, clearing that alert with no
constraint. (Alert 25)
- **Remove the `com.github.breadmoirai.github-release:2.5.2` plugin.**
It was used only to create a bare GitHub release (no asset uploads), yet
it was the sole source of `tika-core` and `okio` on the classpath. Its
only patched version, `tika-core:3.2.2`, requires **JDK 11** and cannot
load on the JDK 8 the build runs on in the CI matrix. It's replaced by a
small `CreateGitHubRelease` task that shells out to `gh release create`,
keeping the `githubRelease` task name so the external release workflow
is unaffected. This removes `tika-core` and `okio` entirely. (Alert 21)
- **Constrain the remaining vulnerable transitive of the Shadow
plugin:**
| Library | Resolved before | Now |
|---|---|---|
| `org.apache.logging.log4j:log4j-core` | 2.24.1 | **2.25.4** |
(`commons-io` remains pinned to 2.21.0.) (Alerts 22, 26, 27)
## Why remove github-release rather than pin Tika?
Tika 3.x is Java 11 bytecode, and Dependabot offers no patched 2.x.
Since the build runs on JDK 8 in the `test-gradle-version` matrix, a
patched Tika on the buildscript classpath is a JDK-8 landmine. The
plugin created only a bare release, so Tika served no functional purpose
— removing the plugin is the smallest change that both clears the CVEs
and eliminates the JDK-8 conflict, rather than working around it.
## Verification
- Resolved buildscript classpath confirms `tika-core` and `okio` are
gone; `plexus-utils:4.0.2`, `log4j-core → 2.25.4`, `commons-io →
2.21.0`.
- `:plugin:build`, `:plugin:shadowJar`, and `:plugin:test` all pass.
- The new `githubRelease` task resolves, wires
`dependsOn(createReleaseTag)`, and configures cleanly under the
configuration cache (`--dry-run` verified).
## Note for the release workflow
The replacement task relies on the `gh` CLI (preinstalled on GitHub
runners) and reads the token from the existing
`GITHUB_DEPENDENCY_GRAPH_GIT_TOKEN` env var (mapped to `GH_TOKEN`). The
`gh release create` path is not exercised by CI, so it's worth
confirming during the next staging release.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ddaf9f6 commit 8dfe77e
2 files changed
Lines changed: 34 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 209 | + | |
220 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
221 | 214 | | |
222 | 215 | | |
223 | 216 | | |
| |||
242 | 235 | | |
243 | 236 | | |
244 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
0 commit comments