Skip to content

Commit

Permalink
Add autodoc support
Browse files Browse the repository at this point in the history
  • Loading branch information
vandanrohatgi committed Aug 27, 2022
1 parent cb74cb3 commit 13b5c1b
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
sphinx:
configuration: docs/conf.py
formats: all
python:
version: 3.9
install:
- requirements: docs/requirements.txt
- path: .
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ Tasks for the week:

1. ~~Fix tests github action~~
2. ~~Add Open source license~~
3. Work on tests and documentation
3. ~~Work on tests and documentation~~

doubts:

1. Stable place for the project (personal or crs org?)
2. After the place is decided we can move on to integrating readthedocs to host documentation
3. project report (pdf, blog, or github readme)

Notes:

Expand Down
14 changes: 12 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
The Hypermodern Python Project
Project Seaweed
==============================


Welcome to the documentation of Project Seaweed! Seaweed is a an tool to automate the process of testing CVE(s) against firewalls. It uses CVE(s) from `nuclei templates <https://github.com/projectdiscovery/nuclei-templates>`_ .

It tests these CVEs using `nuclei <https://github.com/projectdiscovery/nuclei>`_ against a docker setup (Modsec-crs as reverse proxy & httpd as backend server).
After the tests are performed, a report is generated in csv format (or json) along with an analysis file (date, time, crs version, nuclei version, number of CVEs tested etc.).
At the end a slack message is sent to the defined slack channel with a short summary of the test!


.. toctree::
:hidden:
:maxdepth: 1

reference
reference
installation
49 changes: 49 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Installation
===============
.. contents::
:local:
:backlinks: none

1. **Clone the repository**

`git clone https://github.com/vandanrohatgi/Project-Seaweed.git`

2. **Install poetry**

Poetry is a tool for dependency management and packaging in Python.

`https://python-poetry.org/docs/#installation <https://python-poetry.org/docs/#installation>`_

3. **Install docker**

This project needs docker to setup a local web server, web application firewall. If you're using a custom waf URL for testing, then docker is not needed.

`https://docs.docker.com/engine/install/ <https://docs.docker.com/engine/install/>`_

5. **Install Nuclei**

The program uses Nuclei to launch attacks. Make sure nuclei is in the path and nuclei templates are installed in the home directory and not a custom directory.

Install from here: `https://nuclei.projectdiscovery.io/nuclei/get-started/#nuclei-installation <https://nuclei.projectdiscovery.io/nuclei/get-started/#nuclei-installation>`_

6. **Select Python version**

The project is tested on Python `3.9.13`. If you have multiple python versions installed, use the following command:

`poetry env use 3.9`

7. **Install the project**

`poetry install`

8. **Finally run the project**

`poetry run project-seaweed`

9. **Get help**

`poetry run project-seaweed --help`

For command specific help

`poetry run project-seaweed tester --help`
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx==2.3.1
sphinx-autodoc-typehints==1.19.2

0 comments on commit 13b5c1b

Please sign in to comment.