diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..aa5bf3b --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,32 @@ +name: Snyk Security Scan + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + snyk-scan: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Snyk CLI + run: npm install -g snyk + + - name: Run Snyk to test for code vulnerabilities + run: snyk code test + + - name: Run Snyk to test dependencies for vulnerabilities + run: snyk test + + - name: Upload Snyk report as artifact + uses: actions/upload-artifact@v3 + with: + name: snyk-report + path: snyk-report.json