Skip to content

Commit 05f35c1

Browse files
ci: add git secrets scanning to CI (runfinch#879)
Issue #, if available: Contributors can accidentally secrets to version control. *Description of changes:* This change adds git secrets scanning to CI to validate secrets are not submitted to version control. *Testing done:* CI is successful - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Austin Vazquez <[email protected]>
1 parent e1cbd0a commit 05f35c1

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

Diff for: .github/workflows/ci-docs.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,25 @@ on:
2525
- '.github/CODEOWNERS'
2626

2727
jobs:
28+
git-secrets:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Pull latest awslabs/git-secrets repo
32+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
33+
with:
34+
repository: awslabs/git-secrets
35+
ref: 1.3.0
36+
fetch-tags: true
37+
path: git-secrets
38+
- name: Install git secrets from source
39+
run: sudo make install
40+
working-directory: git-secrets
41+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
42+
- name: Scan repository for git secrets
43+
run: |
44+
git secrets --register-aws
45+
git secrets --scan-history
46+
2847
gen-code-no-diff:
2948
runs-on: ubuntu-latest
3049
steps:

Diff for: .github/workflows/ci.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,25 @@ concurrency:
2828
cancel-in-progress: true
2929

3030
jobs:
31+
git-secrets:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Pull latest awslabs/git-secrets repo
35+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
36+
with:
37+
repository: awslabs/git-secrets
38+
ref: 1.3.0
39+
fetch-tags: true
40+
path: git-secrets
41+
- name: Install git secrets from source
42+
run: sudo make install
43+
working-directory: git-secrets
44+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
45+
- name: Scan repository for git secrets
46+
run: |
47+
git secrets --register-aws
48+
git secrets --scan-history
49+
3150
gen-code-no-diff:
3251
strategy:
3352
matrix:

0 commit comments

Comments
 (0)