codacy-analysis.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. permissions:
  18. contents: read
  19. security-events: write
  20. jobs:
  21. codacy-security-scan:
  22. name: Codacy Security Scan
  23. runs-on: ubuntu-latest
  24. steps:
  25. # Checkout the repository to the GitHub Actions runner
  26. - name: Checkout code
  27. uses: actions/checkout@v5
  28. - name: Remove folders causing errors in report
  29. run: rm -rf doc img *.md
  30. # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
  31. - name: Run Codacy Analysis CLI
  32. uses: codacy/codacy-analysis-cli-action@v4
  33. with:
  34. # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
  35. # You can also omit the token and run the tools that support default configurations
  36. project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
  37. # verbose: true
  38. # output: results.sarif
  39. # format: sarif
  40. # Adjust severity of non-security issues
  41. # gh-code-scanning-compat: true
  42. # Force 0 exit code to allow SARIF file generation
  43. # This will handover control about PR rejection to the GitHub side
  44. # max-allowed-issues: 2147483647
  45. # Upload the SARIF file generated in the previous step
  46. # disabled due to: https://github.com/codacy/codacy-analysis-cli-action/issues/142
  47. #- name: Upload SARIF results file
  48. # uses: github/codeql-action/upload-sarif@v4
  49. # with:
  50. # sarif_file: results.sarif