Skip to content

feat(api): implement team-scoped internal multi-tenancy + ci patchset… #244

feat(api): implement team-scoped internal multi-tenancy + ci patchset…

feat(api): implement team-scoped internal multi-tenancy + ci patchset… #244

name: Security - Trivy
on:
pull_request:
branches: [ "*" ]
paths-ignore:
- 'docs/**'
- 'website/**'
- 'README.md'
push:
branches: [ "main" ]
paths-ignore:
- 'docs/**'
- 'website/**'
- 'README.md'
workflow_dispatch: {}
permissions:
contents: read
jobs:
trivy-fs:
name: Trivy FS Scan
runs-on: ubuntu-24.04
permissions:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Trivy repository vulnerability scan
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # 0.36.0
with:
scan-type: fs
scan-ref: .
scanners: vuln,secret,license
format: sarif
output: trivy-fs.sarif
exit-code: "1"
ignore-unfixed: true
skip-dirs: inspirations/mcp-gateway-registry
vuln-type: os,library
severity: CRITICAL,HIGH
limit-severities-for-sarif: true
hide-progress: true
- name: Upload Trivy repository SARIF
if: always()
continue-on-error: true
uses: github/codeql-action/upload-sarif@ed410739ba306e4ebe5e123421a6bd694e494a2b # v4
with:
sarif_file: trivy-fs.sarif
- name: Trivy repository misconfiguration scan
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # 0.36.0
with:
scan-type: fs
scan-ref: .
scanners: misconfig
format: sarif
output: trivy-misconfig.sarif
exit-code: "0"
skip-dirs: inspirations/mcp-gateway-registry
severity: CRITICAL,HIGH
limit-severities-for-sarif: true
hide-progress: true
- name: Upload Trivy misconfiguration SARIF
if: always()
continue-on-error: true
uses: github/codeql-action/upload-sarif@ed410739ba306e4ebe5e123421a6bd694e494a2b # v4
with:
sarif_file: trivy-misconfig.sarif
trivy-image:
name: Trivy Operator Image Scan
runs-on: ubuntu-24.04
permissions:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Build operator image
run: docker build --pull -f Dockerfile.operator -t mcp-runtime-operator:ci .
- name: Generate operator image SBOM
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0.24.0
with:
image: mcp-runtime-operator:ci
format: spdx-json
output-file: operator-image.spdx.json
- name: Upload operator image SBOM
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: operator-image-sbom
path: operator-image.spdx.json
if-no-files-found: error
- name: Trivy image scan
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # 0.36.0
with:
image-ref: mcp-runtime-operator:ci
format: sarif
output: trivy-image.sarif
exit-code: "1"
ignore-unfixed: true
vuln-type: os,library
severity: CRITICAL,HIGH
limit-severities-for-sarif: true
hide-progress: true
- name: Upload Trivy image SARIF
if: always()
continue-on-error: true
uses: github/codeql-action/upload-sarif@ed410739ba306e4ebe5e123421a6bd694e494a2b # v4
with:
sarif_file: trivy-image.sarif