From b1e338674a630fc6b8c975ad668747e6115f2da7 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Wed, 26 Apr 2023 08:14:04 +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 0000000..307c586 --- /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 de7221c595293efaa071bed1bfd55e9028d2be85 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Wed, 26 Apr 2023 17:01:49 +0900 Subject: [PATCH 2/4] Added CodeQL code --- .github/workflows/checks.yml | 42 ----------------------------------- .github/workflows/publish.yml | 31 -------------------------- .github/workflows/tests.yml | 26 ---------------------- 3 files changed, 99 deletions(-) delete mode 100644 .github/workflows/checks.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml deleted file mode 100644 index 85b51ce..0000000 --- a/.github/workflows/checks.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Checks -on: [push, pull_request] - -jobs: - checks: - runs-on: ubuntu-latest - strategy: - matrix: - include: - - python-version: 3 - env: - TOXENV: black - - python-version: 3 - env: - TOXENV: flake8 - - python-version: 3 - env: - TOXENV: pylint - - python-version: 3 - env: - TOXENV: security - - python-version: 3 - env: - TOXENV: docs - - python-version: 3 - env: - TOXENV: typing - - steps: - - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Run check - env: ${{ matrix.env }} - run: | - pip install -U pip - pip install -U tox - tox diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 977a42d..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Publish -on: [push] - -jobs: - publish: - runs-on: ubuntu-latest - if: startsWith(github.event.ref, 'refs/tags/') - - steps: - - uses: actions/checkout@v2 - - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3 - - - name: Check Tag - id: check-release-tag - run: | - if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+[.][0-9]+[.][0-9]+(rc[0-9]+|[.]dev[0-9]+)?$ ]]; then - echo ::set-output name=release_tag::true - fi - - - name: Publish to PyPI - if: steps.check-release-tag.outputs.release_tag == 'true' - run: | - pip install --upgrade setuptools wheel twine - python setup.py sdist bdist_wheel - export TWINE_USERNAME=__token__ - export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} - twine upload dist/* diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 28a230f..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Tests -on: [push, pull_request] - -jobs: - tests: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] - - steps: - - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Run tests - run: | - pip install -U pip - pip install -U tox - tox -e py - - - name: Upload coverage report - run: bash <(curl -s https://codecov.io/bash) From d07a101308795842a6de3eab0f9481955ee64341 Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 02:39:59 +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 307c586..0000000 --- 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 2fad64f330fb1b93c479ae1edc46897b9c3e5c9c Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 02:40:00 +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 0000000..94d110b --- /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