From 45cd3c619281f18b357fcd43cfd8b247b0647552 Mon Sep 17 00:00:00 2001 From: Santhosh Date: Wed, 21 Oct 2026 12:17:39 +0530 Subject: [PATCH] ci: run the existing test suites on push and PR The repo has two real pytest suites -- FileGuard-AES-SHA256/test_main.py (15 tests) and network-sniffer/test_sniffer.py (11 tests) -- and no CI, so nothing verified them on the way in. Add .github/workflows/ci.yml: both suites on every push to main and every PR targeting it, on Python 3.10, 3.11 and 3.12. Actions are pinned by full SHA. The suites need no network and no display: tkinter is imported by FileGuard's main.py, but the tested code paths never open a window. Only the two suites that are real pytest modules are run. The files under APIGuard/tests/ (api1_bola.py, api7_ssrf.py, ...) are OWASP API Security Top 10 test definitions, not pytest modules, and are not collected. Also add a CI badge and note in the README that both suites run in CI. Suite: 15 + 11 = 26 tests, unchanged. Verified on 3.10, 3.11 and 3.12. --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ README.md | 7 ++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a253274 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +# CI: run the test suites on every push to main and every PR targeting it. +# +# This repo is a collection of standalone tools, each with its own +# requirements.txt. Two of them have real pytest suites: +# +# FileGuard-AES-SHA256/test_main.py -- encryption, hashing, key handling +# network-sniffer/test_sniffer.py -- detection database and detectors +# +# The other sub-projects have no tests. Their API test files under +# APIGuard/tests/ are OWASP API Security Top 10 test definitions +# (api1_bola.py, api7_ssrf.py, ...), not pytest modules, and are not +# collected here. +# +# The suites need no network and no display: tkinter is imported by +# FileGuard's main.py but never opens a window in the tested code paths. +# +# Actions are pinned by full SHA. +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ['3.10', '3.11', '3.12'] + steps: + - name: Check out repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install cryptography pytest + + - name: Run test suites + run: | + python -m pytest FileGuard-AES-SHA256/test_main.py -v + python -m pytest network-sniffer/test_sniffer.py -v diff --git a/README.md b/README.md index a964352..87d4065 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ **Author:** Santhosh L **License:** MIT +[![CI](https://github.com/Santhosh595/SecureNET-Toolkit-/actions/workflows/ci.yml/badge.svg)](https://github.com/Santhosh595/SecureNET-Toolkit-/actions/workflows/ci.yml) +[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/) + ## Overview SecureNET Toolkit is an open-source cybersecurity toolkit built with Python. It provides **eighteen** independent security tools and a unified control panel dashboard: a file encryption system, a network intrusion detection system, an HTTP security header analyzer, a multi-threaded port scanner, a hash identifier & cracker, a real-time ARP spoof detector, a subdomain enumerator, a JWT security analyzer, an SSL/TLS security scanner, a hardcoded secret scanner, a DNS security auditor (DNSAudit), a log anomaly monitor (LogSentry), an OWASP API Security Top 10 tester (APIGuard), a template-based HTTP vulnerability scanner (Nuclei-style), a web content/path discovery tool (feroxbuster-style), a multi-cloud security posture checker (Prowler/ScoutSuite-style), a container/dependency CVE scanner (Trivy-style), and a web technology fingerprinter (WhatWeb/httpx-style). @@ -463,6 +466,10 @@ cd network-sniffer python -m pytest test_sniffer.py -v ``` +Both suites also run in CI on every push and pull request, on Python 3.10, +3.11 and 3.12. They need no network and no display — `tkinter` is imported +by FileGuard's `main.py`, but the tested code paths never open a window. + ## Project Structure ```