Skip to content

Commit d80a024

Browse files
authored
Pin GitHub Actions to commit SHAs (#961)
Signed-off-by: Divya Madala <divyaasm@amazon.com>
1 parent f975592 commit d80a024

7 files changed

Lines changed: 22 additions & 22 deletions

File tree

.github/workflows/auto-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414
steps:
1515
- name: GitHub App token
1616
id: github_app_token
17-
uses: tibdex/github-app-token@v1.5.0
17+
uses: tibdex/github-app-token@1901dc7d52169e70c27a8da37aef0d423e2867a2 # v1.5.0
1818
with:
1919
app_id: ${{ secrets.APP_ID }}
2020
private_key: ${{ secrets.APP_PRIVATE_KEY }}
2121
installation_id: 22958780
2222
- name: Get tag
2323
id: tag
24-
uses: dawidd6/action-get-tag@v1
25-
- uses: actions/checkout@v2
26-
- uses: ncipollo/release-action@v1
24+
uses: dawidd6/action-get-tag@727a6f0a561be04e09013531e73a3983a65e3479 # v1
25+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
26+
- uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1
2727
with:
2828
github_token: ${{ steps.github_app_token.outputs.token }}
2929
bodyFile: release-notes/opensearch-common-utils.release-notes-${{steps.tag.outputs.tag}}.md

.github/workflows/backport.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
steps:
2727
- name: GitHub App token
2828
id: github_app_token
29-
uses: tibdex/github-app-token@v2.1.0
29+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
3030
with:
3131
app_id: ${{ secrets.APP_ID }}
3232
private_key: ${{ secrets.APP_PRIVATE_KEY }}
3333
installation_id: 22958780
3434

3535
- name: Backport
36-
uses: VachaShah/backport@v2.2.0
36+
uses: VachaShah/backport@142d3b8a8c70dc54db515e653e5ed3c3fac64100 # v2.2.0
3737
with:
3838
github_token: ${{ steps.github_app_token.outputs.token }}
3939
head_template: backport/backport-<%= number %>-to-<%= base %>

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
Get-CI-Image-Tag:
12-
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
12+
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
1313
with:
1414
product: opensearch
1515

@@ -37,10 +37,10 @@ jobs:
3737
run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
3838

3939
- name: Checkout
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
4141

4242
- name: Setup Java ${{ matrix.java }}
43-
uses: actions/setup-java@v4
43+
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
4444
with:
4545
java-version: ${{ matrix.java }}
4646
distribution: 'temurin'
@@ -52,7 +52,7 @@ jobs:
5252
./gradlew publishToMavenLocal"
5353
5454
- name: Upload Coverage Report
55-
uses: codecov/codecov-action@v1
55+
uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192 # v1
5656
with:
5757
token: ${{ secrets.CODECOV_TOKEN }}
5858

@@ -67,10 +67,10 @@ jobs:
6767

6868
steps:
6969
- name: Checkout
70-
uses: actions/checkout@v3
70+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
7171

7272
- name: Setup Java ${{ matrix.java }}
73-
uses: actions/setup-java@v4
73+
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
7474
with:
7575
java-version: ${{ matrix.java }}
7676
distribution: 'temurin'
@@ -84,7 +84,7 @@ jobs:
8484
./gradlew publishToMavenLocal
8585
8686
- name: Upload Coverage Report
87-
uses: codecov/codecov-action@v1
87+
uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192 # v1
8888
with:
8989
token: ${{ secrets.CODECOV_TOKEN }}
9090

.github/workflows/delete_backport_branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: startsWith(github.event.pull_request.head.ref,'backport/') || startsWith(github.event.pull_request.head.ref,'release-chores/')
1313
steps:
1414
- name: Delete merged branch
15-
uses: actions/github-script@v7
15+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
1616
with:
1717
script: |
1818
github.rest.git.deleteRef({

.github/workflows/issue-dedupe.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
(github.event_name == 'issues' &&
2121
github.event.issue.user.type != 'Bot' &&
2222
github.repository == 'opensearch-project/common-utils')
23-
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-detect.yml@main
23+
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-detect.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
2424
permissions:
2525
contents: read
2626
issues: write
@@ -33,7 +33,7 @@ jobs:
3333

3434
auto-close-issue:
3535
if: github.event_name == 'schedule' && github.repository == 'opensearch-project/common-utils'
36-
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-autoclose.yml@main
36+
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-autoclose.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
3737
permissions:
3838
issues: write
3939
with:

.github/workflows/maven-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ jobs:
1919
contents: write
2020

2121
steps:
22-
- uses: actions/setup-java@v3
22+
- uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3
2323
with:
2424
distribution: temurin # Temurin is a distribution of adoptium
2525
java-version: 21
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
2727

2828
- name: Load secret
29-
uses: 1password/load-secrets-action@v2
29+
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2
3030
with:
3131
# Export loaded secrets as environment variables
3232
export-env: true
@@ -36,7 +36,7 @@ jobs:
3636
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role
3737

3838
- name: Configure AWS credentials
39-
uses: aws-actions/configure-aws-credentials@v5
39+
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5
4040
with:
4141
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
4242
aws-region: us-east-1

.github/workflows/pr_review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
Code-Diff-Analyzer:
9-
uses: opensearch-project/opensearch-build/.github/workflows/code-diff-analyzer.yml@main
9+
uses: opensearch-project/opensearch-build/.github/workflows/code-diff-analyzer.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
1010
if: github.repository == 'opensearch-project/common-utils'
1111
permissions:
1212
id-token: write # github oidc to assume aws roles
@@ -18,7 +18,7 @@ jobs:
1818
update_pr_comment_with_analyzer_report: true
1919

2020
Code-Diff-Reviewer:
21-
uses: opensearch-project/opensearch-build/.github/workflows/code-diff-reviewer.yml@main
21+
uses: opensearch-project/opensearch-build/.github/workflows/code-diff-reviewer.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
2222
needs: Code-Diff-Analyzer
2323
if: github.repository == 'opensearch-project/common-utils'
2424
permissions:

0 commit comments

Comments
 (0)