Skip to content
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

[DDO-3793] Weekly Container Scan #612

Merged
merged 6 commits into from
Jul 25, 2024
Merged
Changes from 5 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
44 changes: 44 additions & 0 deletions .github/workflows/sherlock-container-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Standalone Sherlock Trivy Scan
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to scan'
required: false
type: string
default: 'latest'
schedule:
- cron: '0 0 * * 0'

jobs:
scan:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Auth to GCP
id: auth
uses: google-github-actions/auth@v2
with:
token_format: access_token
workload_identity_provider: projects/1038484894585/locations/global/workloadIdentityPools/github-wi-pool/providers/github-wi-provider
service_account: dsp-artifact-registry-push@dsp-artifact-registry.iam.gserviceaccount.com

- name: Login to GAR
uses: docker/login-action@v3
with:
registry: us-central1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: Run Trivy vulnerability scanner
uses: broadinstitute/dsp-appsec-trivy-action@v1
with:
image: us-central1-docker.pkg.dev/dsp-artifact-registry/sherlock/sherlock:${{ inputs.tag || 'latest' }}

report-workflow:
uses: ./.github/workflows/client-report-workflow.yaml
with:
notify-slack-channels-upon-workflow-failure: "#trivy-weekly-scans-notblessedimages"
permissions:
id-token: write
Loading