Update CodeQL workflow
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
+#
name: "CodeQL"
on:
@@ -18,34 +19,22 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
strategy:
fail-fast: false
matrix:
- # Override automatic language detection by changing the below list
- # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: [ 'java' ]
- # Learn more...
- # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
+ # Learn more:
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
- with:
- # We must fetch at least the immediate parents so that if this is
- # a pull request then we can checkout the head.
- fetch-depth: 2
-
- # If this run was triggered by a pull request event, then checkout
- # the head of the pull request instead of the merge commit.
- - run: git checkout HEAD^2
- if: ${{ github.event_name == 'pull_request' }}
-
- - name: Setup Java
- uses: actions/setup-java@v2
- with:
- distribution: 'zulu'
- java-version: 11
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
