ThreatDetect welcomes contributions that improve detection accuracy, extend the Streamlit interface, strengthen the test suite, or clarify documentation. Before you start, read through this page so your changes fit the existing code style and the review process goes smoothly. ThreatDetect is released under the Apache-2.0 license, so any code you contribute will be covered by the same terms.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jazbengu/ThreatDetect/llms.txt
Use this file to discover all available pages before exploring further.
Set up your environment
Make your changes
Edit the source files. Keep changes focused — one logical improvement per pull request makes review easier and keeps the git history readable.
Run the tests
Run the full test suite before pushing to make sure nothing is broken:All tests must pass. If you add a new feature, add corresponding tests in the
unit testing/ directory.Guidelines
Follow these conventions to keep the codebase consistent:- Match the existing code style. ThreatDetect does not enforce a linter yet, so model your code on the patterns already in
streamlit_app.py— clear variable names, inline comments for non-obvious logic, and pandas operations kept explicit rather than chained. - Add tests for new features. Every new function or behaviour should have at least one test in
unit testing/. Use the shared fixtures fromconftest.py(sample_raw_data,mock_model_package) wherever they apply so you avoid duplicating fixture code. - Keep changes focused. Avoid bundling unrelated refactors, formatting sweeps, or dependency upgrades into the same PR as a feature or bug fix.
- Do not break the existing tests. If your change intentionally alters existing behaviour, update the affected tests and explain the reason in the PR description.
License
By contributing to ThreatDetect you agree that your contributions will be licensed under the Apache-2.0 license. TheLICENSE file in the repository root covers all source files.