-
Notifications
You must be signed in to change notification settings - Fork 7
Dockerfile #110
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
base: main
Are you sure you want to change the base?
Dockerfile #110
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
📦 Trivy Vulnerability Scan Results
Report Summary
Scan Result Details✅ No vulnerabilities found during the scan for |
📦 Trivy Secret Scan Results
Report Summary
Scan Result Details✅ No secrets found during the scan for |
.github/workflows/build-image.yaml
Outdated
| runs-on: ubuntu-latest | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.app }} | ||
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
| timeout-minutes: 20 | ||
| strategy: | ||
| matrix: | ||
| app: | ||
| - quickstart/ai_giphy | ||
| - quickstart/giphy | ||
| - quickstart/hello_world | ||
| - quickstart/polyglot | ||
| - connectors/mysql | ||
| - connectors/anaplan | ||
| - templates/generic | ||
|
|
||
| steps: | ||
| # Checkout current repo (your app) | ||
| - uses: actions/[email protected] | ||
| with: | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.ORG_PAT_GITHUB }} | ||
|
|
||
| # Checkout the private atlanhq/.github repo to a folder | ||
| - name: Checkout private action repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: atlanhq/.github | ||
| token: ${{ secrets.ORG_PAT_GITHUB }} | ||
| path: private_github | ||
|
|
||
| - name: Get branch name | ||
| run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | ||
| id: get_branch | ||
|
|
||
| - run: echo "REPOSITORY_NAME=`echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//"`" >> $GITHUB_ENV | ||
| shell: bash | ||
|
|
||
| - name: Get version tag | ||
| run: echo "version=$(echo `git ls-remote https://${{ secrets.ORG_PAT_GITHUB }}@github.com/atlanhq/${REPOSITORY_NAME}.git ${{ steps.get_branch.outputs.branch }} | awk '{ print $1}' | cut -c1-7`)abcd" >> $GITHUB_OUTPUT | ||
| id: get_version | ||
|
|
||
| - name: Lowercase branch name | ||
| run: echo "lowercase_branch=$(echo '${{ steps.get_branch.outputs.branch }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT | ||
| id: get_lowercase_branch | ||
|
|
||
| - name: Normalize app name for image tags | ||
| run: echo "app_name=$(echo '${{ matrix.app }}' | tr '/' '-')" >> $GITHUB_OUTPUT | ||
| id: get_app_name | ||
|
|
||
| - name: Set up Buildx | ||
| id: buildx | ||
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 | ||
|
|
||
| - name: Login to GitHub Registry | ||
| uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 | ||
| with: | ||
| registry: ghcr.io | ||
| username: $GITHUB_ACTOR | ||
| password: ${{ secrets.ORG_PAT_GITHUB }} | ||
|
|
||
| - name: Build and push docker image to GHCR | ||
| id: ghcr_docker_build | ||
| uses: ./private_github/.github/actions/secure-build-push-apps | ||
| with: | ||
| branch: ${{ github.ref_name }} | ||
| snyk-token: ${{ secrets.SNYK_TOKEN_BU_APPS }} | ||
| context: ./${{ matrix.app }} | ||
| file: ./${{ matrix.app }}/Dockerfile | ||
| push: true | ||
| platforms: linux/amd64,linux/arm64 | ||
| tags: | | ||
| ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_app_name.outputs.app_name }}-${{ steps.get_lowercase_branch.outputs.lowercase_branch }}:latest | ||
| ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_app_name.outputs.app_name }}-${{ steps.get_lowercase_branch.outputs.lowercase_branch }}:${{ steps.get_version.outputs.version }} | ||
| build-args: | | ||
| ACCESS_TOKEN_USR=$GITHUB_ACTOR | ||
| ACCESS_TOKEN_PWD=${{ secrets.ORG_PAT_GITHUB }} | ||
| env: | ||
| DOCKER_CLIENT_TIMEOUT: 600 | ||
| COMPOSE_HTTP_TIMEOUT: 600 | ||
|
|
||
| # Login to Docker Hub | ||
| - name: Login to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: atlanhq | ||
| password: ${{ secrets.DOCKER_HUB_PAT_RW }} | ||
|
|
||
| - name: Build and push docker image to Docker Hub | ||
| id: docker_build | ||
| uses: ./private_github/.github/actions/secure-build-push-apps | ||
| with: | ||
| branch: ${{ github.ref_name }} | ||
| snyk-token: ${{ secrets.SNYK_TOKEN_BU_APPS }} | ||
| context: ./${{ matrix.app }} | ||
| file: ./${{ matrix.app }}/Dockerfile | ||
| push: true | ||
| platforms: linux/amd64,linux/arm64 | ||
| tags: | | ||
| registry-1.docker.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_app_name.outputs.app_name }}:${{ steps.get_branch.outputs.branch }}-${{ steps.get_version.outputs.version }} | ||
| registry-1.docker.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_app_name.outputs.app_name }}:${{ steps.get_branch.outputs.branch }}-latest | ||
| env: | ||
| DOCKER_CLIENT_TIMEOUT: 300 | ||
| COMPOSE_HTTP_TIMEOUT: 300 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions
- lack of permissions on the token to upload the image. #42 exporting to image #42 pushing layers 0.8s done #42 ERROR: failed to push registry-1.docker.io/atlanhq/atlan-sample-apps-utilities-workflows_observability:dockerfile-b8daba8abcd: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://auth.docker.io/token?scope=repository%3Aatlanhq%2Fatlan-sample-apps-utilities-workflows_observability%3Apull%2Cpush&service=registry.docker.io: 401 Unauthorized: access token has insufficient scopes ------ > exporting to image: ------ ERROR: failed to build: failed to solve: failed to fetch oauth token: unexpected status from GET request to https://auth.docker.io/token?scope=repository%3Aatlanhq%2Fatlan-sample-apps-utilities-workflows_observability%3Apull%2Cpush&service=registry.docker.io: 401 Unauthorized: access token has insufficient scopes Reference Check build summary support Error: buildx failed with: ERROR: failed to build: failed to solve: failed to fetch oauth token: unexpected status from GET request to https://auth.docker.io/token?scope=repository%3Aatlanhq%2Fatlan-sample-apps-utilities-workflows_observability%3Apull%2Cpush&service=registry.docker.io: 401 Unauthorized: access token has insufficient scopes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Dockerfiles for multiple applications and establishes comprehensive CI/CD workflows including security scanning with Snyk and Trivy. The changes standardize containerization across quickstart examples, connectors, and utilities while introducing automated security checks.
- Adds standardized Dockerfiles across 9 applications using Chainguard base images with Dapr integration
- Implements GitHub Actions workflows for pre-commit checks, container scanning (Snyk/Trivy), and automated image builds
- Removes uv.lock from .gitignore for the polyglot quickstart
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 35 comments.
Show a summary per file
| File | Description |
|---|---|
| utilities/workflows_observability/Dockerfile | New Dockerfile with Python, uv, and Dapr 1.16.x setup |
| utilities/freshness_monitor/Dockerfile | New Dockerfile with Python, uv, and Dapr 1.16.x setup |
| utilities/asset_descriptor_reminder/Dockerfile | New Dockerfile with Python, uv, and Dapr 1.16.x setup |
| templates/generic/Dockerfile | Refactored to use application-sdk-chainguard-image base and Dapr 1.16.2 |
| quickstart/polyglot/Dockerfile | New Dockerfile with Python, uv, and Dapr 1.16.x setup |
| quickstart/polyglot/.gitignore | Removed uv.lock exclusion to track dependency locks |
| quickstart/hello_world/Dockerfile | New Dockerfile with Python, uv, and Dapr 1.16.x setup |
| quickstart/giphy/Dockerfile | New Dockerfile with Python, uv, and Dapr 1.16.x setup |
| quickstart/ai_giphy/Dockerfile | New Dockerfile with Python, uv, and Dapr 1.16.x setup |
| connectors/mysql/Dockerfile | New Dockerfile with Python, uv, and Dapr 1.16.x setup |
| connectors/anaplan/Dockerfile | New Dockerfile with Python, uv, and Dapr 1.16.x setup |
| .github/workflows/verify-snyk-status.yaml | Workflow to verify Snyk PR check status |
| .github/workflows/trivy-container.yaml | Reusable workflow for Trivy container scanning |
| .github/workflows/snyk-container-scan.yaml | Workflow for Snyk container scanning with Slack notifications |
| .github/workflows/schedule.yaml | Scheduled workflow for stale PR cleanup and Trivy scans |
| .github/workflows/docstring-coverage.yaml | Workflow to check docstring coverage on PRs |
| .github/workflows/commits.yaml | Workflow to validate conventional commit format |
| .github/workflows/checks.yaml | Pre-commit checks workflow with app discovery |
| .github/workflows/build-image.yaml | Multi-app Docker image build and push workflow |
| .github/actions/secure_build_push_apps/action.yaml | Composite action for building, scanning, and pushing Docker images with Snyk/Trivy |
Comments suppressed due to low confidence (10)
utilities/workflows_observability/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.3
quickstart/polyglot/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.3
connectors/anaplan/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.3
utilities/asset_descriptor_reminder/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.3
templates/generic/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.2
quickstart/hello_world/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.3
quickstart/ai_giphy/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.3
connectors/mysql/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.3
utilities/freshness_monitor/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.3
quickstart/giphy/Dockerfile:36
- Security concern: Downloading and executing a script directly from the internet without verification. Consider pinning the script to a specific commit hash or adding checksum verification to prevent potential supply chain attacks.
RUN curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | DAPR_INSTALL_DIR="/usr/local/bin" /bin/bash -s 1.16.3
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Typo in "SNYK_DOCKER_INTEGRATION_ID" gh secret
Changelog
Additional context (e.g. screenshots, logs, links)
Checklist