Contributing¶
Contributions are welcome — bug reports, feature requests, and pull requests all help.
Development setup¶
git clone https://github.com/CyberSecAuto-Labs/netaudit.git
cd netaudit
python3.11 -m venv .venv
.venv/bin/pip install -e ".[dev,docs]"
Run the full check suite before opening a PR:
.venv/bin/ruff check .
.venv/bin/ruff format --check .
.venv/bin/mypy netaudit/
.venv/bin/pytest -m 'not integration' --cov=netaudit --cov-fail-under=80
Integration tests require strace (Linux only):
Or with Make:
Coding conventions¶
- Type annotations: all public functions require type annotations;
mypy --strictmust pass. - Formatting:
ruff format(line-length 100);ruff checkwith E, F, W, I rules. - Tests: every new behaviour should have a unit test. Aim to keep coverage above 80%.
- No runtime dependencies: the only allowed runtime deps are
clickandpyyaml.pytestis an optional dev dependency for the plugin — never import it in core modules.
Architecture¶
The codebase has a strict two-layer separation:
- Core (
netaudit/): framework-agnostic; no pytest imports. - Integrations (
netaudit/integrations/): framework-specific wrappers; may import from core but core must never import from integrations.
See Architecture for a detailed overview.
Commit style¶
Use Conventional Commits:
feat: add --dry-run flag to run command
fix: handle truncated strace output on SIGKILL
docs: document Docker usage
Opening a pull request¶
- Fork the repo and create a branch from
main. - Make your changes with tests.
- Run
make lint && make test— both must pass. - Open a PR against
mainwith a clear description of the change.
For significant features, open an issue first to discuss the design.