Skip to content

security: clear all 194 Dependabot alerts, fix CI scanner failures, pin Go 1.26.5 #46

security: clear all 194 Dependabot alerts, fix CI scanner failures, pin Go 1.26.5

security: clear all 194 Dependabot alerts, fix CI scanner failures, pin Go 1.26.5 #46

Workflow file for this run

name: Security Scan
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 6 * * 1' # Weekly Monday 6am UTC
workflow_dispatch:
env:
GO_VERSION: '1.26'
jobs:
# ── Go vulnerability check ─────────────────────────────────────
govulncheck:
name: govulncheck (${{ matrix.module }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- internal/events
- internal/httpclient
- internal/nats
- internal/telemetry
- internal/certauth
- internal/ap2
- aex-gateway
- aex-work-publisher
- aex-bid-gateway
- aex-bid-evaluator
- aex-contract-engine
- aex-provider-registry
- aex-trust-broker
- aex-identity
- aex-settlement
- aex-certauth
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: src/${{ matrix.module }}/go.sum
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
working-directory: src/${{ matrix.module }}
run: govulncheck ./...
# ── Docker image vulnerability scan ────────────────────────────
trivy-scan:
name: Trivy (${{ matrix.service }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
service:
- aex-gateway
- aex-work-publisher
- aex-bid-gateway
- aex-bid-evaluator
- aex-contract-engine
- aex-provider-registry
- aex-trust-broker
- aex-identity
- aex-settlement
- aex-certauth
steps:
- uses: actions/checkout@v7
- name: Build Docker image
run: |
docker build \
-f src/${{ matrix.service }}/Dockerfile \
-t ${{ matrix.service }}:scan \
src/
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ matrix.service }}:scan'
format: 'table'
exit-code: '1'
severity: 'CRITICAL,HIGH'
ignore-unfixed: true
# ── Summary gate ────────────────────────────────────────────────
security-pass:
name: Security Pass
needs: [govulncheck, trivy-scan]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check results
run: |
if [ "${{ needs.govulncheck.result }}" != "success" ] || [ "${{ needs.trivy-scan.result }}" != "success" ]; then
echo "Security scan failed: govulncheck=${{ needs.govulncheck.result }}, trivy=${{ needs.trivy-scan.result }}"
exit 1
fi
echo "All security scans passed"