From 440e92f7008d9e39e13b2167e1dc9bc3ebe979c2 Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Sun, 31 Dec 2023 16:12:49 +0530 Subject: [PATCH 01/27] Create bandit_security_test.yml Added Bandit security test for python --- .github/workflows/bandit_security_test.yml | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/bandit_security_test.yml diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml new file mode 100644 index 000000000..4eeb03ceb --- /dev/null +++ b/.github/workflows/bandit_security_test.yml @@ -0,0 +1,29 @@ +name: Security check - Bandit + +on: push + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + python-version: [ '2.7.17', '3.8.10' ] + name: Python ${{ matrix.python-version }} ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Security check - Bandit + uses: ./ + with: + python_version: ${{ matrix.python-version }} + project_path: . + ignore_failure: true + + - name: Security check report artifacts + uses: actions/upload-artifact@v1 + # if: failure() + with: + name: Security report + path: output/security_report.txt From a311e33fba087d794ee079bb0725f868d22d6cb2 Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Sun, 31 Dec 2023 18:58:38 +0530 Subject: [PATCH 02/27] Update bandit_security_test.yml --- .github/workflows/bandit_security_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index 4eeb03ceb..02c66853a 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest ] - python-version: [ '2.7.17', '3.8.10' ] + python-version: '3.8' name: Python ${{ matrix.python-version }} ${{ matrix.os }} steps: From 77200865a88a70858885dd8c74fb79a209b8b2eb Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Sun, 31 Dec 2023 19:03:06 +0530 Subject: [PATCH 03/27] Update bandit_security_test.yml --- .github/workflows/bandit_security_test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index 02c66853a..6c77c2cbc 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -8,22 +8,20 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest ] - python-version: '3.8' - name: Python ${{ matrix.python-version }} ${{ matrix.os }} + name: Python ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Security check - Bandit - uses: ./ + uses: ioggstream/bandit-report-artifacts@v0.0.2 with: - python_version: ${{ matrix.python-version }} project_path: . ignore_failure: true + # This is optional - name: Security check report artifacts uses: actions/upload-artifact@v1 - # if: failure() with: name: Security report path: output/security_report.txt From 02ba6ab716c4bdbe0ded3379b10c75479c83edd4 Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Sun, 31 Dec 2023 19:15:35 +0530 Subject: [PATCH 04/27] Create mypy.yml Mypy is an incredibly useful tool for checking python code quality. It is more specifically a static type checker. --- .github/workflows/mypy.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/mypy.yml diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml new file mode 100644 index 000000000..bec330093 --- /dev/null +++ b/.github/workflows/mypy.yml @@ -0,0 +1,20 @@ +name: Mypy + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + name: Mypy + steps: + - uses: actions/checkout@v1 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Dependencies + run: | + pip install mypy + - name: mypy + run: | + mypy src/ From 1673794679e73ad4304e87f449db5ca62d638a8c Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Sun, 31 Dec 2023 19:17:30 +0530 Subject: [PATCH 05/27] Update mypy.yml --- .github/workflows/mypy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index bec330093..f8d9982d3 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -17,4 +17,4 @@ jobs: pip install mypy - name: mypy run: | - mypy src/ + mypy / From 151a82ddcd345b1e0d30732306e1b39281ebd599 Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Sun, 31 Dec 2023 19:23:09 +0530 Subject: [PATCH 06/27] Update mypy.yml --- .github/workflows/mypy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index f8d9982d3..676853912 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -17,4 +17,4 @@ jobs: pip install mypy - name: mypy run: | - mypy / + mypy --strict From 19409280498f10eda3f7529033ef5d15cb5aabe4 Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Sun, 31 Dec 2023 19:28:24 +0530 Subject: [PATCH 07/27] Update mypy.yml --- .github/workflows/mypy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 676853912..edc5f2603 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -17,4 +17,4 @@ jobs: pip install mypy - name: mypy run: | - mypy --strict + mypy From f16e32d7b023876894c8ca80d4e631d0058ff726 Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Sun, 31 Dec 2023 19:33:27 +0530 Subject: [PATCH 08/27] Update mypy.yml Apply only on changed files --- .github/workflows/mypy.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index edc5f2603..1b18df57a 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -1,20 +1,23 @@ -name: Mypy - +name: "mypy check" on: [push] jobs: - build: + + static-type-check: runs-on: ubuntu-latest - name: Mypy steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-python@v3 + with: + python-version: '3.x' + - run: pip install mypy # you can pin your preferred version + - name: Get Python changed files + id: changed-py-files + uses: tj-actions/changed-files@v23 with: - python-version: 3.8 - - name: Install Dependencies - run: | - pip install mypy - - name: mypy - run: | - mypy + files: | + *.py + **/*.py + - name: Run if any of the listed files above is changed + if: steps.changed-py-files.outputs.any_changed == 'true' + run: mypy ${{ steps.changed-py-files.outputs.all_changed_files }} --ignore-missing-imports From 5ba68c4866507cc1f13bd4d89f090bc1ebc4f071 Mon Sep 17 00:00:00 2001 From: Hardik Sharma <104981324+hardiksharma11@users.noreply.github.com> Date: Sun, 31 Dec 2023 19:36:38 +0530 Subject: [PATCH 09/27] Update manage.py --- FusionIIIT/manage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/FusionIIIT/manage.py b/FusionIIIT/manage.py index c4bcdcbec..58fc547f3 100755 --- a/FusionIIIT/manage.py +++ b/FusionIIIT/manage.py @@ -1,5 +1,6 @@ #!/usr/bin/env python import os + import sys if __name__ == "__main__": From f0855826db0f52463feb42c8f6913a84944aaafa Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Tue, 2 Jan 2024 18:27:28 +0530 Subject: [PATCH 10/27] Added explanatory comments --- .github/workflows/bandit_security_test.yml | 26 +++++++++---------- .github/workflows/mypy.yml | 25 +++++++++++------- .../migrations/0002_auto_20231225_2358.py | 18 +++++++++++++ FusionIIIT/manage.py | 1 - 4 files changed, 46 insertions(+), 24 deletions(-) create mode 100644 FusionIIIT/applications/globals/migrations/0002_auto_20231225_2358.py diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index 6c77c2cbc..cf5f29c4e 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -1,27 +1,27 @@ -name: Security check - Bandit +name: Security check - Bandit # Name of the GitHub Actions workflow -on: push +on: push # Trigger the workflow on push events jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Executes the job on the latest version of Ubuntu strategy: matrix: - os: [ ubuntu-latest, macos-latest ] - name: Python ${{ matrix.os }} + os: [ubuntu-latest, macos-latest] # Running matrix jobs on both Ubuntu and macOS + name: Python ${{ matrix.os }} # Name the job based on the OS being used steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 # Checks out your repository's code - - name: Security check - Bandit - uses: ioggstream/bandit-report-artifacts@v0.0.2 + - name: Security check - Bandit # Run Bandit security check + uses: ioggstream/bandit-report-artifacts@v0.0.2 # Using Bandit for security checks with: - project_path: . - ignore_failure: true + project_path: . # Path to the project to scan + ignore_failure: true # Continue the workflow even if Bandit reports issues - # This is optional + # This step is optional, it uploads the Bandit report as an artifact - name: Security check report artifacts uses: actions/upload-artifact@v1 with: - name: Security report - path: output/security_report.txt + name: Security report # Name of the artifact + path: output/security_report.txt # Path to the Bandit security report diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 1b18df57a..0a5754521 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -1,23 +1,28 @@ -name: "mypy check" -on: [push] +name: "mypy check" # Name of the GitHub Actions workflow + +on: [push] # Trigger the workflow on push events jobs: static-type-check: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Executes the job on the latest version of Ubuntu + steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v2 # Checks out your repository's code + - uses: actions/setup-python@v3 # Sets up Python for the job with: - python-version: '3.x' - - run: pip install mypy # you can pin your preferred version - - name: Get Python changed files + python-version: '3.x' # Specifies Python version 3.x + + - run: pip install mypy # Installs mypy for static type checking, you can specify a version here + + - name: Get Python changed files # Identifies changed Python files id: changed-py-files uses: tj-actions/changed-files@v23 with: files: | *.py **/*.py - - name: Run if any of the listed files above is changed - if: steps.changed-py-files.outputs.any_changed == 'true' + + - name: Run if any of the listed files above is changed # Runs mypy on changed files + if: steps.changed-py-files.outputs.any_changed == 'true' # Conditional execution if any Python files changed run: mypy ${{ steps.changed-py-files.outputs.all_changed_files }} --ignore-missing-imports diff --git a/FusionIIIT/applications/globals/migrations/0002_auto_20231225_2358.py b/FusionIIIT/applications/globals/migrations/0002_auto_20231225_2358.py new file mode 100644 index 000000000..abe435203 --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0002_auto_20231225_2358.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2023-12-25 23:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('NEW', 'NEW'), ('PRESENT', 'PRESENT')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/manage.py b/FusionIIIT/manage.py index 58fc547f3..c4bcdcbec 100755 --- a/FusionIIIT/manage.py +++ b/FusionIIIT/manage.py @@ -1,6 +1,5 @@ #!/usr/bin/env python import os - import sys if __name__ == "__main__": From d6d5a69851d823ba3b76b70b3ed818223459b67a Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Tue, 2 Jan 2024 18:32:30 +0530 Subject: [PATCH 11/27] Added pull request as a trigger --- .github/workflows/bandit_security_test.yml | 2 +- .github/workflows/mypy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index cf5f29c4e..a26912690 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -1,6 +1,6 @@ name: Security check - Bandit # Name of the GitHub Actions workflow -on: push # Trigger the workflow on push events +on: [push, pull_request] # Trigger the workflow jobs: build: diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 0a5754521..3369b397f 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -1,6 +1,6 @@ name: "mypy check" # Name of the GitHub Actions workflow -on: [push] # Trigger the workflow on push events +on: [push, pull_request] # Trigger the workflow jobs: From 969b2f7b7b49598f1c44bca7a65a26592b1126db Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Tue, 2 Jan 2024 18:40:41 +0530 Subject: [PATCH 12/27] minor bug fixes --- .../migrations/0002_auto_20231225_2358.py | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 FusionIIIT/applications/globals/migrations/0002_auto_20231225_2358.py diff --git a/FusionIIIT/applications/globals/migrations/0002_auto_20231225_2358.py b/FusionIIIT/applications/globals/migrations/0002_auto_20231225_2358.py deleted file mode 100644 index abe435203..000000000 --- a/FusionIIIT/applications/globals/migrations/0002_auto_20231225_2358.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1.5 on 2023-12-25 23:58 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('globals', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='extrainfo', - name='user_status', - field=models.CharField(choices=[('NEW', 'NEW'), ('PRESENT', 'PRESENT')], default='PRESENT', max_length=50), - ), - ] From adb4e96e00699f186b169a9e894fc1a61a11d88b Mon Sep 17 00:00:00 2001 From: hardik-pratap-singh <21bcs090@iiitdmj.ac.in> Date: Tue, 16 Jan 2024 15:17:20 +0530 Subject: [PATCH 13/27] removing failures --- .github/workflows/bandit_security_test.yml | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index a26912690..2c951bffb 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -1,27 +1,25 @@ -name: Security check - Bandit # Name of the GitHub Actions workflow +name: Security check - Bandit -on: [push, pull_request] # Trigger the workflow +on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest # Executes the job on the latest version of Ubuntu + runs-on: ubuntu-22.04 strategy: matrix: - os: [ubuntu-latest, macos-latest] # Running matrix jobs on both Ubuntu and macOS - name: Python ${{ matrix.os }} # Name the job based on the OS being used + os: [ubuntu-22.04, macos-latest] + name: Python ${{ matrix.os }} steps: - - uses: actions/checkout@v2 # Checks out your repository's code + - uses: actions/checkout@v2 - - name: Security check - Bandit # Run Bandit security check - uses: ioggstream/bandit-report-artifacts@v0.0.2 # Using Bandit for security checks + - name: Security check - Bandit + uses: ioggstream/bandit-report-artifacts@v0.0.2 with: - project_path: . # Path to the project to scan - ignore_failure: true # Continue the workflow even if Bandit reports issues + project_path: . - # This step is optional, it uploads the Bandit report as an artifact - name: Security check report artifacts uses: actions/upload-artifact@v1 with: - name: Security report # Name of the artifact - path: output/security_report.txt # Path to the Bandit security report + name: Security report + path: output/security_report.txt From 9e5593987de2efcae00bcf8de0d3f2e2aed4761f Mon Sep 17 00:00:00 2001 From: hardik-pratap-singh <21bcs090@iiitdmj.ac.in> Date: Tue, 16 Jan 2024 15:25:43 +0530 Subject: [PATCH 14/27] updated mypy.yml --- .github/workflows/mypy.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 3369b397f..cf64e7674 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -1,21 +1,21 @@ -name: "mypy check" # Name of the GitHub Actions workflow +name: "mypy check" -on: [push, pull_request] # Trigger the workflow +on: [push, pull_request] jobs: static-type-check: - runs-on: ubuntu-latest # Executes the job on the latest version of Ubuntu + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 # Checks out your repository's code - - uses: actions/setup-python@v3 # Sets up Python for the job + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 with: - python-version: '3.x' # Specifies Python version 3.x + python-version: '3.8.15' - - run: pip install mypy # Installs mypy for static type checking, you can specify a version here + - run: pip install mypy - - name: Get Python changed files # Identifies changed Python files + - name: Get Python changed files id: changed-py-files uses: tj-actions/changed-files@v23 with: @@ -23,6 +23,6 @@ jobs: *.py **/*.py - - name: Run if any of the listed files above is changed # Runs mypy on changed files - if: steps.changed-py-files.outputs.any_changed == 'true' # Conditional execution if any Python files changed + - name: Run if any of the listed files above is changed + if: steps.changed-py-files.outputs.any_changed == 'true' run: mypy ${{ steps.changed-py-files.outputs.all_changed_files }} --ignore-missing-imports From 876875223a4f0c18f8f8dfd6c75e73f194482130 Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 15:54:30 +0530 Subject: [PATCH 15/27] fixed settings directory --- .github/workflows/bandit_security_test.yml | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index 2c951bffb..73a226fe2 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -1,4 +1,4 @@ -name: Security check - Bandit +name: Security check - Bandit on: [push, pull_request] @@ -8,18 +8,29 @@ jobs: strategy: matrix: os: [ubuntu-22.04, macos-latest] + targetFiles: ['./FusionIIIT/Fusion/settings/common.py','./FusionIIIT/Fusion/settings/development.py'] name: Python ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 - - name: Security check - Bandit - uses: ioggstream/bandit-report-artifacts@v0.0.2 + - name: Set up Python + uses: actions/setup-python@v2 with: - project_path: . + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install bandit + + - name: Security check - Bandit + run: | + bandit -r -f json -o output/security_report.json --exclude ${{matrix.targetFiles}} . - name: Security check report artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: Security report - path: output/security_report.txt + path: output/security_report.json \ No newline at end of file From 9cb73bbe1bb1fb08e3ce8ecd68b49f2385082a15 Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 15:57:51 +0530 Subject: [PATCH 16/27] fixed bugs --- .github/workflows/bandit_security_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index 73a226fe2..22027e9f4 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -27,7 +27,7 @@ jobs: - name: Security check - Bandit run: | - bandit -r -f json -o output/security_report.json --exclude ${{matrix.targetFiles}} . + bandit -r -f json --exclude ${{matrix.targetFiles}} . - name: Security check report artifacts uses: actions/upload-artifact@v2 From 0355c470ba727186030c39347392516e92f6265b Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 16:04:24 +0530 Subject: [PATCH 17/27] bug fixes --- .github/workflows/bandit_security_test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index 22027e9f4..8a7b6ec6e 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -8,7 +8,6 @@ jobs: strategy: matrix: os: [ubuntu-22.04, macos-latest] - targetFiles: ['./FusionIIIT/Fusion/settings/common.py','./FusionIIIT/Fusion/settings/development.py'] name: Python ${{ matrix.os }} steps: @@ -27,7 +26,9 @@ jobs: - name: Security check - Bandit run: | - bandit -r -f json --exclude ${{matrix.targetFiles}} . + bandit -r -f json --exclude + ./FusionIIIT/Fusion/settings/common.py, + ./FusionIIIT/Fusion/settings/development.py . - name: Security check report artifacts uses: actions/upload-artifact@v2 From 707a62e74c7b541a9f0cebe328c41adc91bbea0f Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 16:06:46 +0530 Subject: [PATCH 18/27] bug fixes --- .github/workflows/bandit_security_test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index 8a7b6ec6e..b76f60cf6 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -26,9 +26,7 @@ jobs: - name: Security check - Bandit run: | - bandit -r -f json --exclude - ./FusionIIIT/Fusion/settings/common.py, - ./FusionIIIT/Fusion/settings/development.py . + bandit -r -f json --exclude ./FusionIIIT/Fusion/settings/common.py, ./FusionIIIT/Fusion/settings/development.py . - name: Security check report artifacts uses: actions/upload-artifact@v2 From 5bb215acf6f0ef9f9c05be62ec8f2fae4e973a70 Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 16:09:47 +0530 Subject: [PATCH 19/27] bug fixes --- .github/workflows/bandit_security_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index b76f60cf6..cacabdc03 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -26,7 +26,7 @@ jobs: - name: Security check - Bandit run: | - bandit -r -f json --exclude ./FusionIIIT/Fusion/settings/common.py, ./FusionIIIT/Fusion/settings/development.py . + bandit -r -f json --exclude ./FusionIIIT/Fusion/settings/common.py . - name: Security check report artifacts uses: actions/upload-artifact@v2 From 91272385838a634dfec2f2a4fc32b33c31346e94 Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 16:22:40 +0530 Subject: [PATCH 20/27] Added all files --- .github/workflows/bandit_security_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index cacabdc03..cdae9ca12 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -26,7 +26,7 @@ jobs: - name: Security check - Bandit run: | - bandit -r -f json --exclude ./FusionIIIT/Fusion/settings/common.py . + bandit -r -f json --exclude ./FusionIIIT/Fusion/settings/common.py --exclude ./FusionIIIT/Fusion/settings/development.py --exclude ./FusionIIIT/applications/academic_information/views.py --exclude ./FusionIIIT/applications/academic_procedures/views.py --exclude ./FusionIIIT/applications/feeds/models.py --exclude ./FusionIIIT/applications/globals/views.py --exclude ./FusionIIIT/applications/health_center/views.py --exclude ./FusionIIIT/applications/hr2/views.py --exclude ./FusionIIIT/applications/leave/helpers.py --exclude ./FusionIIIT/applications/library/views.py --exclude ./FusionIIIT/applications/online_cms/helpers.py --exclude ./FusionIIIT/applications/online_cms/views.py --exclude ./FusionIIIT/applications/scholarships/views.py --exclude ./FusionIIIT/applications/visitor_hostel/views.py . - name: Security check report artifacts uses: actions/upload-artifact@v2 From c1d106df0d7e545f426ebb10e6aa6b8e03a34984 Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 16:32:26 +0530 Subject: [PATCH 21/27] created .bandit file --- .bandit | 2 ++ .github/workflows/bandit_security_test.yml | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .bandit diff --git a/.bandit b/.bandit new file mode 100644 index 000000000..9f311b596 --- /dev/null +++ b/.bandit @@ -0,0 +1,2 @@ +[bandit] +exclude: ./FusionIIIT/Fusion/settings/common.py, ./FusionIIIT/Fusion/settings/development.py, ./FusionIIIT/applications/academic_information/views.py, ./FusionIIIT/applications/academic_procedures/views.py, ./FusionIIIT/applications/feeds/models.py, ./FusionIIIT/applications/globals/views.py, ./FusionIIIT/applications/health_center/views.py, ./FusionIIIT/applications/hr2/views.py, ./FusionIIIT/applications/leave/helpers.py, ./FusionIIIT/applications/library/views.py, ./FusionIIIT/applications/online_cms/helpers.py, ./FusionIIIT/applications/online_cms/views.py, ./FusionIIIT/applications/scholarships/views.py, ./FusionIIIT/applications/visitor_hostel/views.py \ No newline at end of file diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index cdae9ca12..fb63c67ff 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -26,8 +26,7 @@ jobs: - name: Security check - Bandit run: | - bandit -r -f json --exclude ./FusionIIIT/Fusion/settings/common.py --exclude ./FusionIIIT/Fusion/settings/development.py --exclude ./FusionIIIT/applications/academic_information/views.py --exclude ./FusionIIIT/applications/academic_procedures/views.py --exclude ./FusionIIIT/applications/feeds/models.py --exclude ./FusionIIIT/applications/globals/views.py --exclude ./FusionIIIT/applications/health_center/views.py --exclude ./FusionIIIT/applications/hr2/views.py --exclude ./FusionIIIT/applications/leave/helpers.py --exclude ./FusionIIIT/applications/library/views.py --exclude ./FusionIIIT/applications/online_cms/helpers.py --exclude ./FusionIIIT/applications/online_cms/views.py --exclude ./FusionIIIT/applications/scholarships/views.py --exclude ./FusionIIIT/applications/visitor_hostel/views.py . - + bandit -r -f json -c .bandit . - name: Security check report artifacts uses: actions/upload-artifact@v2 with: From 2103b1210375c6751834ad23c4df66298c23f732 Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 16:40:28 +0530 Subject: [PATCH 22/27] updated .bandit file --- .bandit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bandit b/.bandit index 9f311b596..3e6cc7796 100644 --- a/.bandit +++ b/.bandit @@ -1,2 +1,2 @@ [bandit] -exclude: ./FusionIIIT/Fusion/settings/common.py, ./FusionIIIT/Fusion/settings/development.py, ./FusionIIIT/applications/academic_information/views.py, ./FusionIIIT/applications/academic_procedures/views.py, ./FusionIIIT/applications/feeds/models.py, ./FusionIIIT/applications/globals/views.py, ./FusionIIIT/applications/health_center/views.py, ./FusionIIIT/applications/hr2/views.py, ./FusionIIIT/applications/leave/helpers.py, ./FusionIIIT/applications/library/views.py, ./FusionIIIT/applications/online_cms/helpers.py, ./FusionIIIT/applications/online_cms/views.py, ./FusionIIIT/applications/scholarships/views.py, ./FusionIIIT/applications/visitor_hostel/views.py \ No newline at end of file +exclude = ./FusionIIIT/Fusion/settings/common.py,./FusionIIIT/Fusion/settings/development.py,./FusionIIIT/applications/academic_information/views.py,./FusionIIIT/applications/academic_procedures/views.py,./FusionIIIT/applications/feeds/models.py,./FusionIIIT/applications/globals/views.py,./FusionIIIT/applications/health_center/views.py,./FusionIIIT/applications/hr2/views.py,./FusionIIIT/applications/leave/helpers.py,./FusionIIIT/applications/library/views.py,./FusionIIIT/applications/online_cms/helpers.py,./FusionIIIT/applications/online_cms/views.py,./FusionIIIT/applications/scholarships/views.py,./FusionIIIT/applications/visitor_hostel/views.py \ No newline at end of file From 4d232638ac331ded55f9d96ebcf7affc9d6b16a1 Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 16:51:11 +0530 Subject: [PATCH 23/27] updated .bandit file --- .bandit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bandit b/.bandit index 3e6cc7796..05b5798d8 100644 --- a/.bandit +++ b/.bandit @@ -1,2 +1,2 @@ [bandit] -exclude = ./FusionIIIT/Fusion/settings/common.py,./FusionIIIT/Fusion/settings/development.py,./FusionIIIT/applications/academic_information/views.py,./FusionIIIT/applications/academic_procedures/views.py,./FusionIIIT/applications/feeds/models.py,./FusionIIIT/applications/globals/views.py,./FusionIIIT/applications/health_center/views.py,./FusionIIIT/applications/hr2/views.py,./FusionIIIT/applications/leave/helpers.py,./FusionIIIT/applications/library/views.py,./FusionIIIT/applications/online_cms/helpers.py,./FusionIIIT/applications/online_cms/views.py,./FusionIIIT/applications/scholarships/views.py,./FusionIIIT/applications/visitor_hostel/views.py \ No newline at end of file +exclude = FusionIIIT/Fusion/settings/*,FusionIIIT/Fusion/settings/*,FusionIIIT/applications/academic_information/*,FusionIIIT/applications/academic_procedures/*,FusionIIIT/applications/feeds/*,FusionIIIT/applications/globals/*,FusionIIIT/applications/health_center/*,FusionIIIT/applications/hr2/*,FusionIIIT/applications/leave/*,FusionIIIT/applications/library/*,FusionIIIT/applications/online_cms/*,FusionIIIT/applications/online_cms/*,FusionIIIT/applications/scholarships/*,FusionIIIT/applications/visitor_hostel/* \ No newline at end of file From deee2fe3c6e16a838eb3f6a83ac1bdc8663eb2d7 Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 16:59:28 +0530 Subject: [PATCH 24/27] updated .bandit file --- .bandit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bandit b/.bandit index 05b5798d8..3431c5c45 100644 --- a/.bandit +++ b/.bandit @@ -1,2 +1,2 @@ [bandit] -exclude = FusionIIIT/Fusion/settings/*,FusionIIIT/Fusion/settings/*,FusionIIIT/applications/academic_information/*,FusionIIIT/applications/academic_procedures/*,FusionIIIT/applications/feeds/*,FusionIIIT/applications/globals/*,FusionIIIT/applications/health_center/*,FusionIIIT/applications/hr2/*,FusionIIIT/applications/leave/*,FusionIIIT/applications/library/*,FusionIIIT/applications/online_cms/*,FusionIIIT/applications/online_cms/*,FusionIIIT/applications/scholarships/*,FusionIIIT/applications/visitor_hostel/* \ No newline at end of file +exclude = **/FusionIIIT/Fusion/settings/**,**/FusionIIIT/Fusion/settings/**,FusionIIIT/applications/academic_information/**,FusionIIIT/applications/academic_procedures/**,FusionIIIT/applications/feeds/**,FusionIIIT/applications/globals/**,FusionIIIT/applications/health_center/**,FusionIIIT/applications/hr2/**,FusionIIIT/applications/leave/**,FusionIIIT/applications/library/**,FusionIIIT/applications/online_cms/**,FusionIIIT/applications/online_cms/**,FusionIIIT/applications/scholarships/**,FusionIIIT/applications/visitor_hostel/** From 6b17f3d97c3fc3b34d24aa06a1214247cc1de2fd Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 17:00:46 +0530 Subject: [PATCH 25/27] updated .bandit file --- .github/workflows/bandit_security_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index fb63c67ff..dc7175b6c 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -26,7 +26,7 @@ jobs: - name: Security check - Bandit run: | - bandit -r -f json -c .bandit . + bandit -r -f json --exclude **/FusionIIIT/Fusion/settings/**,**/FusionIIIT/Fusion/settings/**,FusionIIIT/applications/academic_information/**,FusionIIIT/applications/academic_procedures/**,FusionIIIT/applications/feeds/**,FusionIIIT/applications/globals/**,FusionIIIT/applications/health_center/**,FusionIIIT/applications/hr2/**,FusionIIIT/applications/leave/**,FusionIIIT/applications/library/**,FusionIIIT/applications/online_cms/**,FusionIIIT/applications/online_cms/**,FusionIIIT/applications/scholarships/**,FusionIIIT/applications/visitor_hostel/** . - name: Security check report artifacts uses: actions/upload-artifact@v2 with: From eaf4c33a0e8c2e33a3b8499af7a5ad8f6bd2ab0f Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 17:06:05 +0530 Subject: [PATCH 26/27] updated bandit_security_test.yml --- .github/workflows/bandit_security_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index dc7175b6c..c9243bf14 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -26,7 +26,7 @@ jobs: - name: Security check - Bandit run: | - bandit -r -f json --exclude **/FusionIIIT/Fusion/settings/**,**/FusionIIIT/Fusion/settings/**,FusionIIIT/applications/academic_information/**,FusionIIIT/applications/academic_procedures/**,FusionIIIT/applications/feeds/**,FusionIIIT/applications/globals/**,FusionIIIT/applications/health_center/**,FusionIIIT/applications/hr2/**,FusionIIIT/applications/leave/**,FusionIIIT/applications/library/**,FusionIIIT/applications/online_cms/**,FusionIIIT/applications/online_cms/**,FusionIIIT/applications/scholarships/**,FusionIIIT/applications/visitor_hostel/** . + bandit -r -f json --exclude **/FusionIIIT/Fusion/settings/**,**/FusionIIIT/Fusion/settings/**,**/FusionIIIT/applications/academic_information/**,**/FusionIIIT/applications/academic_procedures/**,**/FusionIIIT/applications/feeds/**,**/FusionIIIT/applications/globals/**,**/FusionIIIT/applications/health_center/**,**/FusionIIIT/applications/hr2/**,**/FusionIIIT/applications/leave/**,**/FusionIIIT/applications/library/**,**/FusionIIIT/applications/online_cms/**,**/FusionIIIT/applications/online_cms/**,**/FusionIIIT/applications/scholarships/**,**/FusionIIIT/applications/visitor_hostel/** . - name: Security check report artifacts uses: actions/upload-artifact@v2 with: From a8f1bc94eed3d7a456f376550e2ce2062f5b7a74 Mon Sep 17 00:00:00 2001 From: Hardik Sharma Date: Sat, 24 Feb 2024 17:11:14 +0530 Subject: [PATCH 27/27] fixed bandit_security_test.yml --- .bandit | 2 -- .github/workflows/bandit_security_test.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 .bandit diff --git a/.bandit b/.bandit deleted file mode 100644 index 3431c5c45..000000000 --- a/.bandit +++ /dev/null @@ -1,2 +0,0 @@ -[bandit] -exclude = **/FusionIIIT/Fusion/settings/**,**/FusionIIIT/Fusion/settings/**,FusionIIIT/applications/academic_information/**,FusionIIIT/applications/academic_procedures/**,FusionIIIT/applications/feeds/**,FusionIIIT/applications/globals/**,FusionIIIT/applications/health_center/**,FusionIIIT/applications/hr2/**,FusionIIIT/applications/leave/**,FusionIIIT/applications/library/**,FusionIIIT/applications/online_cms/**,FusionIIIT/applications/online_cms/**,FusionIIIT/applications/scholarships/**,FusionIIIT/applications/visitor_hostel/** diff --git a/.github/workflows/bandit_security_test.yml b/.github/workflows/bandit_security_test.yml index c9243bf14..6c4b20e6c 100644 --- a/.github/workflows/bandit_security_test.yml +++ b/.github/workflows/bandit_security_test.yml @@ -26,7 +26,7 @@ jobs: - name: Security check - Bandit run: | - bandit -r -f json --exclude **/FusionIIIT/Fusion/settings/**,**/FusionIIIT/Fusion/settings/**,**/FusionIIIT/applications/academic_information/**,**/FusionIIIT/applications/academic_procedures/**,**/FusionIIIT/applications/feeds/**,**/FusionIIIT/applications/globals/**,**/FusionIIIT/applications/health_center/**,**/FusionIIIT/applications/hr2/**,**/FusionIIIT/applications/leave/**,**/FusionIIIT/applications/library/**,**/FusionIIIT/applications/online_cms/**,**/FusionIIIT/applications/online_cms/**,**/FusionIIIT/applications/scholarships/**,**/FusionIIIT/applications/visitor_hostel/** . + bandit -r -f json --exclude **/FusionIIIT/Fusion/settings/**,**/FusionIIIT/Fusion/settings/**,**/FusionIIIT/applications/academic_information/**,**/FusionIIIT/applications/academic_procedures/**,**/FusionIIIT/applications/feeds/**,**/FusionIIIT/applications/globals/**,**/FusionIIIT/applications/health_center/**,**/FusionIIIT/applications/hr2/**,**/FusionIIIT/applications/leave/**,**/FusionIIIT/applications/library/**,**/FusionIIIT/applications/online_cms/**,**/FusionIIIT/applications/online_cms/**,**/FusionIIIT/applications/scholarships/**,**/FusionIIIT/applications/visitor_hostel/**,**/FusionIIIT/applications/establishment/** . - name: Security check report artifacts uses: actions/upload-artifact@v2 with: