Scan #1532
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Scan | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
env: | |
IMAGE_NAME: opendatacube/datacube-alchemist | |
jobs: | |
cve-scanner: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get unstable git tag | |
run: > | |
echo "UNSTABLE_TAG=$(git describe --tags)" >> $GITHUB_ENV | |
- name: Log the unstable tag | |
run: echo $UNSTABLE_TAG | |
- name: Build unstable + latest Docker image tag | |
if: github.event_name != 'release' | |
uses: whoan/[email protected] | |
with: | |
image_name: ${{ env.IMAGE_NAME }} | |
image_tag: ${{ env.UNSTABLE_TAG }},latest | |
build_extra_args: "--build-arg=ENVIRONMENT=deployment" | |
push_image_and_stages: false | |
- name: Run vulnerability scanner | |
if: github.event_name != 'release' | |
uses: aquasecurity/[email protected] | |
with: | |
image-ref: "${{ env.IMAGE_NAME }}:${{ env.UNSTABLE_TAG }}" | |
format: "table" | |
exit-code: "1" | |
severity: "CRITICAL,HIGH" | |
- name: Notify Slack for Failures | |
uses: rtCamp/[email protected] | |
if: failure() | |
env: | |
SLACK_CHANNEL: ga-wms-ops | |
SLACK_ICON: "https://github.com/docker.png?size=48" | |
SLACK_COLOR: "#482de1" | |
SLACK_MESSAGE: "" | |
SLACK_TITLE: CVE Scan alert | |
SLACK_USERNAME: Alchemist Scanner | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |