Skip to content

Add image scan to pr-build and main-build workflows #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

liustve
Copy link
Contributor

@liustve liustve commented Aug 14, 2025

Description of changes:

  • Adds scanning to the ADOT Docker image created in build-x64-musl and build-arm-musl steps.

  • Adds a few exclusions to the image_scan action for dependencies and tools used to build the local ADOT image. These dependencies are only present in the PR and Main build workflows, so only the actual local ADOT image that we will eventually release is scanned, and not the SDKs and tools used to build the image itself. This parities with the existing daily_scan workflow, which only scans the public ADOT ECR image that is published.

  • Rename the local images built to reflect a more accurate name for the Docker image.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@liustve liustve requested a review from a team as a code owner August 14, 2025 00:13
@liustve liustve changed the title test Add image scan to pr-build and main-build workflows Aug 14, 2025
Copy link
Contributor

@thpierce thpierce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -37,3 +37,5 @@ runs:
image-ref: ${{ inputs.image-ref }}
severity: ${{ inputs.severity }}
exit-code: '1'
skip-dirs: '/usr/share/dotnet,/usr/share/powershell'
skip-files: '*.deps.json'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems broad, why are we sure this is ok?

@@ -93,10 +93,19 @@ jobs:
- name: Build in Docker container
run: |
set -e
docker build -t mybuildimage -f "./docker/alpine.dockerfile" ./docker
docker run --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \
IMAGE_NAME=main-build/dotnet-$(dotnet --version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm in other languages we:
a) Name the image differently (${{ env.STAGING_ECR_REGISTRY }}/${{ env.STAGING_ECR_REPOSITORY }}:$pkg_version-$shortsha" ) - https://github.com/aws-observability/aws-otel-python-instrumentation/blob/main/.github/workflows/main-build.yml#L50
b) use the image in application-signals-e2e-test - https://github.com/aws-observability/aws-otel-python-instrumentation/blob/main/.github/workflows/main-build.yml#L111

Thoughts
a) seems somewhat minor, but maybe align for parity
b) is much more concerning. Are we even running E2E tests on the build artifact?

@liustve liustve force-pushed the add-image-scan-pr-workflow branch from 5cb89fd to 8e968a6 Compare August 16, 2025 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants