From 048f904f6cdf586acdf518ac889c31152cac8b8d Mon Sep 17 00:00:00 2001 From: sebthom Date: Wed, 12 Jan 2022 08:17:16 +0100 Subject: [PATCH] add codeql scans --- .github/workflows/codeql-analysis.yml | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..0461b4f --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,58 @@ +# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning +name: "CodeQL" + +on: + push: + branches: + - '**' + tags-ignore: + - '**' + paths-ignore: + - '**/*.md' + pull_request: + paths-ignore: + - '**/*.md' + schedule: + - cron: '10 10 * * 1' + workflow_dispatch: + # https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/ + +defaults: + run: + shell: bash + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + security-events: write + + steps: + - name: Git Checkout + uses: actions/checkout@v2 #https://github.com/actions/checkout + + - uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - name: Install python dependencies + run: | + set -eux + + python --version + + pip install .[dev] + + # Set the `CODEQL-PYTHON` environment variable to the Python executable + # that includes the dependencies + echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: python + setup-python-dependencies: false + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 # https://github.com/github/codeql-action