Add input to the Trivy workflow in

<org>/actions/.github/workflows/reusable-trivy.yml

  • Add these inputs lines under the workflow_call: event
on:
  workflow_call:
    inputs:
      image:
        description: Image to scan
        required: true
        type: string
  • Then pass that value to the trivy action step at bottom
      - name: Run Trivy vulnerability scanner
        uses: aquasecurity/trivy-action@0.11.2
        with:
          image-ref: ${{ inputs.image }}
slide 74