From 189eb44c86b331194ea4874c91f1c463a3a5621e Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Wed, 26 Apr 2023 02:57:55 +0900 Subject: [PATCH 1/4] Added CodeQL code --- .github/workflows/codeql.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..307c5862 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,30 @@ +jobs: + analyze: + name: Analyze + permissions: + actions: read + contents: read + security-events: write + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: security-and-quality + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + strategy: + fail-fast: false + matrix: + language: + - python +name: CodeQL +'on': + push: + branches: + - master From 17fa3d5e3dce3174fb0713db951a0e67eac24904 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Wed, 26 Apr 2023 15:44:41 +0900 Subject: [PATCH 2/4] Added CodeQL code --- .github/workflows/python-tox.yml | 65 -------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/python-tox.yml diff --git a/.github/workflows/python-tox.yml b/.github/workflows/python-tox.yml deleted file mode 100644 index cfcc42e6..00000000 --- a/.github/workflows/python-tox.yml +++ /dev/null @@ -1,65 +0,0 @@ -on: [pull_request, push] -jobs: - build: - # Prevent duplicate builds for 'internal' pull requests on existing commits - # Credit: https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012 - if: github.event.push || github.event.pull_request.head.repo.full_name != github.repository - strategy: - fail-fast: false - matrix: - # 2.7, 3.5, and 3.6 run on Windows via AppVeyor - python: ["3.7", "3.8", "3.9", "3.10", "3.11"] - os: [ubuntu-latest, windows-latest] - deps: [base, optional] - include: - - python: "pypy-2.7" - os: ubuntu-latest - deps: base - - python: "pypy-3.8" - os: ubuntu-latest - deps: base - - python: "2.7" - os: ubuntu-latest - deps: oldest - - python: "3.7" - os: ubuntu-latest - deps: oldest - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - if: ${{ matrix.deps == 'base' }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - cache: pip - cache-dependency-path: | - requirements.txt - requirements-test.txt - - if: ${{ matrix.deps == 'optional' }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - cache: pip - cache-dependency-path: | - requirements.txt - requirements-optional.txt - requirements-test.txt - - if: ${{ matrix.deps == 'oldest' }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - cache: pip - cache-dependency-path: | - requirements-oldest.txt - - if: ${{ matrix.os == 'windows-latest' }} - name: Determine environment name for Tox (PowerShell) - run: python toxver.py ${{ matrix.python }} ${{ matrix.deps }} >> $env:GITHUB_ENV - - if: ${{ matrix.os == 'ubuntu-latest' }} - name: Determine environment name for Tox (Bash) - run: python toxver.py ${{ matrix.python }} ${{ matrix.deps }} >> $GITHUB_ENV - - run: pip install tox - - run: tox - - if: ${{ always() }} - run: python debug-info.py From 5afa5fc9f7b8131e91abb3b303c0d7777f555c73 Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:07:58 +0900 Subject: [PATCH 3/4] Delete .github/workflows/codeql.yml --- .github/workflows/codeql.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 307c5862..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,30 +0,0 @@ -jobs: - analyze: - name: Analyze - permissions: - actions: read - contents: read - security-events: write - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - queries: security-and-quality - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - strategy: - fail-fast: false - matrix: - language: - - python -name: CodeQL -'on': - push: - branches: - - master From 8aa9d22d57a43257c5e76ac3120ca623e4234555 Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:07:58 +0900 Subject: [PATCH 4/4] Add new file --- .github/workflows/codeql.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..94d110b3 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,37 @@ +name: "CodeQL" +on: + workflow_dispatch: + #push: + # branches: [master] + #pull_request: + # branches: [master] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["python"] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file