We're glad you're thinking about contributing to this project. Whether you are reporting a bug, suggesting a feature, or submitting a code change, we appreciate your help.
Before contributing, please read the LICENSE and README.
EleVADR is an open-source project, and we welcome community contributions. Here is the recommended workflow:
Submit bug reports or feature requests through the issue tracker or discussions on GitHub. For complex ideas, discuss them in an issue before implementation so there is agreement on direction.
Make changes on a personal fork of the repository. Use descriptive
branch names such as fix/slow-analysis-processing or
feat/new-ot-protocol.
We follow the Conventional Commits specification. This helps automate changelogs and versioning.
Format: <type>(optional-scope): <description>
Common Types:
feat: A new featurefix: A bug fixdocs: Documentation changesstyle: Formatting or similar changes with no code impactrefactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testsci: Changes to CI configuration files and scriptschore: Other changes that do not modify source or test filessec: Changes that impact system security
Ensure your code is clean and functional before submitting.
-
Format and lint: If you are in the Dev Container,
pre-commithandles this automatically. To run it manually:pre-commit run --all-files
-
Test: Run the test suite to ensure there are no regressions:
pytest
If your change introduces a feature or modifies existing behavior,
update the documentation. Documentation drifts quickly, so we place a
high emphasis on keeping the /docs folder and the README current.
Follow the PR template. If your code is not ready for merge but you want feedback, open the PR as a Draft so maintainers know the work is still in progress.
To avoid "it works on my machine" issues and the complexity of local setup, all development should happen inside the VS Code Dev Container.
- Open the repository in VS Code.
- Click Reopen in Container when prompted, or run
Ctrl+Shift+Pand selectDev Containers: Rebuild and Reopen in Container.
- Package management: We use
uv.- Use
uv syncto update dependencies. - Use
uv run <command>to execute scripts in the environment.
- Use
- Git hooks: Run
pre-commit installonce inside the container to enable automatic linting on every commit.
If you cannot use Dev Containers, you can set up the environment manually. You are responsible for installing system-level dependencies such as Zeek and libpcap, which can be difficult across operating systems.
Install the following on your host machine before proceeding:
- Python 3.14+
- Zeek 8.0.5 in your system
PATH - libpcap for Zeek PCAP support
uvas the Python package manager- Install with:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Install with:
# Clone the repository
git clone https://github.com/cisagov/elevadr-web-backend.git
cd elevadr-web-backend
# Install dependencies using uv
uv syncTo ensure your code passes CI, install the pre-commit hooks:
uv run pre-commit installVerify that the environment is working by running the tests:
uv run pytestCommon Manual Setup Issues:
- Zeek path: If
pytestfails with a "Zeek not found" error, ensure/opt/zeek/binor your install path is included inPATH. - Library mismatches: If you encounter
ImportErrorrelated tolibpcaporlibmaxminddb, install the appropriate development headers through your package manager.
Maintainers review all changes through the lens of critical infrastructure safety. Because EleVADR is deployed on sensitive OT networks, we prioritize:
- Trustworthiness: Scrutinize changes for backdoors or malicious logic, especially from new contributors.
- Correctness: Ensure changes use the correct internal APIs, such as
utilsfor file I/O rather than raw Python calls. - Stability: Treat changes to core data models in
src/app/data/as high risk because they can affect every module.
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you agree to comply with this waiver of copyright interest.