Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inject_bender-0.3.1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inject_bender-0.3.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file inject_bender-0.3.1.tar.gz.

File metadata

  • Download URL: inject_bender-0.3.1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for inject_bender-0.3.1.tar.gz
Algorithm Hash digest
SHA256 14106e8f1e1de3096594c62036104cc521536ff4ec1e2e85e5ac25997c7d6c37
MD5 1a4a9d06ea76d86c60ca1595bd32e1e0
BLAKE2b-256 980fe2aa291ed304e7801aaa5564664ba1bc1be0fc8dcaedbfe4f3eba2a7e364

See more details on using hashes here.

File details

Details for the file inject_bender-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: inject_bender-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for inject_bender-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a59ba1d45a6e7481a2029856c300663442bd56f9661032dc16a0eabbfc3eb11
MD5 1800df760f765bc7812d98969f758f6c
BLAKE2b-256 d3fa3e8d8c5a219c40524f1d16fd59d7eecfda5c9011ed6ddc1efe7619ec2373

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page