Skip to content

Commit 637c0f7

Browse files
authored
Merge branch 'main' into dependabot/gradle/org.testcontainers-mysql-1.20.3
2 parents ed9b314 + d471c70 commit 637c0f7

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.github/actions/image_scan/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ inputs:
1111
severity:
1212
required: true
1313
description: "List of severities that will cause a failure"
14+
logout:
15+
required: true
16+
description: |
17+
Whether to logout of public AWS ECR. Set to 'true' for PR workflows to avoid potential call failures,
18+
'false' for daily scans which has a higher bar for passing regularly and specifically wants to sign in.
1419
1520
runs:
1621
using: "composite"
@@ -22,6 +27,7 @@ runs:
2227
# ensure we can make unauthenticated call. This is important for making the pr_build workflow run on
2328
# PRs created from forked repos.
2429
- name: Logout of public AWS ECR
30+
if: inputs.logout == 'true'
2531
shell: bash
2632
run: docker logout public.ecr.aws
2733

.github/workflows/owasp.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,25 @@ jobs:
7878
if: ${{ steps.dep_scan.outcome != 'success' }}
7979
run: less dependency-check-report.html
8080

81+
- name: Configure AWS credentials for image scan
82+
uses: aws-actions/configure-aws-credentials@v4
83+
with:
84+
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
85+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
86+
87+
- name: Login to Public ECR
88+
uses: docker/login-action@v3
89+
with:
90+
registry: public.ecr.aws
91+
8192
- name: Perform high image scan on v1
8293
if: always()
8394
id: high_scan_v1
8495
uses: ./.github/actions/image_scan
8596
with:
8697
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.33.0"
8798
severity: 'CRITICAL,HIGH'
99+
logout: 'false'
88100

89101
- name: Perform low image scan on v1
90102
if: always()
@@ -93,6 +105,7 @@ jobs:
93105
with:
94106
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.33.0"
95107
severity: 'MEDIUM,LOW,UNKNOWN'
108+
logout: 'false'
96109

97110
- name: Perform high image scan on v2
98111
if: always()
@@ -101,6 +114,7 @@ jobs:
101114
with:
102115
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.11.2"
103116
severity: 'CRITICAL,HIGH'
117+
logout: 'false'
104118

105119
- name: Perform low image scan on v2
106120
if: always()
@@ -109,6 +123,7 @@ jobs:
109123
with:
110124
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.11.2"
111125
severity: 'MEDIUM,LOW,UNKNOWN'
126+
logout: 'false'
112127

113128
- name: Configure AWS Credentials for emitting metrics
114129
if: always()

.github/workflows/pr-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147
with:
148148
image-ref: ${{ env.TEST_TAG }}
149149
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
150+
logout: 'true'
150151

151152
- name: Test docker image
152153
if: ${{ matrix.os == 'ubuntu-latest' }}

0 commit comments

Comments
 (0)