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:7onez Cti expert Gated Outbound Action

From Leeroopedia
Knowledge Sources
Domains OSINT, OpSec, Safety_Design
Last Updated 2026-10-28 14:00 GMT

Overview

Design principle that irreversible outbound actions (sandbox submission, MISP push, MISP publish) are gated twice: once in-code (confirm parameter + env lock), once in the harness hook (actionguard), so a three-way merge cannot revert the gate silently.

Description

Gated Outbound Action solves the problem of silent irreversible actions: a sandbox submission hands case material to a third party and touches the target from a published egress range — deleting the task afterwards un-sends nothing. A MISP publish notifies all connected servers and cannot be undone. An agent that can perform these actions without explicit confirmation will burn cases and compromise operations.

The principle enforces defense-in-depth gating:

1. In-code gate (first layer): the function takes a confirm parameter that defaults to False. Without it, the function returns a briefing — what would happen, the irreversible consequences, the cheaper things to try first — and sends nothing. The confirm parameter is a function parameter (not a config value) — a reference file can make the gate STRICTER, but nothing an analyst edits can turn it off.

2. Env lock (for publish): the MISP publish step requires an environment variable (INTEL_MISP_PUBLISH=1) that an agent cannot set for itself. This is a human's act — re-launching with the env lock is the deliberate step.

3. Harness hook (second layer): hooks/actionguard.py fires on the tool NAME and cannot be reached by a sync. The in-code gate lives in vendored intel_engine/ — a three-way merge can revert it without failing a test. The hook lives in cti-expert's own tree and fires on the tool name, so a sync cannot reach it. Adding an outbound capability means adding a row to outbound_actions.json, not just a confirmation flag in the Python.

4. Both gates fail OPEN: a hook that dies must not brick every write in the repo. audit.sh and the git pre-commit hook are the backstop.

Usage

Use this principle when designing any tool that performs an irreversible outbound action where:

  • The action touches third-party infrastructure (sandbox, MISP, notification).
  • An agent must not be able to self-authorize (confirm is a parameter, not a config).
  • A vendored merge must not silently revert the gate (hook in the host tree, not vendored).
  • The briefing (what would happen) must be shown before the action, not after.

Theoretical Basis

The principle is two independent gates on the same action. The in-code gate is the first — it checks confirm and env lock. The hook gate is the second — it fires on the tool name and checks outbound_actions.json. Two gates are needed because they fail independently: the in-code gate can be reverted by a three-way merge (it lives in vendored code), and the hook gate can be disabled by a renamed script (it lives in the host tree). Neither alone is sufficient.

# Abstract pattern (NOT real implementation)
def submit(target, *, confirm=False):
    if not confirm:
        return briefing(target)   # gate 1: in-code
    return _post(target)           # hook fires BEFORE this returns

# hooks/actionguard.py
def on_pre_tool_use(tool_name, args):
    if tool_name in OUTBOUND_ACTIONS:  # gate 2: hook
        if not args.get("confirm"):
            return deny("outbound action requires confirmation")
    return allow()

The fail-open invariant: if the hook itself crashes (e.g. the outbound_actions.json is malformed), it must not brick every write. The hook returns neutral (allow) on error, and audit.sh is the backstop that catches the missing/malformed file.

Related Pages

Implemented By

Used By Workflow

Page Connections

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