Skip to content

📌 Update VS Code to 1.98.1 #128

📌 Update VS Code to 1.98.1

📌 Update VS Code to 1.98.1 #128

Workflow file for this run

---
name: 🩻 Scan
on:
pull_request:
branches:
- main
schedule:
- cron: "0 10 * * 1-5" # Every weekday at 9AM UTC
permissions: {}
jobs:
scan:
name: Scan
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Clean Actions Runner
id: clean_actions_runner
uses: ministryofjustice/github-actions/clean-actions-runner@db1a54895bf5fb975c60af47e5a3aab96505ca3e # v18.6.0
with:
confirm: true
- name: Build
id: build
shell: bash
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}
IMAGE_TAG: ${{ github.sha }}
run: |
make build
- name: Generate .trivyignore
id: generate_trivyignore
shell: bash
run: |
imageVersion=$(grep "^FROM" Dockerfile | cut -d':' -f2 | cut -d'@' -f1)
curl --silent --show-error --location "https://raw.githubusercontent.com/ministryofjustice/analytical-platform-cloud-development-environment-base/refs/tags/${imageVersion}/.trivyignore" --output "analytical-platform-cloud-development-environment-base-trivyignore"
if [[ ! -f .trivyignore ]]; then
mv "analytical-platform-cloud-development-environment-base-trivyignore" .trivyignore
else
cat "analytical-platform-cloud-development-environment-base-trivyignore" >> .trivyignore
fi
- name: Scan
id: scan
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1
with:
image-ref: ghcr.io/${{ github.repository }}:${{ github.sha }}
severity: HIGH,CRITICAL
ignore-unfixed: true
exit-code: 1
- name: Slack CVE Alert
if: failure() && github.event_name == 'schedule' && steps.scan.outcome == 'failure'
id: slack_cve_alert
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
with:
webhook-type: incoming-webhook
webhook: ${{ secrets.CVE_SCAN_SLACK_WEBHOOK_URL }}
payload: |
{
"repository": "${{ github.repository }}",
"run_id": "${{ github.run_id }}"
}