snyk-scan.yml 1023 B

123456789101112131415161718192021222324252627282930
  1. # This is a basic workflow to help you get started with Actions
  2. name: Snyk scan
  3. on:
  4. # Triggers the workflow on push or pull request events but only for the master branch
  5. push:
  6. branches: [ master ]
  7. pull_request:
  8. branches: [ master ]
  9. jobs:
  10. # https://github.com/snyk/actions/tree/master/php
  11. snyk-php:
  12. runs-on: ubuntu-latest
  13. if: ${{ github.repository == 'PrivateBin/PrivateBin' }}
  14. steps:
  15. - uses: actions/checkout@v4
  16. - name: Install Google Cloud Storage
  17. run: composer require --no-update google/cloud-storage && composer update --no-dev
  18. - name: Run Snyk to check for vulnerabilities
  19. uses: snyk/actions/php@master
  20. continue-on-error: true # To make sure that SARIF upload gets called
  21. env:
  22. SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
  23. with:
  24. args: --sarif-file-output=snyk.sarif
  25. - name: Upload result to GitHub Code Scanning
  26. uses: github/codeql-action/upload-sarif@v3
  27. with:
  28. sarif_file: snyk.sarif