Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:0xSteph Pentest ai Authorization Consent Gate

From Leeroopedia
Knowledge Sources
Domains Security_Testing, Authorization, Legal
Last Updated 2026-10-23 12:00 GMT

Overview

A legal-authorization gate requiring explicit per-machine consent before any network operations, persisted as a clickwrap-equivalent record to close the "I didn't know I needed authorization" defense.

Description

Authorization Consent Gate is the principle that offensive security tooling must not perform network operations until the user has explicitly accepted an Acceptable Use Policy (AUP) confirming they have written authorization to test every target. It solves the legal problem that running security tools against unauthorized targets is a crime, and the operator needs a provable consent record.

The consent gate:

  • First run: Displays the AUP prompt; user must type 'yes' to proceed
  • Persistence: Consent is written to `~/.pentest-ai/aup-consent.txt` with ISO timestamp, AUP version, and URL — a clickwrap-equivalent contract
  • CI override: `PENTEST_AI_AUP_ACCEPTED=1` skips the prompt without persisting (for non-interactive CI the operator controls)
  • Revocation: Deleting the consent file re-prompts on the next run
  • Config override: `PENTEST_AI_CONFIG_DIR` overrides the default `~/.pentest-ai/` directory

Usage

Use this principle when:

  • Building offensive security tooling that performs real network operations
  • Legal compliance requires provable, per-machine consent
  • The tool runs in both interactive (terminal) and non-interactive (CI) contexts
  • The consent record must be an auditable artifact (timestamp, version, URL)

Theoretical Basis

Consent is a state machine:

consent={Trueif env AUP_ACCEPTED=1Trueif consent file existsTrueif interactive and user types 'yes'Falseotherwise

The consent file is the legal artifact:

# Consent file format (NOT real implementation)
# ~/.pentest-ai/aup-consent.txt
accepted_at: 2026-10-23T12:00:00+00:00
version: 1.0
aup_url: https://pentestai.xyz/aup
terms_url: https://pentestai.xyz/terms

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment