mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-11-16 09:22:00 +00:00
Some checks are pending
Devcontainer Smoke / Config-transform unit tests (push) Waiting to run
Devcontainer Smoke / Build devcontainer image (default) (push) Waiting to run
Devcontainer Smoke / Build devcontainer image (ui) (push) Waiting to run
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Publish Development Images / publish (core) (push) Waiting to run
Publish Development Images / publish (ui) (push) Waiting to run
Gitleaks / gitleaks (push) Waiting to run
Publish / Classify release event (push) Waiting to run
Publish / RC guard (marker + release-PR skip) (push) Blocked by required conditions
Publish / ci (push) Blocked by required conditions
Publish / Publish to npm (push) Blocked by required conditions
Publish / Build & Push RC Docker images (push) Blocked by required conditions
Scorecard / Scorecard analysis (push) Waiting to run
Trivy Image Scan / Trivy (gitnexus-cli) (push) Waiting to run
Trivy Image Scan / Trivy (gitnexus-web) (push) Waiting to run
* chore(deps): consolidate Dependabot updates * fix(deps): patch Hono and isolate setup tests Update @hono/node-server to 2.1.5 for GHSA-rmxm-3fg6-px4f. Clear inherited CODEX_HOME in the setup-selection fixture so setup stays inside its temporary home and cannot install hooks in the host config. Restore the inherited value after each case. Supersedes #3768. --------- Co-authored-by: Gergo Magyar <gergomagyar0@gmail.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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Buildx
|
|
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
|
|
|
- name: Build image (load locally for scan)
|
|
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.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@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
|
with:
|
|
sarif_file: trivy-${{ matrix.image.name }}.sarif
|
|
category: trivy-${{ matrix.image.name }}
|