[Visual Search and QA] SDLe Scans - Scan Trivy Bandit Virus #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # SPDX-FileCopyrightText: (C) 2025 Intel Corporation | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: "[Visual Search and QA] SDLe Scans - Scan Trivy Bandit Virus" | |
| run-name: "[Visual Search and QA] SDLe Scans - Scan Trivy Bandit Virus" | |
| # Only run at most 1 workflow concurrently per PR, unlimited for branches | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 2 * * 0" # 2 a.m. on Sunday | |
| jobs: | |
| trivy-scan: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 | |
| with: | |
| persist-credentials: false | |
| - name: Build Docker images | |
| run: | | |
| # git clone https://github.com/open-edge-platform/edge-ai-libraries.git | |
| # cd edge-ai-libraries/microservices | |
| # docker build -t dataprep-visualdata-milvus:latest -f visual-data-preparation-for-retrieval/milvus/src/Dockerfile . | |
| # docker build -t retriever-milvus:latest -f vector-retriever/milvus/src/Dockerfile . | |
| # cd vlm-openvino-serving | |
| # docker build -t vlm-openvino-serving:latest -f docker/Dockerfile . | |
| # cd ../../.. | |
| ls | |
| cd metro-ai-suite | |
| docker build -t visual-search-qa-app:latest -f visual-search-question-and-answering/src/Dockerfile . | |
| - name: Verify Docker image | |
| run: | | |
| echo "=== Built Docker Image ===" | |
| docker images | |
| ls | |
| echo "=== Image Build Verification Complete ===" | |
| - name: Run Trivy Filesystem Scan | |
| uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff | |
| id: trivy-fs | |
| with: | |
| scan_type: "fs" | |
| scan-scope: "all" | |
| severity: "HIGH,CRITICAL" | |
| format: "json" | |
| scan_target: "metro-ai-suite/visual-search-question-and-answering/" | |
| report_suffix: "-fs-vqa-CT7" | |
| - name: Run trivy Scan -vqa (HTML Report) | |
| uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff | |
| id: vqa-visual-html | |
| with: | |
| scan_type: "image" | |
| scan-scope: "all" | |
| scan_target: "visual-search-qa-app:latest" | |
| severity: "HIGH,CRITICAL" | |
| format: "table" | |
| report_suffix: "-image-vqa-visual-html-CT248" | |
| generate_sbom: "false" | |
| - name: Run trivy Scan - vqa (SPDX SBOM) | |
| uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff | |
| id: vqa-visual-spdx | |
| with: | |
| scan_type: "image" | |
| scan-scope: "all" | |
| scan_target: "visual-search-qa-app:latest" | |
| severity: "HIGH,CRITICAL" | |
| format: "spdx-json" | |
| scanners: "vuln" | |
| report_suffix: "-image-vqa-visual-spdx-CT248" | |
| generate_sbom: "false" | |
| - name: Scan Dockerfile with Trivy | |
| uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff | |
| with: | |
| scan_type: "config" | |
| scan_target: "metro-ai-suite/visual-search-question-and-answering/docker/" | |
| severity: "HIGH,CRITICAL" | |
| format: "json" | |
| misconfig_scanners: "dockerfile" | |
| report_suffix: "-config-vqa-CT222" | |
| - name: Upload Report | |
| uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8 | |
| with: | |
| name: trivy-report-vqa | |
| path: security-results/trivy* | |
| bandit-scan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 | |
| - name: Run Bandit Scan | |
| uses: open-edge-platform/orch-ci/.github/actions/security/bandit@27276444a9bcf247a27369406686b689933bd1ff | |
| id: bandit | |
| with: | |
| scan-scope: "all" | |
| output-format: "txt" | |
| fail-on-findings: "false" | |
| - name: Upload Report | |
| uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8 | |
| with: | |
| name: bandit-report | |
| path: security-results/bandit* | |
| clamav-scan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 | |
| - name: Run ClamAV Scan | |
| uses: open-edge-platform/orch-ci/.github/actions/security/clamav@27276444a9bcf247a27369406686b689933bd1ff | |
| id: clamav | |
| with: | |
| scan-scope: "all" | |
| output-format: "txt" | |
| fail-on-findings: "false" | |
| - name: Upload Report | |
| uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8 | |
| with: | |
| name: clamav-report | |
| path: security-results/clamav* | |