diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 561319ee2e3..4c3ea3d5762 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,12 +114,7 @@ jobs: docker-build: name: docker-build (${{ matrix.arch }}, ${{ matrix.repo }}) runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} - needs: [determine-release-type, generate-code] - outputs: - digest-amd64-rolling: ${{ steps.digest.outputs.digest-amd64-rolling }} - digest-arm64-rolling: ${{ steps.digest.outputs.digest-arm64-rolling }} - digest-amd64: ${{ steps.digest.outputs.digest-amd64 }} - digest-arm64: ${{ steps.digest.outputs.digest-arm64 }} + needs: [determine-release-type, generate-code, security-scan-trivy] strategy: matrix: arch: [amd64, arm64] @@ -162,17 +157,34 @@ jobs: context: ocis file: ocis/docker/Dockerfile.linux.${{ matrix.arch }} platforms: linux/${{ matrix.arch }} - push: true + load: true + push: false provenance: false build-args: | REVISION=${{ github.sha }} VERSION=${{ needs.determine-release-type.outputs.version }} tags: ${{ steps.tags.outputs.tags }} - - id: digest + - id: trivy + uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0 + continue-on-error: true + with: + image-ref: ${{ steps.tags.outputs.tags }} + format: table + exit-code: 1 + severity: HIGH,CRITICAL + ignore-unfixed: true + skip-files: /usr/bin/gomplate,/usr/bin/wait-for + hide-progress: true + env: + TRIVY_IGNOREFILE: .trivyignore + - name: Block on vulnerabilities + if: steps.trivy.outcome == 'failure' run: | - [[ "${{ matrix.repo }}" == *"rolling"* ]] \ - && echo "digest-${{ matrix.arch }}-rolling=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT \ - || echo "digest-${{ matrix.arch }}=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT + echo "::error title=Security scan blocked release::Image ${{ steps.tags.outputs.tags }} has HIGH or CRITICAL vulnerabilities (see Trivy report above). Fix all findings before releasing." + exit 1 + - name: push + if: steps.trivy.outcome == 'success' + run: docker push ${{ steps.tags.outputs.tags }} docker-scan: name: docker-scan (${{ matrix.arch }}, ${{ matrix.repo }}) @@ -207,7 +219,7 @@ jobs: docker-manifest: name: docker-manifest (${{ matrix.repo }}) runs-on: ubuntu-latest - needs: [determine-release-type, docker-build] + needs: [determine-release-type, docker-build, docker-scan] strategy: matrix: repo: ${{ fromJSON(needs.determine-release-type.outputs.docker_repos) }} @@ -220,14 +232,14 @@ jobs: run: | docker buildx imagetools create \ -t "${{ matrix.repo }}:${{ needs.determine-release-type.outputs.version }}" \ - "${{ needs.docker-build.outputs.digest-amd64-rolling }}" \ - "${{ needs.docker-build.outputs.digest-arm64-rolling }}" + "${{ matrix.repo }}:${{ needs.determine-release-type.outputs.version }}-linux-amd64" \ + "${{ matrix.repo }}:${{ needs.determine-release-type.outputs.version }}-linux-arm64" - if: ${{ !contains(matrix.repo, 'rolling') }} run: | docker buildx imagetools create \ -t "${{ matrix.repo }}:${{ needs.determine-release-type.outputs.version }}" \ - "${{ needs.docker-build.outputs.digest-amd64 }}" \ - "${{ needs.docker-build.outputs.digest-arm64 }}" + "${{ matrix.repo }}:${{ needs.determine-release-type.outputs.version }}-linux-amd64" \ + "${{ matrix.repo }}:${{ needs.determine-release-type.outputs.version }}-linux-arm64" docker-readme: name: docker-readme (${{ matrix.repo }}) @@ -281,8 +293,9 @@ jobs: with: scan-type: fs format: table - exit-code: 0 + exit-code: 1 severity: CRITICAL,HIGH + trivy-config: .trivy.yaml license-check: runs-on: ubuntu-latest @@ -334,7 +347,7 @@ jobs: create-github-release: runs-on: ubuntu-latest - needs: [determine-release-type, build-binaries, license-check, generate-changelog] + needs: [determine-release-type, build-binaries, license-check, generate-changelog, security-scan-trivy, docker-readme] steps: - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: diff --git a/.trivy.yaml b/.trivy.yaml new file mode 100644 index 00000000000..121971acbe7 --- /dev/null +++ b/.trivy.yaml @@ -0,0 +1,3 @@ +scan: + skip-files: + - vendor/github.com/crewjam/saml/xmlenc/fuzz.go diff --git a/.trivyignore b/.trivyignore index 446e17a518f..8bd2a742019 100644 --- a/.trivyignore +++ b/.trivyignore @@ -2,10 +2,5 @@ # Add CVE IDs or file paths here to suppress known/accepted findings. # See: https://aquasecurity.github.io/trivy/latest/docs/configuration/filtering/#trivyignore -# Alpine 3.23.3 ships vulnerable package versions; no fixed base image exists yet. -# Fix: bump FROM alpine:3.23.3 → alpine:3.23.4 once released, or add -# RUN apk upgrade --no-cache -# to Dockerfile.linux.amd64 and Dockerfile.linux.arm64. -CVE-2026-28390 # libcrypto3/libssl3 3.5.5-r0 → fixed in 3.5.6-r0 (openssl DoS) -CVE-2026-22184 # zlib 1.3.1-r2 → fixed in 1.3.2-r0 (buffer overflow in untgz) -CVE-2026-40200 # musl/musl-utils 1.2.5-r21 → fixed in 1.2.5-r23 (stack-based arbitrary code execution / DoS) +CVE-2026-32284 # github.com/shamaton/msgpack/v2 v2.4.0 — no fix available upstream +vendor/github.com/crewjam/saml/xmlenc/fuzz.go # test RSA key used in fuzz corpus, not a real secret diff --git a/ocis/docker/Dockerfile.linux.amd64 b/ocis/docker/Dockerfile.linux.amd64 index 7521e962cdd..3ce26f8c75e 100644 --- a/ocis/docker/Dockerfile.linux.amd64 +++ b/ocis/docker/Dockerfile.linux.amd64 @@ -3,7 +3,8 @@ FROM amd64/alpine:3.23.4 ARG VERSION="" ARG REVISION="" -RUN apk add --no-cache attr bash ca-certificates curl inotify-tools libc6-compat mailcap tree patch \ +RUN apk upgrade --no-cache \ + && apk add --no-cache attr bash ca-certificates curl inotify-tools libc6-compat mailcap tree patch \ && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community "vips=8.18.2-r0" \ && echo 'hosts: files dns' >| /etc/nsswitch.conf diff --git a/ocis/docker/Dockerfile.linux.arm64 b/ocis/docker/Dockerfile.linux.arm64 index 707d19f6c81..79e8acfd0a6 100644 --- a/ocis/docker/Dockerfile.linux.arm64 +++ b/ocis/docker/Dockerfile.linux.arm64 @@ -3,7 +3,8 @@ FROM arm64v8/alpine:3.23.4 ARG VERSION="" ARG REVISION="" -RUN apk add --no-cache attr bash ca-certificates curl inotify-tools libc6-compat mailcap tree patch \ +RUN apk upgrade --no-cache \ + && apk add --no-cache attr bash ca-certificates curl inotify-tools libc6-compat mailcap tree patch \ && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community "vips=8.18.2-r0" \ && echo 'hosts: files dns' >| /etc/nsswitch.conf diff --git a/ocis/docker/Dockerfile.linux.debug.amd64 b/ocis/docker/Dockerfile.linux.debug.amd64 index b79cdf0bdf1..b21beafe707 100644 --- a/ocis/docker/Dockerfile.linux.debug.amd64 +++ b/ocis/docker/Dockerfile.linux.debug.amd64 @@ -3,7 +3,8 @@ FROM amd64/alpine:latest ARG VERSION="" ARG REVISION="" -RUN apk add --no-cache attr bash ca-certificates curl delve inotify-tools libc6-compat mailcap tree patch \ +RUN apk upgrade --no-cache \ + && apk add --no-cache attr bash ca-certificates curl delve inotify-tools libc6-compat mailcap tree patch \ && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community "vips=8.18.2-r0" \ && echo 'hosts: files dns' >| /etc/nsswitch.conf diff --git a/ocis/docker/Dockerfile.linux.debug.arm64 b/ocis/docker/Dockerfile.linux.debug.arm64 index def9f471cd3..b522a72b0c3 100644 --- a/ocis/docker/Dockerfile.linux.debug.arm64 +++ b/ocis/docker/Dockerfile.linux.debug.arm64 @@ -3,7 +3,8 @@ FROM arm64v8/alpine:latest ARG VERSION="" ARG REVISION="" -RUN apk add --no-cache attr bash ca-certificates curl delve inotify-tools libc6-compat mailcap tree patch \ +RUN apk upgrade --no-cache \ + && apk add --no-cache attr bash ca-certificates curl delve inotify-tools libc6-compat mailcap tree patch \ && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community "vips=8.18.2-r0" \ && echo 'hosts: files dns' >| /etc/nsswitch.conf diff --git a/services/idp/package.json b/services/idp/package.json index 4b1d24a5160..3034b1ec82a 100644 --- a/services/idp/package.json +++ b/services/idp/package.json @@ -16,7 +16,12 @@ }, "babel": { "presets": [ - ["react-app", { "absoluteRuntime": false }] + [ + "react-app", + { + "absoluteRuntime": false + } + ] ] }, "browserslist": { @@ -83,7 +88,7 @@ "@types/react-dom": "^17.0.26", "@types/react-redux": "^7.1.34", "@types/redux-logger": "^3.0.13", - "axios": "^1.15.0", + "axios": "^1.16.1", "classnames": "^2.5.1", "form-data": "4.0.4", "i18next": "^23.16.8", diff --git a/services/idp/pnpm-lock.yaml b/services/idp/pnpm-lock.yaml index 218f75b88c1..1b29f8e4eca 100644 --- a/services/idp/pnpm-lock.yaml +++ b/services/idp/pnpm-lock.yaml @@ -67,8 +67,8 @@ importers: specifier: ^3.0.13 version: 3.0.13 axios: - specifier: ^1.15.0 - version: 1.15.1 + specifier: ^1.16.1 + version: 1.16.1 classnames: specifier: ^2.5.1 version: 2.5.1 @@ -2558,6 +2558,10 @@ packages: resolution: {integrity: sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==} engines: {node: '>=8.9'} + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -2710,8 +2714,8 @@ packages: resolution: {integrity: sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==} engines: {node: '>=4'} - axios@1.15.1: - resolution: {integrity: sha512-WOG+Jj8ZOvR0a3rAn+Tuf1UQJRxw5venr6DgdbJzngJE3qG7X0kL83CZGpdHMxEm+ZK3seAbvFsw4FfOfP9vxg==} + axios@1.16.1: + resolution: {integrity: sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A==} axobject-query@4.1.0: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} @@ -4050,6 +4054,10 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + hasown@2.0.3: + resolution: {integrity: sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==} + engines: {node: '>= 0.4'} + he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true @@ -4099,6 +4107,10 @@ packages: htmlparser2@9.1.0: resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -8256,7 +8268,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.14.0 - debug: 4.4.3 + debug: 4.3.5 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.2 @@ -8326,7 +8338,7 @@ snapshots: '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.4.3 + debug: 4.3.5 minimatch: 3.1.3 transitivePeerDependencies: - supports-color @@ -9418,6 +9430,12 @@ snapshots: loader-utils: 2.0.4 regex-parser: 2.3.0 + agent-base@6.0.2: + dependencies: + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + ajv-formats@2.1.1(ajv@8.18.0): optionalDependencies: ajv: 8.18.0 @@ -9592,13 +9610,15 @@ snapshots: axe-core@4.10.3: {} - axios@1.15.1: + axios@1.16.1: dependencies: follow-redirects: 1.16.0 form-data: 4.0.5 + https-proxy-agent: 5.0.1 proxy-from-env: 2.1.0 transitivePeerDependencies: - debug + - supports-color axobject-query@4.1.0: {} @@ -10610,7 +10630,7 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.3.0 has-tostringtag: 1.0.2 - hasown: 2.0.2 + hasown: 2.0.3 es-shim-unscopables@1.1.0: dependencies: @@ -11134,7 +11154,7 @@ snapshots: asynckit: 0.4.0 combined-stream: 1.0.8 es-set-tostringtag: 2.1.0 - hasown: 2.0.2 + hasown: 2.0.3 mime-types: 2.1.35 fraction.js@4.3.7: {} @@ -11215,7 +11235,7 @@ snapshots: get-proto: 1.0.1 gopd: 1.2.0 has-symbols: 1.1.0 - hasown: 2.0.2 + hasown: 2.0.3 math-intrinsics: 1.1.0 get-own-enumerable-property-symbols@3.0.2: {} @@ -11350,6 +11370,10 @@ snapshots: dependencies: function-bind: 1.1.2 + hasown@2.0.3: + dependencies: + function-bind: 1.1.2 + he@1.2.0: {} heimdalljs-logger@0.1.10: @@ -11420,6 +11444,13 @@ snapshots: domutils: 3.1.0 entities: 4.5.0 + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + human-signals@2.1.0: {} hyphenate-style-name@1.1.0: {} @@ -13286,7 +13317,7 @@ snapshots: read-installed-packages@2.0.1: dependencies: '@npmcli/fs': 3.1.1 - debug: 4.4.3 + debug: 4.3.5 read-package-json: 6.0.4 semver: 7.7.3 slide: 1.1.6