generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.36 KB
/
aws_secret_mask_testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: GHACodebuildRunnerSecretTesting
# this is a test of masking a block of secrets in a custom action.
# all code seems to work as expected, but in the caller workflow, secrets still
# show in logs as unmasked.
on:
pull_request:
branches: [main]
jobs:
test1:
runs-on:
- codebuild-cfpb-regtech-gha-test-1-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: Checkout To Path
uses: actions/checkout@v4
with:
repository: 'cfpb/regtech-deployments'
ref: 'test/gha-codebuild-runner'
path: 'testing-action'
- name: Mask Secrets Bulk
id: mask-secrets-bulk
uses: ./testing-action/.github/actions/mask_secrets_bulk
with:
secrets: |
TEST_SECRET_1,cfpb/team/regtech/gha-codebuild-runner/test-secret-1
TEST_SECRET_2,cfpb/team/regtech/gha-codebuild-runner/test-secret-2
TEST_SECRET_3,arn:aws:secretsmanager:us-east-1:099248080076:secret:cfpb/team/regtech/gha-codebuild-runner/test-secret-3-9lVad8
- name: check aws secrets
id: check-aws-secrets
run: |
echo -e "show test-secret-1 ${{ env.TEST_SECRET_1 }}"
echo -e "show test-secret-2 ${{ env.TEST_SECRET_2 }}"
echo -e "show test-secret-3 ${{ env.TEST_SECRET_3 }}"