codacy-analysis.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # This workflow checks out code, performs a Codacy security scan
  2. # and integrates the results with the
  3. # GitHub Advanced Security code scanning feature. For more information on
  4. # the Codacy security scan action usage and parameters, see
  5. # https://github.com/codacy/codacy-analysis-cli-action.
  6. # For more information on Codacy Analysis CLI in general, see
  7. # https://github.com/codacy/codacy-analysis-cli.
  8. name: Codacy Security Scan
  9. on:
  10. push:
  11. branches: [ master ]
  12. pull_request:
  13. # The branches below must be a subset of the branches above
  14. branches: [ master ]
  15. schedule:
  16. - cron: '45 16 * * 1'
  17. jobs:
  18. codacy-security-scan:
  19. name: Codacy Security Scan
  20. runs-on: ubuntu-latest
  21. steps:
  22. # Checkout the repository to the GitHub Actions runner
  23. - name: Checkout code
  24. uses: actions/checkout@v5
  25. - name: Remove folders causing errors in report
  26. run: rm -rf doc img *.md
  27. # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
  28. - name: Run Codacy Analysis CLI
  29. uses: codacy/codacy-analysis-cli-action@v4
  30. with:
  31. # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
  32. # You can also omit the token and run the tools that support default configurations
  33. project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
  34. verbose: true
  35. output: results.sarif
  36. format: sarif
  37. # Adjust severity of non-security issues
  38. gh-code-scanning-compat: true
  39. # Force 0 exit code to allow SARIF file generation
  40. # This will handover control about PR rejection to the GitHub side
  41. max-allowed-issues: 2147483647
  42. # Upload the SARIF file generated in the previous step
  43. - name: Upload SARIF results file
  44. uses: github/codeql-action/upload-sarif@v4
  45. with:
  46. sarif_file: results.sarif