lint/.github/workflows/trivy.yml
dependabot[bot] 5d5ae35998 Bump actions/checkout from 2.4.0 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 12:53:35 -05:00

47 lines
1.3 KiB
YAML

# Disabling trivy scans while they get troubleshooting for failures
---
name: Trivy Container Scan
on:
push:
branches:
- main
pull_request:
jobs:
scan-container:
name: Build
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
######################
# Checkout code base #
######################
- name: Checkout code
uses: actions/checkout@v3
# ##########################
# # Build the docker image #
# ##########################
- name: Build an image from Dockerfile
run: |
docker build -t "docker.io/github/super-linter:${{ github.sha }}" .
#################################
# Run Trivy Scan of source code #
#################################
- name: Trivy Scan
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'report.sarif'
severity: 'HIGH,CRITICAL'
#################################
# Upload report to security tab #
#################################
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v1
if: always()
with:
sarif_file: 'report.sarif'