Skip to content

Contributing

belettetimoree edited this page Nov 1, 2026 · 1 revision

Contributing

Soaphound.py takes pull requests from external contributors. The project targets a tight scope — ADWS-first offensive tooling against Active Directory — so the first thing to read before opening a non-trivial PR is this page.

Scope of contributions welcome

  • New primitives against the ADWS attack surface (CustomActions, WS-Transfer writes, SOAP endpoints the current code does not touch yet).
  • Hardening to the existing collectors: additional object classes, missing BloodHound schema fields, cross-forest edge cases.
  • Detection documentation improvements (new DC-side signals, SACL guidance, SIEM content).
  • Bug fixes against observed field behaviour, with a reproducer or a short lab description in the PR body.
  • Test coverage additions. The existing suite under tests/ is the baseline — new features should ship with at least one test exercising them.

Out of scope: LDAP-only features (BloodHound.py already covers that transport), SharpHound re-implementations, and generic AD tooling unrelated to the ADWS attack surface.

Dev setup

git clone https://github.com/j4s0nmo0n/Soaphound.py.git
cd Soaphound.py
pipx install -e .

The -e keeps the installation editable so changes in src/soaphound/ take effect without reinstalling. pipx isolates the venv so system Python stays untouched.

Run the tests:

pytest tests/

Branch naming conventions

Observed on the repo and expected on new PRs:

Pattern Used for
feat/<slug> New feature branches (e.g. feat/cert-enroll-soap, feat/collection-duration).
feature/<slug> Legacy alias of feat/<slug>; both are accepted.
fix/<slug> Bug fixes (e.g. fix/schema-nc-referral-fallback).
release/pypi-<version> Release branches for PyPI cuts.

Commit message style

The project follows Conventional Commits. Examples drawn from the current history:

feat(adcs): add --enroll-ws, --list-policies-ws, --user-agent, --auth-dc
feat(trust-audit): forest-wide AD trust audit and misconfiguration report
fix(adcs): align ESC detection with Certipy on 4 fronts
fix(cert-find): revert Template Name to cn (aligned with Certipy)
chore(cert-find): suppress urllib3 InsecureRequestWarning during web probe
docs: add CHANGELOG for v1.2.1

Subjects stay in the imperative, under ~72 characters. Body paragraphs explain the reason for the change, not the diff itself.

Commits for public-facing offensive security code are maintained in English. Attribution lines mentioning an AI assistant are not accepted — commits must be authored by a human and signed off accordingly.

PR process

  1. Fork, branch, implement.
  2. Run pytest tests/.
  3. Open the PR against main, with:
    • A short description of the change and its motivation.
    • Lab or field reproducer when the change fixes observed behaviour.
    • A note on whether CHANGELOG.md needs updating.
  4. The maintainer reviews, usually within a few days.
  5. On merge, the maintainer tags the next version if the change is user-facing.

Testing

pytest tests/

tests/ currently covers:

  • Encoder round-trips (NMF, NBFSE, inband dictionary).
  • ADWS pull parsing, including the pagination retry branch.
  • Trust trustAttributes decoding against known-good lab fixtures.
  • --cert-find detection logic against synthetic templates.

New primitives should ship with at least one unit test and a short field reproduction note. Integration tests against a live AD lab are not in-tree — maintain those externally and link from the PR body.

Where things live in the repo

Path What's there
src/soaphound/soaphound.py CLI entry point, run orchestration, output writing.
src/soaphound/lib/cli.py argparse definitions.
src/soaphound/ad/adws.py ADWS/NMF client, Enumeration/Pull/Put, MS-ADCAP CustomActions.
src/soaphound/ad/encoder/ NMF/NBFSE encoder/decoder with inband dictionary support.
src/soaphound/ad/collectors/ One file per BloodHound object class, plus the SYSVOL enrichment and --cert-find.
src/soaphound/adcs/ AD CS enrollment path: xcep.py, wstep.py, csr.py, kerb_tgt.py and the XML templates/.
src/soaphound/ad/trust_audit_report.py --trust-audit report writer.
tests/ Pytest suite.
CHANGELOG.md Human-written release history.

References

Clone this wiki locally