From 8b786676a214f9d12b1f09f842ff9a66584a49b8 Mon Sep 17 00:00:00 2001 From: kra3 <48812+kra3@users.noreply.github.com> Date: Sun, 9 May 2021 20:03:56 +0200 Subject: [PATCH] experiment with codeQL --- .github/workflows/codeql-analysis.yml | 46 ++++++++++++++++----------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 50fecee..a1df39d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -7,35 +7,45 @@ on: # The branches below must be a subset of the branches above branches: [ main ] schedule: - - cron: '1 3 * * */2' + - cron: '1 3 * * 1' jobs: analyze: name: Analyze runs-on: ubuntu-latest + + permissions: + actions: read + contents: read + security-events: write strategy: fail-fast: false matrix: language: [ 'python' ] - # 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 + python-version: [3.6, 3.7, 3.8, 3.9] steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # setup-python-dependencies: false + # - run: | + # python -m pip install --upgrade pip + # if [ -f requirements.txt ]; + # then pip install -r requirements.txt; + # fi + # echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV - - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; - then pip install -r requirements.txt; - fi - echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1