Skip to content

SecOps

SecOps #3

Workflow file for this run

---
name: SecOps
on:
workflow_call:
inputs:
image_tag:
description: image:tag
required: true
type: string
workflow_dispatch:
inputs:
image_tag:
description: image:tag
required: true
default: "ghcr.io/boehringer-ingelheim/r_4.3.2_cran_2024.01.12:2024.02.29"
type: string
jobs:
sec_ops:
name: SecOps
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Generate R pkg list ✏️
shell: bash
run: |
docker run -v ${PWD}:/app ${{ inputs.image_tag }} \
R -q -e '
rbind(c("|-", "-|"),
installed.packages()[, c("Package", "Version")]) |>
write.table(file = "/app/r-pkg-list.csv", row.names = FALSE, quote = FALSE, sep="|")'
cat /app/r-pkg-list.csv >> $GITHUB_STEP_SUMMARY
- name: Run Trivy vulnerability scanner ☢️
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ inputs.image_tag }}
exit-code: 0
ignore-unfixed: true
vuln-type: "os,library"
severity: "CRITICAL,HIGH,MEDIUM"
format: "sarif"
output: "trivy-results.sarif"
timeout: 30m0s
- name: Upload Trivy scan results to GitHub Security tab 📜
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"