mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-23 16:08:09 +03:00
fix: update Bun base image and enhance security scanning
- Update Bun from 1.2.14 to 1.2.18 to address CVE-2025-22874 - Pin Trivy action to stable version (0.28.0) - Add SARIF output for GitHub Security tab integration - Set ignore-unfixed to false for comprehensive vulnerability detection - Add security-events permission for uploading scan results - Include fallback table output on scan failures
This commit is contained in:
25
.github/workflows/docker-scan.yml
vendored
25
.github/workflows/docker-scan.yml
vendored
@@ -21,6 +21,7 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
actions: read
|
actions: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
scan:
|
scan:
|
||||||
@@ -47,11 +48,29 @@ jobs:
|
|||||||
no-cache: true
|
no-cache: true
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner
|
- name: Run Trivy vulnerability scanner
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@0.28.0
|
||||||
|
with:
|
||||||
|
image-ref: gitea-mirror:scan
|
||||||
|
format: 'sarif'
|
||||||
|
output: 'trivy-results.sarif'
|
||||||
|
exit-code: '1'
|
||||||
|
ignore-unfixed: false
|
||||||
|
vuln-type: 'os,library'
|
||||||
|
severity: 'CRITICAL,HIGH'
|
||||||
|
|
||||||
|
- name: Upload Trivy scan results to GitHub Security tab
|
||||||
|
uses: github/codeql-action/upload-sarif@v3
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
sarif_file: 'trivy-results.sarif'
|
||||||
|
|
||||||
|
- name: Run Trivy vulnerability scanner (table output)
|
||||||
|
uses: aquasecurity/trivy-action@0.28.0
|
||||||
|
if: failure()
|
||||||
with:
|
with:
|
||||||
image-ref: gitea-mirror:scan
|
image-ref: gitea-mirror:scan
|
||||||
format: 'table'
|
format: 'table'
|
||||||
exit-code: '1'
|
exit-code: '0'
|
||||||
ignore-unfixed: true
|
ignore-unfixed: false
|
||||||
vuln-type: 'os,library'
|
vuln-type: 'os,library'
|
||||||
severity: 'CRITICAL,HIGH'
|
severity: 'CRITICAL,HIGH'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# syntax=docker/dockerfile:1.4
|
# syntax=docker/dockerfile:1.4
|
||||||
|
|
||||||
FROM oven/bun:1.2.14-alpine AS base
|
FROM oven/bun:1.2.18-alpine AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apk add --no-cache libc6-compat python3 make g++ gcc wget sqlite openssl
|
RUN apk add --no-cache libc6-compat python3 make g++ gcc wget sqlite openssl
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user