nsip 0.6.2

NSIP Search API client for nsipsearch.nsip.org/api
Documentation
---
name: Container Security Scan

"on":
  # push:
  #   branches: [main, master]
  # pull_request:
  #   branches: [main, master]
  # schedule:
  #   - cron: "0 0 * * 0"  # Weekly on Sundays
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read
  security-events: write

jobs:
  trivy:
    name: Trivy Container Scan
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        # v6.0.2
        uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10  # v6.0.3

      - name: Build Docker image for scanning
        run: docker build -t nsip:scan .

      - name: Run Trivy vulnerability scanner
        # master
        uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25
        with:
          image-ref: nsip:scan
          format: sarif
          output: trivy-results.sarif
          severity: CRITICAL,HIGH,MEDIUM

      - name: Upload Trivy results to GitHub Security
        # yamllint disable-line rule:line-length
        uses: github/codeql-action/upload-sarif@1a818fd5f97ed0ee9a823421bd5b171add01227f  # v4.36.2
        if: always()
        with:
          sarif_file: trivy-results.sarif
          category: trivy-container

      - name: Generate human-readable report
        # master
        uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25
        with:
          image-ref: nsip:scan
          format: table
          output: trivy-report.txt

      - name: Upload scan report
        # v4.6.2
        uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a  # v7.0.1
        if: always()
        with:
          name: trivy-scan-report
          path: trivy-report.txt
          retention-days: 30