Skip to content

Commit 414b48a

Browse files
authored
add Apache third party allow list check and doc (#39392)
* add third party allow list check and doc * add python action and shift validate further down * fix two workflow/action issues caught during test run * reuse setup environment step per comment
1 parent 0c151d8 commit 414b48a

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

.github/actions/setup-k8s-access/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ runs:
6868
run: |
6969
kubectl config set-context --current --namespace=${{ steps.replace_namespace.outputs.TEST_NAMESPACE }}
7070
- name: Post cleanup
71-
uses: pyTooling/Actions/with-post-step@v4.2.2
71+
uses: pytooling/actions/with-post-step@42e17fae05f224e5ac3d79d021a4e3577878efe5 # v4.2.2
7272
with:
7373
main: echo "Post Cleanup"
7474
post: |

.github/workflows/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ On top of normal Actions workflow steps, all new CI workflows (excluding release
5858
4) A set of GitHub token permissions
5959
5) Concurrency Groups
6060
6) Comment Triggering Support
61+
7) Allowed Actions (See below)
6162

6263
Each of these is described in more detail below.
6364
## Name and Phrase
@@ -165,6 +166,14 @@ In order to make it easier for non-committers to interact with workflows, workfl
165166

166167
**Note:** Comment triggering is found not scalable ([#28909](https://github.com/apache/beam/issues/28909)) and is currently limited to a subset of suites. For more information see the [Running Workflows Manually](#running-workflows-manually) section.
167168

169+
## Allowed Actions
170+
171+
GitHub Actions under the trusted namespaces `actions/*`, `github/*`, and `apache/*` are automatically approved. Any third-party actions outside of these namespaces must be explicitly approved and added to the ASF-wide allowlist before use.
172+
173+
Additionally, third-party actions must be pinned to a specific Git commit SHA (e.g., `zizmorcore/zizmor-action@6599ee8b7a49aef6a770f63d261d214911a7ce02`) instead of a version tag or branch name to comply with ASF security policy.
174+
175+
For details on the allowlist and how to request new actions, see the [ASF Infrastructure Actions Allowlist Check Documentation](https://github.com/apache/infrastructure-actions/blob/main/allowlist-check/README.md).
176+
168177
# Testing new workflows or workflow updates
169178

170179
## Testing New Workflows

.github/workflows/beam_Infrastructure_UsersPermissions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Setup gcloud
5353
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db
5454
- name: Install Terraform
55-
uses: hashicorp/setup-terraform@v4
55+
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
5656
with:
5757
terraform_version: 1.12.2
5858
- name: Initialize Terraform

.github/workflows/beam_PreCommit_GHA.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,19 @@ jobs:
8080
comment_phrase: ${{ matrix.job_phrase }}
8181
github_token: ${{ secrets.GITHUB_TOKEN }}
8282
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
83-
- name: Run zizmor
84-
uses: zizmorcore/zizmor-action@6599ee8b7a49aef6a770f63d261d214911a7ce02 # v0.6.0
85-
with:
86-
advanced-security: true
8783
- name: Setup environment
8884
uses: ./.github/actions/setup-environment-action
8985
with:
9086
java-version: default
9187
go-version: default
88+
python-version: default
89+
# For details on the ASF GHA allowlist, see: https://github.com/apache/infrastructure-actions/blob/main/allowlist-check/README.md
90+
- name: Validate GHA Allowlist
91+
uses: apache/infrastructure-actions/allowlist-check@main # zizmor: ignore[unpinned-uses]
92+
- name: Run zizmor
93+
uses: zizmorcore/zizmor-action@6599ee8b7a49aef6a770f63d261d214911a7ce02 # v0.6.0
94+
with:
95+
advanced-security: true
9296
- name: run GHA PreCommit script
9397
uses: ./.github/actions/gradle-command-self-hosted-action
9498
with:

0 commit comments

Comments
 (0)