Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ jobs:
21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic
cache-read-only: ${{ github.ref_name != github.event.repository.default_branch }}

- name: Verify Maven Central credential transport
Expand Down Expand Up @@ -107,8 +108,9 @@ jobs:
21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic
cache-read-only: ${{ github.ref_name != github.event.repository.default_branch }}

- name: Build SDK
Expand Down Expand Up @@ -156,8 +158,9 @@ jobs:
21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic
cache-read-only: ${{ github.ref_name != github.event.repository.default_branch }}

- name: Restore exact-run Gradle build cache
Expand Down Expand Up @@ -194,8 +197,9 @@ jobs:
21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic
cache-read-only: ${{ github.ref_name != github.event.repository.default_branch }}

- name: Restore exact-run Gradle build cache
Expand Down Expand Up @@ -240,8 +244,9 @@ jobs:
21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic
cache-read-only: true

- name: Restore exact-run Gradle build cache
Expand Down Expand Up @@ -296,8 +301,9 @@ jobs:
java-version: 21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic
cache-read-only: ${{ github.ref_name != github.event.repository.default_branch }}

- name: Read version support policy
Expand Down Expand Up @@ -341,8 +347,9 @@ jobs:
java-version: 21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic
cache-read-only: true

- name: Restore exact-run Gradle build cache
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/create-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ jobs:
printf 'GRADLE_USER_HOME=%s\n' "$TRUSTED_GRADLE_USER_HOME" >> "$GITHUB_ENV"

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
Comment thread
dpiet-oai marked this conversation as resolved.
with:
cache-provider: basic
cache-disabled: true

- name: Compile the openai-java-core project
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ jobs:
21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic

- name: Run example
env:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/runtime-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ jobs:
java-version: 21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic

- name: Read version support policy
id: matrix
Expand Down Expand Up @@ -81,7 +83,9 @@ jobs:
java-version: 21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic

- name: Run consumer compatibility smoke test
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/x509-live-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ jobs:
printf 'GRADLE_USER_HOME=%s\n' "$TRUSTED_GRADLE_USER_HOME" >> "$GITHUB_ENV"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic
cache-disabled: true

- name: Verify enrolled X.509 identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,8 +796,8 @@ class GradleCacheTrustPolicyTest {
),
workflow.replaceFirst(javaSetup, " cache: gradle\n$javaSetup"),
workflow.replaceFirst(
"gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c",
"gradle/actions/setup-gradle@v5",
Regex("gradle/actions/setup-gradle@[0-9a-fA-F]{40}"),
"gradle/actions/setup-gradle@v6",
),
)
.forEach { poisonedWorkflow ->
Expand Down Expand Up @@ -885,7 +885,7 @@ class GradleCacheTrustPolicyTest {
mapOf(
"actions/checkout" to setOf("persist-credentials", "ref"),
"actions/setup-java" to setOf("distribution", "java-version"),
"gradle/actions/setup-gradle" to setOf("cache-disabled"),
"gradle/actions/setup-gradle" to setOf("cache-disabled", "cache-provider"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] Keep the provider choice inside the trust boundary

This allowlist accepts the new cache-provider key but never constrains its value. A later change from basic to enhanced would still pass the publishing policy (which only asserts cache-disabled) and the pull-request policy (which only asserts read-only behavior), silently reintroducing the separately reviewed provider this PR deliberately avoids.

Suggested fix: assert that every setup-gradle action uses cache-provider: basic, and add an enhanced mutation to the poisoned-workflow regression.

"graalvm/setup-graalvm" to setOf("distribution", "java-version"),
"actions/attest" to setOf("subject-path", "predicate-type", "predicate-path"),
)
Expand Down
Loading