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. ZIP_NAME: ''
  51. ZIP_TAG: ''
  52. TGZ_NAME: ''
  53. TGZ_TAG: ''
  54. steps:
  55. - name: Checkout Firmware Files
  56. uses: actions/checkout@v3
  57. with:
  58. repository: "${{ vars.REPO_UNLEASHED }}"
  59. clean: "true"
  60. submodules: "true"
  61. ref: "dev"
  62. - name: Checkout Repo Files
  63. uses: actions/checkout@v3
  64. with:
  65. repository: "${{ vars.REPO_SELF }}"
  66. clean: "true"
  67. submodules: "true"
  68. path: "${{ env.OFW_PATH }}"
  69. # Initializes the CodeQL tools for scanning.
  70. - name: Initialize CodeQL
  71. uses: github/codeql-action/init@v2
  72. with:
  73. languages: ${{ matrix.language }}
  74. # If you wish to specify custom queries, you can do so here or in a config file.
  75. # By default, queries listed here will override any specified in a config file.
  76. # Prefix the list here with "+" to use these queries and those in the config file.
  77. # 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
  78. # queries: security-extended,security-and-quality
  79. - name: Build Firmware
  80. shell: bash
  81. if: ${{ success() }}
  82. env:
  83. FBT_NO_SYNC: 0
  84. DIST_SUFFIX: 'codeql'
  85. WORKFLOW_BRANCH_OR_TAG: release-cfw
  86. run: |
  87. ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0
  88. - name: Build FAPs
  89. shell: bash
  90. if: ${{ success() }}
  91. env:
  92. FBT_NO_SYNC: 0
  93. DIST_SUFFIX: 'codeql'
  94. WORKFLOW_BRANCH_OR_TAG: release-cfw
  95. # rm to remove problem FAP which includes non-existent files
  96. run: |
  97. ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0 fap_dist
  98. # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
  99. # If this step fails, then you should remove it and run the build manually (see below)
  100. #- name: Autobuild
  101. # run: |
  102. # echo "Run, Build Application using script"
  103. # ls -lha
  104. # ./fbt
  105. # uses: github/codeql-action/autobuild@v2
  106. - name: Perform CodeQL Analysis
  107. uses: github/codeql-action/analyze@v2
  108. with:
  109. category: "/language:${{matrix.language}}"