codeql.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Modified by backtrackz
  2. # Mark TRAP cache skipped because it only a few lines
  3. name: "CodeQL"
  4. on:
  5. push:
  6. branches: [ "main" ]
  7. pull_request:
  8. branches: [ "main" ]
  9. schedule:
  10. - cron: '18 8 * * 2'
  11. jobs:
  12. analyze:
  13. name: Analyze
  14. runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
  15. timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
  16. permissions:
  17. actions: read
  18. contents: read
  19. security-events: write
  20. strategy:
  21. fail-fast: false
  22. matrix:
  23. language: [ 'javascript' ]
  24. steps:
  25. - name: Checkout repository
  26. uses: actions/checkout@v3
  27. - name: Initialize CodeQL
  28. uses: github/codeql-action/init@v2
  29. with:
  30. languages: ${{ matrix.language }}
  31. - name: Autobuild
  32. uses: github/codeql-action/autobuild@v2
  33. - name: Perform CodeQL Analysis
  34. id: codeql
  35. uses: github/codeql-action/analyze@v2
  36. with:
  37. category: "/language:${{matrix.language}}"
  38. codeql-path: /opt/hostedtoolcache/CodeQL/2.14.1/x64/codeql/codeql
  39. upload-trap-cache: true
  40. upload-trap-cache-exclude: '.*'
  41. - name: Mark TRAP cache skipped
  42. if: steps.codeql.outputs.upload_trap_cache_skipped == 'true'
  43. run: echo "::set-output name=trap_cache_skipped::true"
  44. - name: Start Analysis
  45. if: steps.codeql.outputs.upload_trap_cache_skipped == 'false'
  46. run: echo "Starting analysis..."