Skip to content

Commit

Permalink
Introduce vulnerability scanner that fails PRs on critical vulnerabil…
Browse files Browse the repository at this point in the history
…ities (#16028)

This github action leverages https://github.com/anchore/grype to scan a tarball artifact
  • Loading branch information
jsvd authored Mar 27, 2024
1 parent 96e4838 commit e8597cb
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/critical_vulnerability_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Scan for vulnerabilities

on:
pull_request_target:
types: [opened, synchronize]
workflow_dispatch:

jobs:
scan_image:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: build tar distribution
run: ./gradlew clean assembleTarDistribution
- run: mkdir scan
- run: tar -zxf ../build/logstash-*.tar.gz
working-directory: ./scan
- name: scan image
uses: anchore/scan-action@v3
with:
path: "./scan"
fail-build: true
severity-cutoff: critical

0 comments on commit e8597cb

Please sign in to comment.