Thanks for your interest. The project is small and the workflow is deliberately low-ceremony.
git clone https://github.com/hubzero/botshield.git
cd botshield
sudo tests/setup/provision.sh
tests/run --parallel --mark "not browser"provision.sh is idempotent; it installs apt packages, builds and
installs the module, sets up a self-signed-cert HTTPS dev vhost on
localhost, generates per-provider dummy captcha secrets, and
creates the test venv at tests/.venv/. Re-run it any time you
want to reset the environment.
After that, tests/run is the dispatcher — flags + markers are
documented in tests/README.md.
- Bugs: open a GitHub issue with reproduction steps. A minimal
Apache config snippet plus a
curlinvocation that triggers the problem is the gold standard. - Security bugs: do not open public issues. See SECURITY.md.
- Questions / feature ideas: GitHub Discussions is fine for open-ended things; issues are fine for things you want tracked.
- Fork → branch from
main. - Make the change. Keep it focused — one concern per PR is easier to review than three concerns bundled.
- Run the test suite:
PRs are gated on CI. Locally-green tests + clean CI is the baseline; flake-on-CI-only happens occasionally and is a conversation, not an automatic block.
tests/run --parallel
- Rebuild the docs if you touched
docs-src/*.mdorsite-src/*:The CImake docs git add docs/
docs-freshjob will fail your PR if you forget. - Commit messages: imperative, focused on the why when it isn't obvious from the diff. The git log shows the style; copy what you see. No "fix typo" PRs are too small to be welcome.
- Open the PR. Describe what changed and what you tested. Screenshots / log excerpts when relevant.
src/— the C source. 19 modules, each.cpaired with.h.DESIGN.mdexplains the module split.apache/botshield-dev.conf— the dev vhost. Path-templated through${BS_REPO}so it works on any developer's checkout.docs-src/— markdown source for the operator handbook (rendered todocs/bymake docs).tests/pytests/— pytest cases. Reusable framework helpers intests/botshield_test/.tests/fuzz/— LibFuzzer harnesses for the cookie + robots parsers.tests/bench/— wrk + oha benchmark scripts.tools/—build_site.py(docs renderer) +refresh-bot-ranges.sh(operator cron tool).
CHANGELOG.md is date-organized and gets an entry per
notable PR. DESIGN.md is current-state architecture; update it
when you change behavior, not just when you ship a feature.
- C99. Apache style for indentation (4 spaces, no tabs except
Makefile).
.editorconfigenforces the basics. - Function/symbol prefixes:
bs_/BS_for cross-file public symbols. File-local helpers usestaticand don't need the prefix. - Comments explain why something is the way it is when the
code itself can't say it. Don't narrate what
if (x > 0)does; do explain why we pickedx > 0overx >= 0. - No regex on the hot path — hand-rolled byte scanners
(
memcmp/memchr). Reserve regex for config-time.
By contributing, you agree your contribution is licensed under the MIT License (see LICENSE).