codacy-analysis.yml 2.1 KB

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