Skip to main content

inject-bender

Security input validation with dual response modes: legal deterrence (NIS2/GDPR compliant audit trail) or comedy (hiking boots for hackers).

Every detected attack is logged with TIBET provenance tokens.

Install

pip install inject-bender

With TIBET audit trail:

pip install inject-bender[tibet]

With FastAPI middleware:

pip install inject-bender[api]

Quick Start

from inject_bender import InjectBender

bender = InjectBender(mode="legal")  # or "comedy"
result = bender.bend("'; DROP TABLE users; --")

if result["was_attack"]:
    print(result["formatted"])
    print(f"Incident: {result['incident_id']}")

Detection Only

from inject_bender import detect

is_attack, attack_type = detect("SELECT * FROM users WHERE 1=1")
# (True, "sql_injection")

Modes

Mode Response Use Case
legal Law citations, NIS2 audit trail, incident reports Production, enterprise
comedy Hiking boot ads (Skippie & Odin) Development, demos, honeypots
silent Detect and log only Monitoring, WAF integration
custom Your own response function Any

ASGI Middleware

from fastapi import FastAPI
from inject_bender.middleware import InjectBenderMiddleware

app = FastAPI()
app.add_middleware(InjectBenderMiddleware, mode="legal")

CLI

inject-bender check "'; DROP TABLE users; --"
inject-bender bend --mode comedy "<script>alert('xss')</script>"
inject-bender laws
inject-bender demo

Attack Types Detected

SQL Injection, XSS, Command Injection, Path Traversal, Prompt Injection, LDAP Injection, XML/XXE, Header Injection, Template Injection (SSTI).

NIS2 Compliance

  • Automatic incident detection and logging
  • Immutable TIBET audit trail
  • Report generation: NIS2, AP (Autoriteit Persoonsgegevens), Politie
  • 24-hour deadline tracking

Legal Mapping

Dutch/EU criminal law per attack type: Sr art. 138ab (computervredebreuk), Sr art. 350a (gegevensvernieling), AVG/GDPR art. 32/33/34, EU AI Act, EU 2013/40.

License

MIT — Humotica AI Lab 2025-2026

Credits

Designed by Jasper van de Meent. Built by Jasper and Root AI as part of HumoticaOS.


Stack-positie: Groep safety · Bootstrap = OSAPI-handshake naar tibet + jis (fail → snaft-rule + tibet-pol-rapport) · ← snaft · See STACK.md · See demo/golden-path/ for the spine end-to-end.

Enterprise

For private hub hosting, SLA support, custom integrations, or compliance guidance:

Enterprise enterprise@humotica.com
Support support@humotica.com
Security security@humotica.com

See ENTERPRISE.md for details.

Metadata

Release files for inject-bender 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inject-bender 0.3.1
File Size Uploaded Provenance Actions
inject_bender-0.3.1.tar.gz 18.9 kB Without provenance Details for inject_bender-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inject-bender 0.3.1
File Interpreter ABI Platform Actions
inject_bender-0.3.1-py3-none-any.whl Python 3 none any Details for inject_bender-0.3.1-py3-none-any.whl

Total release size: 38.4 kB

Release files / inject_bender-0.3.1.tar.gz

Download URL inject_bender-0.3.1.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
14106e8f1e1de3096594c62036104cc521536ff4ec1e2e85e5ac25997c7d6c37
BLAKE2b-256 checksum
How to use checksums
980fe2aa291ed304e7801aaa5564664ba1bc1be0fc8dcaedbfe4f3eba2a7e364
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / inject_bender-0.3.1-py3-none-any.whl

Download URL inject_bender-0.3.1-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a59ba1d45a6e7481a2029856c300663442bd56f9661032dc16a0eabbfc3eb11
BLAKE2b-256 checksum
How to use checksums
d3fa3e8d8c5a219c40524f1d16fd59d7eecfda5c9011ed6ddc1efe7619ec2373
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for inject-bender 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page