Skip to content

Commit 98d4408

Browse files
committed
feat: new update
1 parent 9ebc38e commit 98d4408

10 files changed

Lines changed: 594 additions & 10 deletions

File tree

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Thank you for your interest in contributing! We welcome contributions from devel
55
## 🚀 Quick Start
66

77
1. **Fork** the repository
8-
2. **Clone** your fork: `git clone https://github.com/zeemscript/vulnscanner.git`
8+
2. **Clone** your fork: `git clone https://github.com/yourusername/vulnscanner.git`
99
3. **Create** a feature branch: `git checkout -b feature/amazing-feature`
1010
4. **Make** your changes
11-
5. **Test** your changes: `pip install -e . && vulnscan --help`
11+
5. **Test** your changes: `python test_scanner.py`
1212
6. **Commit** your changes: `git commit -m 'Add amazing feature'`
1313
7. **Push** to your branch: `git push origin feature/amazing-feature`
1414
8. **Open** a Pull Request
@@ -26,17 +26,17 @@ Thank you for your interest in contributing! We welcome contributions from devel
2626

2727
```bash
2828
# Clone repository
29-
git clone https://github.com/zeemscript/vulnscanner.git
29+
git clone https://github.com/yourusername/vulnscanner.git
3030
cd vulnscanner
3131

32-
# Install in development mode
33-
pip install -e .
32+
# Install dependencies
33+
pip install -r requirements.txt
3434

35-
# Test installation
36-
vulnscan --help
35+
# Run tests
36+
python test_scanner.py
3737

3838
# Test scanner
39-
vulnscan httpbin.org --scan-types web --timeout 10
39+
python main.py httpbin.org --scan-types web --timeout 10
4040
```
4141

4242
### Docker Setup
@@ -45,8 +45,8 @@ vulnscan httpbin.org --scan-types web --timeout 10
4545
# Build image
4646
docker build -t vulnscanner .
4747

48-
# Test installation
49-
docker run --rm vulnscanner vulnscan --help
48+
# Run tests
49+
docker run --rm vulnscanner python test_scanner.py
5050
```
5151

5252
## 📋 Contribution Guidelines

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ global-exclude __pycache__
1111
global-exclude .git*
1212
global-exclude .DS_Store
1313
global-exclude *.egg-info
14+

Makefile

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# VulnScan AI Makefile
2+
# Easy commands for development and testing
3+
4+
.PHONY: help install test lint format security clean docker-build docker-run
5+
6+
# Default target
7+
help:
8+
@echo "VulnScan AI - Available Commands:"
9+
@echo ""
10+
@echo "Development:"
11+
@echo " install - Install basic dependencies"
12+
@echo " install-full - Install all dependencies (including dev tools)"
13+
@echo " install-dev - Install in development mode"
14+
@echo " test - Run tests"
15+
@echo " test-with-coverage - Run tests with coverage report"
16+
@echo " lint - Run linting"
17+
@echo " format - Format code"
18+
@echo " security - Run security checks"
19+
@echo ""
20+
@echo "Docker:"
21+
@echo " docker-build - Build Docker image"
22+
@echo " docker-run - Run Docker container"
23+
@echo ""
24+
@echo "Utilities:"
25+
@echo " clean - Clean up generated files"
26+
@echo " scan-example - Run example scan"
27+
28+
# Development commands
29+
install:
30+
pip install -r requirements-basic.txt
31+
32+
install-full:
33+
pip install -r requirements.txt
34+
35+
install-dev:
36+
pip install -r requirements.txt
37+
pip install -e .
38+
39+
test:
40+
pytest tests/ -v
41+
42+
test-with-coverage:
43+
pytest tests/ -v --cov=vulnscan_ai --cov-report=term-missing
44+
45+
test-fast:
46+
pytest tests/ -v -m "not slow"
47+
48+
lint:
49+
flake8 vulnscan_ai/ tests/
50+
mypy vulnscan_ai/
51+
52+
format:
53+
black vulnscan_ai/ tests/
54+
isort vulnscan_ai/ tests/
55+
56+
security:
57+
safety check
58+
bandit -r vulnscan_ai/
59+
60+
# Docker commands
61+
docker-build:
62+
docker build -t vulnscan-ai .
63+
64+
docker-run:
65+
docker run --rm -it vulnscan-ai
66+
67+
# Example scan
68+
scan-example:
69+
python -m vulnscan_ai.main httpbin.org --scan-types web ssl --output json
70+
71+
# Clean up
72+
clean:
73+
find . -type f -name "*.pyc" -delete
74+
find . -type d -name "__pycache__" -delete
75+
find . -type d -name "*.egg-info" -exec rm -rf {} +
76+
rm -rf build/
77+
rm -rf dist/
78+
rm -rf htmlcov/
79+
rm -rf .coverage
80+
rm -rf .pytest_cache/
81+
82+
# Full development setup
83+
setup: install-dev
84+
@echo "Setting up development environment..."
85+
@echo "Copy env.example to .env and update with your API keys"
86+
@echo "Run 'make test' to verify installation"

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ A lightweight, AI-powered vulnerability scanner that helps developers identify s
2626
pip install vulnscan-ai
2727
```
2828

29+
### Development Installation
30+
31+
```bash
32+
# Clone the repository
33+
git clone https://github.com/zeemscript/vulnscanner.git
34+
cd vulnscanner
35+
36+
# Install in development mode
37+
make install-dev
38+
39+
# Run tests
40+
make test
41+
42+
# Run example scan
43+
make scan-example
44+
```
45+
2946
### Basic Usage
3047

3148
```bash
@@ -37,6 +54,9 @@ vulnscan example.com --scan-types web ssl --output html
3754

3855
# High-performance scanning
3956
vulnscan example.com --threads 20 --batch-size 50
57+
58+
# Interactive mode with guided scanning
59+
vulnscan --interactive
4060
```
4161

4262
## 🎯 Essential Commands

env.example

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# VulnScan AI Configuration
2+
# Copy this file to .env and update with your values
3+
4+
# API Keys (Optional - for enhanced scanning)
5+
SHODAN_API_KEY=your_shodan_api_key_here
6+
VIRUSTOTAL_API_KEY=your_virustotal_api_key_here
7+
8+
# Scanner Configuration
9+
VULNSCANNER_THREADS=10
10+
VULNSCANNER_TIMEOUT=30
11+
VULNSCANNER_USER_AGENT=Mozilla/5.0 (compatible; VulnScanner/1.0)
12+
13+
# Logging Configuration
14+
VULNSCANNER_LOG_LEVEL=INFO
15+
VULNSCANNER_LOG_FILE=logs/vulnscan.log
16+
17+
# Security Settings
18+
VULNSCANNER_MAX_SCAN_DURATION=3600
19+
VULNSCANNER_RATE_LIMIT=100

pytest.ini

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[tool:pytest]
2+
testpaths = tests
3+
python_files = test_*.py
4+
python_classes = Test*
5+
python_functions = test_*
6+
addopts =
7+
-v
8+
--tb=short
9+
--strict-markers
10+
--disable-warnings
11+
markers =
12+
slow: marks tests as slow (deselect with '-m "not slow"')
13+
integration: marks tests as integration tests
14+
unit: marks tests as unit tests

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Tests package for VulnScan AI

0 commit comments

Comments
 (0)