codeql.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # For most projects, this workflow file will not need changing; you simply need
  2. # to commit it to your repository.
  3. #
  4. # You may wish to alter this file to override the set of languages analyzed,
  5. # or to provide custom queries or build logic.
  6. #
  7. # ******** NOTE ********
  8. # We have attempted to detect the languages in your repository. Please check
  9. # the `language` matrix defined below to confirm you have the correct set of
  10. # supported CodeQL languages.
  11. #
  12. name: "CodeQL"
  13. on:
  14. push:
  15. branches: [ "master", "feat/ci" ]
  16. pull_request:
  17. # The branches below must be a subset of the branches above
  18. branches: [ "master" ]
  19. schedule:
  20. - cron: '43 14 * * *'
  21. workflow_dispatch:
  22. jobs:
  23. analyze:
  24. name: Analyze
  25. # Runner size impacts CodeQL analysis time. To learn more, please see:
  26. # - https://gh.io/recommended-hardware-resources-for-running-codeql
  27. # - https://gh.io/supported-runners-and-hardware-resources
  28. # - https://gh.io/using-larger-runners
  29. # Consider using larger runners for possible analysis time improvements.
  30. runs-on: 'ubuntu-latest'
  31. timeout-minutes: 360
  32. permissions:
  33. actions: read
  34. contents: read
  35. security-events: write
  36. strategy:
  37. fail-fast: false
  38. matrix:
  39. language: [ 'cpp' ]
  40. # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
  41. # Use only 'java' to analyze code written in Java, Kotlin or both
  42. # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
  43. # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
  44. env:
  45. REPO_SELF: ${{ vars.REPO_SELF }}
  46. OFW_PATH: "applications_user/subbrute"
  47. RELATIVE_PATH: "applications/external/subbrute"
  48. CURRENT_VERSION: ${{ vars.RELEASE_VERSION }}
  49. RELEASE_VERSION: ${{ vars.RELEASE_VERSION }}
  50. TOKEN: ${{ secrets.DEPENDABOT }}
  51. steps:
  52. - name: Checkout Firmware Files
  53. uses: actions/checkout@v3
  54. with:
  55. repository: "${{ vars.REPO_UNLEASHED }}"
  56. clean: "true"
  57. submodules: "true"
  58. ref: "dev"
  59. fetch-depth: '0'
  60. - name: Checkout Repo Files
  61. uses: actions/checkout@v3
  62. with:
  63. repository: "${{ vars.REPO_SELF }}"
  64. clean: "true"
  65. submodules: "true"
  66. path: "${{ env.OFW_PATH }}"
  67. fetch-depth: '0'
  68. # Initializes the CodeQL tools for scanning.
  69. - name: Initialize CodeQL
  70. uses: github/codeql-action/init@v2
  71. with:
  72. languages: ${{ matrix.language }}
  73. # If you wish to specify custom queries, you can do so here or in a config file.
  74. # By default, queries listed here will override any specified in a config file.
  75. # Prefix the list here with "+" to use these queries and those in the config file.
  76. # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
  77. # queries: security-extended,security-and-quality
  78. - name: Build Firmware
  79. shell: bash
  80. if: ${{ success() }}
  81. env:
  82. FBT_NO_SYNC: 0
  83. DIST_SUFFIX: 'codeql'
  84. WORKFLOW_BRANCH_OR_TAG: release-cfw
  85. run: |
  86. ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0
  87. - name: Build FAPs
  88. shell: bash
  89. if: ${{ success() }}
  90. env:
  91. FBT_NO_SYNC: 0
  92. DIST_SUFFIX: 'codeql'
  93. WORKFLOW_BRANCH_OR_TAG: release-cfw
  94. # rm to remove problem FAP which includes non-existent files
  95. run: |
  96. ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0 fap_dist
  97. # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
  98. # If this step fails, then you should remove it and run the build manually (see below)
  99. #- name: Autobuild
  100. # run: |
  101. # echo "Run, Build Application using script"
  102. # ls -lha
  103. # ./fbt
  104. # uses: github/codeql-action/autobuild@v2
  105. - name: Perform CodeQL Analysis
  106. uses: github/codeql-action/analyze@v2
  107. with:
  108. category: "/language:${{matrix.language}}"
  109. token: ${{ secrets.DEPENDABOT }}