Skip to content

Commit 79fd617

Browse files
authored
ci: pin actions to specific commits (#628)
replace mutable tag with commit hash to improve security and reproducibility
1 parent e04fedc commit 79fd617

File tree

11 files changed

+32
-32
lines changed

11 files changed

+32
-32
lines changed

.github/actions/bootstrap/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ runs:
1212
using: "composite"
1313
steps:
1414

15-
- uses: actions/setup-go@v5
15+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
1616
with:
1717
go-version-file: 'go.mod'
1818

19-
- uses: docker/setup-qemu-action@v3
19+
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
2020
if: "${{ inputs.goreleaser == 'true' }}"
2121
with:
2222
platforms: linux/arm64, linux/amd64
2323

2424
- name: Set up Docker Buildx
2525
if: "${{ inputs.goreleaser == 'true' }}"
26-
uses: docker/setup-buildx-action@v3
26+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
2727

2828
# See https://goreleaser.com/blog/supply-chain-security/
2929
- name: installs syft for generating the SBOM with goreleaser
3030
if: "${{ inputs.goreleaser == 'true' }}"
31-
uses: anchore/sbom-action/[email protected]
31+
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0

.github/workflows/addToAPMProject.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
"organization_projects": "write",
2222
"issues": "read"
2323
}
24-
- uses: octokit/[email protected]
24+
- uses: octokit/graphql-action@51bf543c240dcd14761320e2efc625dc32ec0d32 # v2.x
2525
id: add_to_project
2626
with:
2727
query: |
@@ -39,7 +39,7 @@ jobs:
3939
env:
4040
PROJECT_ID: "PVT_kwDOAGc3Zs0VSg"
4141
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
42-
- uses: octokit/[email protected]
42+
- uses: octokit/graphql-action@51bf543c240dcd14761320e2efc625dc32ec0d32 # v2.x
4343
id: label_team
4444
with:
4545
query: |

.github/workflows/addToDocsProject.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
"organization_projects": "write",
2323
"issues": "read"
2424
}
25-
- uses: octokit/[email protected]
25+
- uses: octokit/graphql-action@51bf543c240dcd14761320e2efc625dc32ec0d32 # v2.x
2626
id: add_to_project
2727
with:
2828
query: |

.github/workflows/dependabot-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
contents: write
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2323

2424
- name: Bootstrap Action Workspace
2525
uses: ./.github/actions/bootstrap

.github/workflows/docs-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
docs-preview:
12-
uses: elastic/docs-builder/.github/workflows/preview-build.yml@main
12+
uses: elastic/docs-builder/.github/workflows/preview-build.yml@99b12f8bf7a82107ffcf59dacd199d00a965e9db # main
1313
with:
1414
path-pattern: docs/**
1515
permissions:

.github/workflows/docs-cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
docs-preview:
10-
uses: elastic/docs-builder/.github/workflows/preview-cleanup.yml@main
10+
uses: elastic/docs-builder/.github/workflows/preview-cleanup.yml@99b12f8bf7a82107ffcf59dacd199d00a965e9db # main
1111
permissions:
1212
contents: none
1313
id-token: write

.github/workflows/labeler.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
"issues": "read"
2828
}
2929
- name: Add aws-λ-extension label
30-
uses: github/[email protected]
30+
uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
3131
with:
3232
repo-token: "${{ secrets.GITHUB_TOKEN }}"
3333
configuration-path: .github/labeler-config.yml
3434
enable-versioned-regex: 0
3535
- name: Check team membership for user
36-
uses: elastic/[email protected]
36+
uses: elastic/get-user-teams-membership@5fa8d08135326e44d74d0ec4ef8705d8e36df12d # 1.1.0
3737
id: checkUserMember
3838
with:
3939
username: ${{ github.actor }}
@@ -48,13 +48,13 @@ jobs:
4848
echo "::debug::isExcluded: ${{ steps.checkUserMember.outputs.isExcluded }}"
4949
- name: Add community and triage labels
5050
if: steps.checkUserMember.outputs.isTeamMember != 'true' && steps.checkUserMember.outputs.isExcluded != 'true'
51-
uses: github/[email protected]
51+
uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
5252
with:
5353
repo-token: "${{ secrets.GITHUB_TOKEN }}"
5454
configuration-path: .github/community-label.yml
5555
enable-versioned-regex: 0
5656
- name: Assign new internal pull requests to project
57-
uses: elastic/[email protected]
57+
uses: elastic/assign-one-project-github-action@2573c8fb01aadfde8f5b653eea21dd24569ca831 # 1.2.2
5858
if: (steps.checkUserMember.outputs.isTeamMember == 'true' || steps.checkUserMember.outputs.isExcluded == 'true') && github.event.pull_request
5959
with:
6060
project: 'https://github.com/orgs/elastic/projects/454'

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
build:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2424
with:
2525
fetch-depth: 0
2626

27-
- uses: elastic/oblt-actions/aws/auth@v1
27+
- uses: elastic/oblt-actions/aws/auth@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
2828
with:
2929
aws-account-id: "267093732750"
3030

@@ -53,7 +53,7 @@ jobs:
5353
run: make release
5454

5555
# Store artifacts to help with troubleshooting
56-
- uses: actions/upload-artifact@v4
56+
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
5757
if: always()
5858
with:
5959
name: release
@@ -89,7 +89,7 @@ jobs:
8989
VERSION: ${{ github.ref_name }}
9090

9191
- if: ${{ success() }}
92-
uses: elastic/oblt-actions/slack/send@v1
92+
uses: elastic/oblt-actions/slack/send@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
9393
with:
9494
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
9595
channel-id: "#apm-aws-lambda"
@@ -98,7 +98,7 @@ jobs:
9898
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)
9999
100100
- if: ${{ failure() }}
101-
uses: elastic/oblt-actions/slack/send@v1
101+
uses: elastic/oblt-actions/slack/send@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
102102
with:
103103
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
104104
channel-id: "#apm-aws-lambda"

.github/workflows/smoke-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ jobs:
3434
contents: read
3535
id-token: write
3636
steps:
37-
- uses: actions/checkout@v4
37+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3838
- name: Bootstrap Action Workspace
3939
uses: ./.github/actions/bootstrap
4040
with:
4141
goreleaser: 'true'
42-
- uses: hashicorp/setup-terraform@v3
42+
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3
4343
with:
4444
terraform_version: 1.2.3
45-
- uses: elastic/oblt-actions/aws/auth@v1
46-
- uses: elastic/oblt-actions/google/auth@v1
45+
- uses: elastic/oblt-actions/aws/auth@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
46+
- uses: elastic/oblt-actions/google/auth@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
4747
- uses: google-github-actions/get-secretmanager-secrets@a8440875e1c2892062aef9061228d4f1af8f919b # v2.2.3
4848
with:
4949
export_to_environment: true
@@ -67,7 +67,7 @@ jobs:
6767
run: make smoketest/cleanup
6868

6969
- if: always()
70-
uses: elastic/oblt-actions/slack/notify-result@v1
70+
uses: elastic/oblt-actions/slack/notify-result@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
7171
with:
7272
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
7373
channel-id: "#apm-aws-lambda"

.github/workflows/test-reporter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
report:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: elastic/oblt-actions/test-report@v1
20+
- uses: elastic/oblt-actions/test-report@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
2121
with:
2222
artifact: /test-results(.*)/
2323
name: 'Test Report $1'

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ jobs:
3333
- "macos-latest"
3434
runs-on: ${{ matrix.platform }}
3535
steps:
36-
- uses: actions/checkout@v4
36+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3737
- name: Bootstrap Action Workspace
3838
uses: ./.github/actions/bootstrap
3939
- name: Test
4040
run: make test junitfile="${{ matrix.platform }}-junit-report.xml"
41-
- uses: actions/upload-artifact@v4
41+
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
4242
if: success() || failure()
4343
with:
4444
name: test-results-${{ matrix.platform }}
4545
path: '*-junit-report.xml'
4646
build:
4747
runs-on: ubuntu-latest
4848
steps:
49-
- uses: actions/checkout@v4
49+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
5050

5151
- name: Bootstrap Action Workspace
5252
uses: ./.github/actions/bootstrap
@@ -56,7 +56,7 @@ jobs:
5656
- name: Build
5757
run: make dist
5858

59-
- uses: actions/upload-artifact@v4
59+
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
6060
if: always()
6161
with:
6262
name: snapshots
@@ -66,7 +66,7 @@ jobs:
6666
lint:
6767
runs-on: ubuntu-latest
6868
steps:
69-
- uses: actions/checkout@v4
69+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
7070
- name: Bootstrap Action Workspace
7171
uses: ./.github/actions/bootstrap
7272
- run: make lint-prep
@@ -75,7 +75,7 @@ jobs:
7575
notice:
7676
runs-on: ubuntu-latest
7777
steps:
78-
- uses: actions/checkout@v4
78+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
7979
- name: Bootstrap Action Workspace
8080
uses: ./.github/actions/bootstrap
8181
- name: notice
@@ -93,7 +93,7 @@ jobs:
9393
runs-on: ubuntu-latest
9494
steps:
9595
- id: check
96-
uses: elastic/oblt-actions/check-dependent-jobs@v1
96+
uses: elastic/oblt-actions/check-dependent-jobs@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
9797
with:
9898
jobs: ${{ toJSON(needs) }}
9999
- run: ${{ steps.check.outputs.is-success }}

0 commit comments

Comments
 (0)