Skip to content

Commit

Permalink
Merge pull request #6 from dockersamples/evaluate-scout-policy-breakage
Browse files Browse the repository at this point in the history
Downgrade app to introduce vulnerabilities (testing CI pipeline)
  • Loading branch information
mikesir87 authored Dec 19, 2024
2 parents 0a05938 + 1f4dca4 commit 20a0dae
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/pipeline-docker-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up containerd
uses: docker/setup-docker-action@v4
with:
set-host: true
daemon-config: |
{
"features": {
"containerd-snapshotter": true
}
}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -128,8 +139,8 @@ jobs:
with:
context: .
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
provenance: ${{ github.event_name != 'pull_request' && 'mode=max' }}
sbom: ${{ github.event_name != 'pull_request' && true }}
provenance: mode=max
sbom: true
push: ${{ github.event_name != 'pull_request' }}
load: ${{ github.event_name == 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -144,6 +155,8 @@ jobs:
to-env: production
write-comment: true
organization: ${{ env.DOCKERHUB_ORG_NAME }}
# TODO Update this to include policy once DBC image loading includes attestations
exit-on: vulnerability

stage-deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/pipeline-gha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up containerd
uses: docker/setup-docker-action@v4
with:
set-host: true
daemon-config: |
{
"features": {
"containerd-snapshotter": true
}
}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -118,8 +129,8 @@ jobs:
with:
context: .
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
provenance: ${{ github.event_name != 'pull_request' && 'mode=max' }}
sbom: ${{ github.event_name != 'pull_request' && true }}
provenance: mode=max
sbom: true
push: ${{ github.event_name != 'pull_request' }}
load: ${{ github.event_name == 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -134,6 +145,8 @@ jobs:
to-env: production
write-comment: false # Disabling this one since this is a duplicate workflow
organization: ${{ env.DOCKERHUB_ORG_NAME }}
# TODO Update this to include policy once DBC image loading includes attestations
exit-on: vulnerability

stage-deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down

0 comments on commit 20a0dae

Please sign in to comment.