mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-07 08:26:11 +00:00
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.3 to 4.35.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e46ed2cbd0...68bde559de)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 4.35.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
82 lines
2.6 KiB
YAML
82 lines
2.6 KiB
YAML
name: Trivy Image Scan
|
|
|
|
# Builds Dockerfile.cli and Dockerfile.web, then scans the resulting images
|
|
# for OS-package and language-package CVEs at MEDIUM+ severity.
|
|
# Findings upload to the Security tab; record-only (does not block merges).
|
|
#
|
|
# Trigger on Dockerfile changes in PRs so base-image/npm-layer remediation can
|
|
# be verified before merge without running image scans on every PR.
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'Dockerfile.cli'
|
|
- 'Dockerfile.web'
|
|
- 'gitnexus/Dockerfile.test'
|
|
- '.github/workflows/trivy.yml'
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: '0 8 * * 1'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
scan:
|
|
name: Trivy (${{ matrix.image.name }})
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
image:
|
|
- { dockerfile: Dockerfile.cli, name: gitnexus-cli }
|
|
- { dockerfile: Dockerfile.web, name: gitnexus-web }
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Buildx
|
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
|
|
|
- name: Build image (load locally for scan)
|
|
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
|
with:
|
|
context: .
|
|
file: ${{ matrix.image.dockerfile }}
|
|
load: true
|
|
push: false
|
|
tags: scan-target:${{ matrix.image.name }}
|
|
|
|
# aquasecurity/trivy-action versions < 0.35.0 are flagged by
|
|
# GHSA-69fq-xp46-6x23 (briefly compromised supply chain). Pinned to
|
|
# v0.36.0 (post-incident clean release) by commit SHA.
|
|
- name: Run Trivy
|
|
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
|
|
with:
|
|
image-ref: scan-target:${{ matrix.image.name }}
|
|
format: sarif
|
|
output: trivy-${{ matrix.image.name }}.sarif
|
|
severity: MEDIUM,HIGH,CRITICAL
|
|
# Hides CVEs with no available fix in the base image.
|
|
ignore-unfixed: true
|
|
exit-code: '0'
|
|
|
|
- name: Upload to Security tab
|
|
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
|
|
with:
|
|
sarif_file: trivy-${{ matrix.image.name }}.sarif
|
|
category: trivy-${{ matrix.image.name }}
|