Skip to content

Commit 680fccf

Browse files
authored
Merge pull request #892 from bobcallaway/zizmor
address CI issues reported by zizmor
2 parents 21bda18 + 0bb5105 commit 680fccf

File tree

9 files changed

+45
-16
lines changed

9 files changed

+45
-16
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
id-token: write
3838
steps:
3939
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40+
with:
41+
persist-credentials: false
4042
- name: Set up JDK ${{ matrix.java-version }}
4143
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
4244
with:
@@ -59,6 +61,7 @@ jobs:
5961
run: ./gradlew build
6062

6163
- name: Ensure sigstore-java self signing still works
64+
if: ${{ !github.event.pull_request.head.repo.fork }}
6265
run: ./gradlew sigstore-java:publishToMavenLocal -Prelease -PskipPgpSigning
6366

6467
- name: Test sigstore-java/sandbox

.github/workflows/cifuzz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
dry-run: false
2020
language: jvm
2121
- name: Upload Crash
22-
uses: actions/upload-artifact@v4
22+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
2323
if: failure() && steps.build.outcome == 'success'
2424
with:
2525
name: artifacts

.github/workflows/conformance.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
with:
23+
persist-credentials: false
2224

2325
- name: Set up JDK ${{ matrix.java-version }}
2426
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0

.github/workflows/examples.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
with:
26+
persist-credentials: false
2527

2628
- name: Setup Java
2729
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
@@ -47,4 +49,6 @@ jobs:
4749
4850
- name: run examples against development version
4951
working-directory: examples/hello-world
50-
run: ./test.sh -Dsigstore.version=${{ steps.dev_version.outputs.version }}
52+
env:
53+
VERSION: ${{ steps.dev_version.outputs.version }}
54+
run: ./test.sh -Dsigstore.version=${VERSION}

.github/workflows/gradle-wrapper-validation.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
10-
# allstar complains if we don't use tags here (https://github.com/ossf/scorecard/issues/2477)
11-
- uses: gradle/wrapper-validation-action@v3
10+
with:
11+
persist-credentials: false
12+
- uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2

.github/workflows/release-sigstore-gradle-plugin-from-tag.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,23 @@ jobs:
1010
steps:
1111
- name: checkout tag
1212
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
with:
14+
persist-credentials: false
1315
- name: process tag
1416
id: version
17+
env:
18+
TAG: ${{ github.ref_name }}
1519
run: |
16-
TAG=${{ github.ref_name }}
1720
echo "version=${TAG#"v"}" >> $GITHUB_OUTPUT
1821
- name: verify tag matches gradle version
22+
env:
23+
TAG_VERSION: ${{ steps.version.outputs.version }}
24+
REF: ${{ github.ref }}
1925
run: |
2026
set -Eeo pipefail
2127
version=$(grep "^version=" gradle.properties | cut -d'=' -f2)
22-
if [[ ! "$version" == "${{ steps.version.outputs.version }}" ]]; then
23-
echo "tagged version ${{ github.ref }} (as ${{ steps.version.outputs.version }}) does not match gradle.properties $version"
28+
if [[ ! "$version" == "${TAG_VERSION}" ]]; then
29+
echo "tagged version ${REF} (as ${TAG_VERSION}) does not match gradle.properties $version"
2430
exit 1
2531
fi
2632
@@ -38,6 +44,8 @@ jobs:
3844
steps:
3945
- name: Checkout tag
4046
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47+
with:
48+
persist-credentials: false
4149

4250
- name: Set up JDK 11
4351
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0

.github/workflows/release-sigstore-java-from-tag.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,23 @@ jobs:
1111
steps:
1212
- name: checkout
1313
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
with:
15+
persist-credentials: false
1416
- name: process tag
1517
id: version
18+
env:
19+
TAG: ${{ github.ref_name }}
1620
run: |
17-
TAG=${{ github.ref_name }}
1821
echo "version=${TAG#"v"}" >> $GITHUB_OUTPUT
1922
- name: verify tag matches gradle version
23+
env:
24+
TAG_VERSION: ${{ steps.version.outputs.version }}
25+
REF: ${{ github.ref }}
2026
run: |
2127
set -Eeo pipefail
2228
version=$(grep "^version=" gradle.properties | cut -d'=' -f2)
23-
if [[ ! "$version" == "${{ steps.version.outputs.version }}" ]]; then
24-
echo "tagged version ${{ github.ref }} (as ${{ steps.version.outputs.version }}) does not match gradle.properties $version"
29+
if [[ ! "$version" == "${TAG_VERSION}" ]]; then
30+
echo "tagged version ${REF} (as ${TAG_VERSION}) does not match gradle.properties $version"
2531
exit 1
2632
fi
2733
@@ -39,6 +45,8 @@ jobs:
3945
steps:
4046
- name: checkout tag
4147
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
48+
with:
49+
persist-credentials: false
4250

4351
- name: Set up JDK 11
4452
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
@@ -65,7 +73,8 @@ jobs:
6573
contents: write
6674
steps:
6775
- name: Create release
68-
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
69-
with:
70-
tag_name: ${{ github.ref_name }}
71-
body: "See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for more details."
76+
env:
77+
REF_NAME: ${{ github.ref_name }}
78+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
run: |
80+
gh release create -t "${REF_NAME}" ${REF_NAME} -n "See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for more details."

.github/workflows/tuf-conformance.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
with:
23+
persist-credentials: false
2224

2325
- name: Set up JDK ${{ matrix.java-version }}
2426
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
@@ -35,7 +37,7 @@ jobs:
3537
- name: Unpack tuf distribution
3638
run: tar -xvf ${{ github.workspace }}/tuf-cli/build/distributions/tuf-cli-*.tar --strip-components 1
3739

38-
- uses: theupdateframework/tuf-conformance@v2
40+
- uses: theupdateframework/tuf-conformance@dee4e23533d7a12a6394d96b59b3ea0aa940f9bf # v2.2.0
3941
with:
4042
entrypoint: ${{ github.workspace }}/bin/tuf-cli
4143
artifact-name: test repositories for tuf-cli java ${{ matrix.java-version }}

examples/hello-world/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export ORG_GRADLE_PROJECT_signingKey=$MAVEN_GPG_KEY
66
export ORG_GRADLE_PROJECT_signingPassword=$MAVEN_GPG_PASSPHRASE
77
set -x
88
# gradle
9-
./gradlew clean publishMavenPublicationToExamplesRepository $@
9+
./gradlew clean publishMavenPublicationToExamplesRepository --stacktrace $@
1010
test -f build/example-repo/com/example/hello-world/1.0.0/hello-world-1.0.0.jar.sigstore.json
1111
test -f build/example-repo/com/example/hello-world/1.0.0/hello-world-1.0.0.module.sigstore.json
1212
test -f build/example-repo/com/example/hello-world/1.0.0/hello-world-1.0.0.pom.sigstore.json

0 commit comments

Comments
 (0)