diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 21056f9..9532322 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -27,6 +27,9 @@ on: pull_request: branches: [ "master" ] +permissions: + contents: read + jobs: # =================================================================== # JOB: test diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..d98a3d9 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,59 @@ +name: CodeQL + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: "24 6 * * 3" + +permissions: + contents: read + security-events: write + +jobs: + analyze-actions: + name: Analyze GitHub Actions + runs-on: ubuntu-latest + steps: + - name: Checkout repository source code + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + + - name: Initialize CodeQL + uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4 + with: + languages: actions + build-mode: none + + - name: Perform CodeQL analysis + uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4 + + analyze-java-kotlin: + name: Analyze Java and Kotlin + runs-on: ubuntu-latest + steps: + - name: Checkout repository source code + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + + - name: Set up JDK 17 + uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 + with: + java-version: "17" + distribution: temurin + cache: gradle + + - name: Initialize CodeQL + uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4 + with: + languages: java-kotlin + build-mode: manual + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build application for analysis + run: ./gradlew assembleDebug + + - name: Perform CodeQL analysis + uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4