Skip to content

Security: MediJr/api-pentesting-toolkit

Security

SECURITY.md

Security & Responsible Use

This toolkit sends traffic to APIs. Used carelessly or without authorisation, that is at best unprofessional and at worst illegal. Read this before using it.

Authorised use only

Use this toolkit only against systems for which you have explicit, written authorisation to test — your own labs, a staging environment you own, or an engagement with a signed scope. Unauthorised testing of third-party systems may violate computer-misuse laws (e.g. the CFAA, the UK Computer Misuse Act, or local equivalents) regardless of intent.

Built-in guard rails

The toolkit is designed to make unsafe use harder:

  • Scope allow-list. Every request passes through a ScopeGuard. A host must be explicitly allow-listed (--allow-host or scope.allowed_hosts). There is no "test everything" mode.
  • No hard-coded targets. The repository contains no real target URLs.
  • No secrets in Git. Tokens are injected via environment variables (${env:VAR}); .env, *.local.yaml, and reports/ are git-ignored.
  • TLS stays on. Verification is enabled by default and only disableable explicitly for a lab with a self-signed certificate.
  • Bounded by default. Global caps on total requests, inter-request delay, concurrency and wall-clock duration. The run aborts on server instability (5xx) or when a budget is hit.
  • Secret redaction. Authorization, Cookie, API-key and similar headers are masked in all logs and reports.
  • No dangerous automation. No credential brute force, no denial of service, no automated exploitation of third parties, no data exfiltration. Writes happen only on operator-declared test data and are opt-in.

What this toolkit will not do

  • Acquire, guess, steal, or bypass real credentials.
  • Enumerate unknown victims' objects by fabricating identifiers.
  • Run deliberately expensive queries against shared infrastructure.
  • Treat a 200 or a different identifier as proof of a vulnerability.

For controls that cannot be confirmed without sensitive actions, the toolkit emits a suspected/inconclusive finding with a documented manual verification procedure instead of automating a risky action.

Reporting a vulnerability in this toolkit

If you find a security issue in the toolkit itself, please open a private report to the maintainer rather than a public issue, and allow reasonable time to fix it.

Handling of reports

Generated reports may contain sensitive details about a target. Treat them as confidential: they are git-ignored by default (reports/, *.report.json).

There aren't any published security advisories