diff --git a/.github/workflows/pr_gate.yml b/.github/workflows/pr_gate.yml new file mode 100644 index 0000000..7b3443f --- /dev/null +++ b/.github/workflows/pr_gate.yml @@ -0,0 +1,23 @@ +name: PR Gate Workflow + +on: [pull_request] + +jobs: + lint-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Install dependencies + run: | + pip install poetry + poetry install + - name: Lint with flake8 + run: | + poetry run flake8 scanners/ tests/ + - name: Test with pytest + run: | + poetry run pytest diff --git a/README.md b/README.md index 97068d3..88e7e4c 100644 --- a/README.md +++ b/README.md @@ -50,18 +50,10 @@ Final Output: ## Installation -`pip3 install -r requirements.txt` - -OR - -Run in Virtual Env: +To install the project dependencies, use Poetry: ```console -python3 -m venv .venv - -source .venv/bin/activate - -pip3 install -r requirements.txt +poetry install ``` --- diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..077e3aa --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,43 @@ +[tool.poetry] +name = "scanmaster" +version = "0.1.0" +description = "A security tool designed to perform thorough scans on a target using OpenVAS, Zap, and Nexpose." +authors = ["Vijay "] + +[tool.poetry.dependencies] +python = "^3.8" +asn1crypto = "^0.24.0" +bcrypt = "^3.1.7" +beautifulsoup4 = "^4.8.0" +certifi = "^2019.6.16" +cffi = "^1.12.3" +chardet = "^3.0.4" +cryptography = "^2.7" +defusedxml = "^0.6.0" +gvm-tools = "^2.0.0b1" +idna = "^2.8" +lxml = "^4.4.1" +nltk = "^3.4.5" +paramiko = "^2.6.0" +pprint = "^0.1" +pycparser = "^2.19" +PyNaCl = "^1.3.0" +python-dateutil = "^2.8.0" +python-dotenv = "^0.10.3" +python-gvm = "^1.0.0b3" +python-owasp-zap-v2.4 = "^0.0.15" +rapid7-vm-console = "^1.0.0-6.5.50" +requests = "^2.22.0" +six = "^1.12.0" +soupsieve = "^1.9.2" +terminaltables = "^3.1.0" +tinydb = "^3.13.0" +urllib3 = "^1.25.3" +xmltodict = "^0.12.0" + +[tool.poetry.dev-dependencies] +pytest = "^5.2" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index aee8d8f..0000000 --- a/requirements.txt +++ /dev/null @@ -1,28 +0,0 @@ -asn1crypto==0.24.0 -bcrypt==3.1.7 -beautifulsoup4==4.8.0 -certifi==2019.6.16 -cffi==1.12.3 -chardet==3.0.4 -cryptography==2.7 -defusedxml==0.6.0 -gvm-tools==2.0.0b1 -idna==2.8 -lxml==4.4.1 -nltk==3.4.5 -paramiko==2.6.0 -pprint==0.1 -pycparser==2.19 -PyNaCl==1.3.0 -python-dateutil==2.8.0 -python-dotenv==0.10.3 -python-gvm==1.0.0b3 -python-owasp-zap-v2.4==0.0.15 -rapid7-vm-console===1.0.0-6.5.50 -requests==2.22.0 -six==1.12.0 -soupsieve==1.9.2 -terminaltables==3.1.0 -tinydb==3.13.0 -urllib3==1.25.3 -xmltodict==0.12.0 diff --git a/scanners/__init__.py b/scanners/__init__.py index e69de29..e7e7bed 100644 --- a/scanners/__init__.py +++ b/scanners/__init__.py @@ -0,0 +1,9 @@ +# This __init__.py file is intended to serve as a central point for importing scanner implementations +# and potentially providing common functionality across different scanner types. + +# Importing scanner classes to make them available for use elsewhere in the project +from .nexpose_scanner import NexposeScanner +from .openvas_scanner import OpenVASScanner +from .zap_scanner import ZapScanner + +# Potential common functionality or base classes could be defined here if needed diff --git a/scanners/openvas_scanner.py b/scanners/openvas_scanner.py index 09a28de..d607753 100644 --- a/scanners/openvas_scanner.py +++ b/scanners/openvas_scanner.py @@ -295,4 +295,3 @@ def remove(self, scan_name): def list_scans(self): pass - diff --git a/setup.sh b/setup.sh deleted file mode 100644 index 1ff833c..0000000 --- a/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -echo "[+] Setting up env." - -echo "[+] Installing python dependencies" - -pip3 install -r requirements.txt \ No newline at end of file