Skip to content

[PLUTO-1411] Add trivy test #1

[PLUTO-1411] Add trivy test

[PLUTO-1411] Add trivy test #1

name: Trivy Plugin Test
permissions:
contents: write
on:
push:
paths:
- 'plugins/tools/trivy/**'
- '.github/workflows/trivy-plugin-test.yml'
pull_request:
paths:
- 'plugins/tools/trivy/**'
- '.github/workflows/trivy-plugin-test.yml'
jobs:
test:

Check failure on line 17 in .github/workflows/trivy-plugin-test.yml

View workflow run for this annotation

GitHub Actions / Trivy Plugin Test

Invalid workflow file

The workflow is not valid. .github/workflows/trivy-plugin-test.yml (Line: 17, Col: 3): The workflow must contain at least one job with no dependencies.
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download CLI binaries
uses: actions/download-artifact@v4
with:
name: cli-binaries
path: .
- name: Select Linux binary
run: mv cli-v2-linux cli-v2
- name: Make binary executable
run: chmod +x cli-v2
- name: Run Trivy plugin tests
run: |
cd plugins/tools/trivy/test
# Install the plugin
../../../cli-v2 install
# Run analysis
../../../cli-v2 analyze --tool trivy --format sarif --output actual.sarif
# Compare with expected output
diff expected.sarif actual.sarif
# Clean up
rm actual.sarif