Skip to content

verify: exempt gradle-wrapper.jar from in-tree binary check#951

Open
potiuk wants to merge 1 commit into
mainfrom
fix/in-tree-binary-gradle-wrapper-exemption
Open

verify: exempt gradle-wrapper.jar from in-tree binary check#951
potiuk wants to merge 1 commit into
mainfrom
fix/in-tree-binary-gradle-wrapper-exemption

Conversation

@potiuk

@potiuk potiuk commented Jun 21, 2026

Copy link
Copy Markdown
Member

What

Exempt gradle/wrapper/gradle-wrapper.jar from the in-tree binary check.

Why

The in-tree binary check scans the whole action repo for pre-compiled native binaries and rejects any without verifiable provenance. It false-flagged gradle/wrapper/gradle-wrapper.jar on JetBrains/qodana-action (surfaced while triaging the 2026.1.0 → 2026.1.3 bump in #944).

That jar is Gradle's build wrapper — build-time tooling of the upstream repo, invoked by ./gradlew during its own build, never executed on a consumer's runner when the action runs (qodana-action is a node24 action that runs dist/index.js). It is also checksum-verifiable in its own right against Gradle's published list (cf. gradle/wrapper-validation-action). Flagging it as opaque action-runtime code is a false positive.

How

  • Add _IN_TREE_BINARY_EXEMPT_PATH_SUFFIXES, matched on the canonical gradle/wrapper/gradle-wrapper.jar path suffix (not bare name), so a same-named blob dropped anywhere else is still caught.
  • Regression test covering: canonical path exempt, nested sub-path exempt, stray dist/gradle-wrapper.jar still flagged, generic .jar still flagged.

uv run pytest utils/tests/verify_action_build/test_security.py → 147 passed. prek clean.

Generated-by: Claude Opus 4.8 (1M context)

The in-tree binary check scans the whole action repo for pre-compiled
native binaries and rejects any without verifiable provenance. It
false-flagged `gradle/wrapper/gradle-wrapper.jar` on JetBrains/qodana-action
(a node24 action): that jar is Gradle's build wrapper — build-time tooling
of the upstream repo, invoked by `./gradlew` during its own build, never
executed on a consumer's runner when the action runs — and is itself
checksum-verifiable against Gradle's published list (cf.
gradle/wrapper-validation-action). Flagging it as opaque action-runtime
code is a false positive.

Add a path-suffix exemption matched on the canonical
`gradle/wrapper/gradle-wrapper.jar` location (not bare name), so a
same-named blob dropped elsewhere is still caught, plus a regression test.

Generated-by: Claude Opus 4.8 (1M context)
@snazy

snazy commented Jun 22, 2026

Copy link
Copy Markdown
Member

Hm, shouldn't projects not add binary executables to their source trees?

Making the Gradle build not require the jar to be present is pretty easy to achieve, I've documented a possible approach. TL;DR is:

@potiuk

potiuk commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

I guess it's not something we can "force" on others

@snazy

snazy commented Jun 22, 2026

Copy link
Copy Markdown
Member

True, and it's what I'm going to. Maybe we can tell that it's better to have no executable binaries in the source tree?

@potiuk

potiuk commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

Gentle ping @dfoulks1 @ppkarwasz — when you have a moment, this is a small, self-contained fix: it exempts Gradle's build-wrapper jar from the in-tree binary check (with a regression test). It also unblocks #944. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants