Skip to content

Commit b2ff932

Browse files
authored
fix: Use auth_token rather than access_token (#23)
* fix: Use auth_token rather than access_token access_token requires a GCP SA and we do not have those for this configuration. * Update the test workflow to use a local path This lets the CI run on PR before merging.
1 parent 872e625 commit b2ff932

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

.github/workflows/github_actions_scan.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ env:
2525
${{ inputs.zizmor_result_bucket != '' && inputs.zizmor_result_bucket || 'zizmor-7165' }}
2626
ZIZMOR_CONFIG_BUCKET: >-
2727
${{ inputs.zizmor_config_bucket != '' && inputs.zizmor_config_bucket || 'zizmor-configs-cc63' }}
28-
WIF_PROVIDER: 'projects/102295818544/locations/global/workloadIdentityPools/gitsec-gha-artifacts/providers/gitsec-gha-artifacts-provider'
28+
WIF_PROVIDER: >-
29+
${{ inputs.wif_provider != '' && inputs.wif_provider || 'projects/102295818544/locations/global/workloadIdentityPools/gitsec-gha-artifacts/providers/gitsec-gha-artifacts-provider' }}
2930
3031
jobs:
3132
check-changes:
@@ -70,15 +71,13 @@ jobs:
7071
uses: 'google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed' # ratchet:google-github-actions/auth@v2
7172
id: 'gcp-auth'
7273
with:
73-
token_format: 'access_token'
74-
workload_identity_provider: >-
75-
${{ inputs.wif_provider != '' && inputs.wif_provider || env.WIF_PROVIDER }}
74+
workload_identity_provider: '${{ env.WIF_PROVIDER }}'
7675
- name: 'Download zizmor config'
7776
shell: 'bash'
7877
env:
7978
REPO_PATH: '${{ github.repository }}'
8079
ORG_PATH: '${{ github.repository_owner }}'
81-
GOOGLE_ACCESS_TOKEN: '${{ steps.gcp-auth.outputs.access_token }}'
80+
GOOGLE_ACCESS_TOKEN: '${{ steps.gcp-auth.outputs.auth_token }}'
8281
run: |
8382
if [ -z "${ZIZMOR_CONFIG_BUCKET}" ]; then
8483
echo "::error::No config bucket configured. Config bucket is required."
@@ -262,14 +261,12 @@ jobs:
262261
id: 'gcp-auth'
263262
uses: 'google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed' # ratchet:google-github-actions/auth@v2
264263
with:
265-
token_format: 'access_token'
266-
workload_identity_provider: >-
267-
${{ inputs.wif_provider != '' && inputs.wif_provider || env.WIF_PROVIDER }}
264+
workload_identity_provider: '${{ env.WIF_PROVIDER }}'
268265
- name: 'Upload result'
269266
shell: 'bash'
270267
env:
271268
GITHUB_PULL_REQUEST_NUMBER: '${{ github.event.pull_request.number }}'
272-
GOOGLE_ACCESS_TOKEN: '${{ steps.gcp-auth.outputs.access_token }}'
269+
GOOGLE_ACCESS_TOKEN: '${{ steps.gcp-auth.outputs.auth_token }}'
273270
run: |
274271
gcs_upload() {
275272
local src_path="$1"

.github/workflows/test_github_actions_scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
test-zizmor-scan:
14-
uses: 'google-gh-automation/workflows/.github/workflows/github_actions_scan.yml@main'
14+
uses: './.github/workflows/github_actions_scan.yml'
1515
with:
1616
wif_provider: 'projects/763312321262/locations/global/workloadIdentityPools/gitsec-gha-artifacts/providers/gitsec-gha-artifacts-provider'
1717
zizmor_result_bucket: 'zizmor-43e4'

0 commit comments

Comments
 (0)