Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion .github/actions/artifacts_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,5 @@ runs:
uses: ./.github/actions/image_scan
with:
image-ref: ${{ inputs.image_uri_with_tag }}
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
logout: 'true'
8 changes: 7 additions & 1 deletion .github/actions/image_scan/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ inputs:
severity:
required: true
description: "List of severities that will cause a failure"
logout:
required: true
description: |
Whether to logout of public AWS ECR. Set to 'true' for PR workflows to avoid potential call failures,
'false' for daily scans which has a higher bar for passing regularly and specifically wants to sign in.

runs:
using: "composite"
Expand All @@ -22,6 +27,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 All @@ -30,4 +36,4 @@ runs:
with:
image-ref: ${{ inputs.image-ref }}
severity: ${{ inputs.severity }}
exit-code: '1'
exit-code: '1'
15 changes: 13 additions & 2 deletions .github/workflows/daily-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,35 @@ jobs:
- name: Print dependency scan results on failure
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

# TODO: Update image to public once available
- name: Perform high image scan
if: always()
id: high_scan
uses: ./.github/actions/image_scan
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.7.0"
severity: 'CRITICAL,HIGH'
logout: 'false'

# TODO: Update image to public once available
- name: Perform low image scan
if: always()
id: low_scan
uses: ./.github/actions/image_scan
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.7.0"
severity: 'MEDIUM,LOW,UNKNOWN'
logout: 'false'

- name: Configure AWS Credentials for emitting metrics
if: always()
Expand Down
Loading