Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/image_scan/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
severity:
required: true
description: "List of severities that will cause a failure"
logout:
required: true
description: "Whether to logout of public AWS ECR"

runs:
using: "composite"
Expand All @@ -22,6 +25,7 @@ runs:
# ensure we can make unauthenticated call. This is important for making the pr_build workflow run on
# PRs created from forked repos.
- name: Logout of public AWS ECR
if: inputs.logout == 'true'
shell: bash
run: docker logout public.ecr.aws

Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/owasp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,25 @@ jobs:
if: ${{ steps.dep_scan.outcome != 'success' }}
run: less dependency-check-report.html

- name: Configure AWS credentials for image scan
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- name: Login to Public ECR
uses: docker/login-action@v3
with:
registry: public.ecr.aws

- name: Perform high image scan on v1
if: always()
id: high_scan_v1
uses: ./.github/actions/image_scan
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.33.0"
severity: 'CRITICAL,HIGH'
logout: 'false'

- name: Perform low image scan on v1
if: always()
Expand All @@ -91,6 +103,7 @@ jobs:
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.33.0"
severity: 'MEDIUM,LOW,UNKNOWN'
logout: 'false'

- name: Perform high image scan on v2
if: always()
Expand All @@ -99,6 +112,7 @@ jobs:
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.11.1"
severity: 'CRITICAL,HIGH'
logout: 'false'

- name: Perform low image scan on v2
if: always()
Expand All @@ -107,6 +121,7 @@ jobs:
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.11.1"
severity: 'MEDIUM,LOW,UNKNOWN'
logout: 'false'

- name: Configure AWS Credentials for emitting metrics
if: always()
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ jobs:
with:
image-ref: ${{ env.TEST_TAG }}
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
logout: 'true'

- name: Test docker image
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
Loading