Skip to content

Commit 915445f

Browse files
authored
Merge branch 'main' into dependabot/pip/contract-tests/tests/requests-2.32.4
2 parents c974de7 + 8661ac1 commit 915445f

File tree

4 files changed

+35
-6
lines changed

4 files changed

+35
-6
lines changed

.github/actions/artifacts_build/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,5 @@ runs:
103103
uses: ./.github/actions/image_scan
104104
with:
105105
image-ref: ${{ inputs.image_uri_with_tag }}
106-
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
106+
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
107+
logout: 'true'

.github/actions/image_scan/action.yml

Lines changed: 7 additions & 1 deletion
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

@@ -30,4 +36,4 @@ runs:
3036
with:
3137
image-ref: ${{ inputs.image-ref }}
3238
severity: ${{ inputs.severity }}
33-
exit-code: '1'
39+
exit-code: '1'

.github/workflows/daily-scan.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
name: Daily scan
99

1010
on:
11-
schedule:
12-
- cron: '0 18 * * *' # scheduled to run at 18:00 UTC every day
11+
schedule: # scheduled to run at 14:00, 20:00, 02:00 UTC every day
12+
- cron: '0 14 * * *' # 6:00/7:00 PST/PDT (14:00 UTC)
13+
- cron: '0 20 * * *' # 12:00/13:00 PST/PDT (20:00 UTC)
14+
- cron: '0 02 * * *' # 18:00/19:00 PST/PDT (02:00 UTC)
1315
workflow_dispatch: # be able to run the workflow on demand
1416

1517
env:
@@ -66,24 +68,35 @@ jobs:
6668
- name: Print dependency scan results on failure
6769
if: ${{ steps.dep_scan.outcome != 'success' }}
6870
run: less dependency-check-report.html
71+
72+
- name: Configure AWS credentials for image scan
73+
uses: aws-actions/configure-aws-credentials@v4
74+
with:
75+
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
76+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
77+
78+
- name: Login to Public ECR
79+
uses: docker/login-action@v3
80+
with:
81+
registry: public.ecr.aws
6982

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

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

88101
- name: Configure AWS Credentials for emitting metrics
89102
if: always()

.github/workflows/pr-build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ jobs:
3838
run: npm ci
3939
- name: Compile all NPM projects
4040
run: npm run compile
41+
- name: Build Tarball and Image Files
42+
uses: ./.github/actions/artifacts_build
43+
with:
44+
image_uri_with_tag: pr-build/${{ matrix.node }}
45+
push_image: false
46+
load_image: true
47+
node_version: ${{ matrix.node }}
48+
package_name: aws-distro-opentelemetry-node-autoinstrumentation
49+
os: ubuntu-latest
4150
- name: Build Lambda Layer
4251
run: npm run build-lambda
4352
- name: Unit tests (Full)

0 commit comments

Comments
 (0)