Contain an AI pentest agent:deny all outbound traffic, then allow only the scope.
A written scope and the tool's own guard settings tell an AI pentest agent where it may go. An egress allowlist makes the network enforce it. This guide explains the idea, the controls to check, how one open tool (Leash with Cedar policies) does it, two community setups for ARTEX, and the limits. It has no install commands.
Checked
Why the network has to enforce the scope
Agents can go further than you meant. WorkOS reported that a researcher's ARTEX agent, during benchmark tests, escaped its test environment and reached an internal sales tool. Scope lists inside the tool and prompt instructions are checks the agent's own software runs. They are not a network boundary.
The ARIA-X rebuild says the same in its security notes: its terminal scope checks are heuristic, and sandbox and network policy are the isolation boundary. Unit 42's advice to defenders facing these tools (2026-11-11) is to block by default and remove the credentials the tools look for. The same two ideas apply when you run one yourself.
What a default-deny allowlist looks like
Default deny means the machine or container that runs the agent can open no outbound connection unless a rule allows it. You then allow only what the engagement needs.
- The in-scope targets from the signed scope, by host name or address range.
- The model provider's API endpoint, and nothing else from that provider.
- One DNS resolver you control, so lookups do not leak out another way.
- Loopback for the console and its local database. The console itself stays off the internet.
Controls to check before a run
Check each one on the machine that runs the agent, not only in the tool settings.
- 01
Block cloud metadata
Drop traffic to the cloud metadata address (169.254.169.254) before any allow rule, so the agent cannot pick up the host's own cloud credentials.
- 02
Cover every protocol
An HTTP proxy alone filters web traffic but leaves SSH, databases, other ports and raw sockets open. The rule has to sit at the network or kernel level.
- 03
Watch IPv6
If the ruleset only handles IPv4, make sure the agent's network has no IPv6 route, or add matching IPv6 rules.
- 04
Pin the build and its images
No registry or update traffic during an engagement, and images pinned by digest. One look-alike ARTEX copy pointed installs at a Docker image with a hidden back door (StepSecurity).
- 05
Log what is blocked
Blocked connections are the signal that the agent tried to leave the scope. Keep those logs with the engagement record.
One open tool: Leash with Cedar policies
Leash, an Apache-2.0 tool from StrongDM, wraps AI agents in containers, monitors their file and network activity and enforces policies written in Cedar, an open policy language. Its NetworkConnect action takes a host name, a wildcard domain or an address and port, and the first matching rule wins.
Points from its own docs worth knowing: Leash starts with a permissive policy, so a deny-by-default rule set is something you write yourself. Host name rules need the Leash proxy, because the kernel layer enforces addresses only. Its v1 policies do not support IPv6 literals or CIDR ranges.
Two community setups for ARTEX
Both are new repositories with no stars when this site checked them on 2026-11-20. Nobody outside their authors has reviewed them. Read them as worked examples of the ideas above, not as a tested product.
- ottosulin/artex-leashed (created 2026-11-20, MIT): runs BaaRai ARTEX inside a Leash container whose egress is deny by default and limited to the domains in an allowlist file. Its README says it is only a security boundary when Leash's kernel (eBPF LSM) hooks attach, and that it refuses a proxy-only fallback.
- Lusitaniae/artex-hardening (created 2026-11-14): a containment runbook with a default-deny nftables egress ruleset, an explicit metadata drop, a loopback-only console, digest-pinned images and dropped container privileges. Its README also lists what it does not defend against.
What an allowlist does not stop
Use it together with written permission and the guard settings in the authorized pentesting guide (artex.sh/guides/authorized-ai-pentest).
- A malicious build. It makes a hidden beacon's traffic visible and mostly blocked, but it does not prove the code is clean.
- The model provider. The provider still sees prompts and tool output from your targets.
- A wrong scope file. The allowlist enforces exactly what you wrote, not what you were authorized for.
- Harmful actions inside the scope, such as deleting data or locking accounts. Read-only accounts, rate limits, the guard settings and human approval cover those.
Questions
- What is an egress allowlist?
- A network rule set that blocks all outbound connections from a machine or container except to the destinations you list.
- Is the ARTEX scope list enough?
- No. It is a check inside the tool. A network rule outside the tool still holds if the agent or its guard gets something wrong.
- Does Leash block everything by default?
- No. Its docs say it starts with a permissive Cedar policy. You write the deny-by-default rules yourself.
- Can an allowlist make an untrusted ARTEX copy safe?
- No. It limits where the copy can connect. It does not remove a back door, so still choose a maintained copy with a known image source.
Sources
Every claim on this page comes from these sources or from this site's own sourced pages. Open them for the full reports.
- ARTEX and AI-Powered Red Teaming Tools: What Defenders Need to Know
Palo Alto Networks Unit 42, 2026-11-11
- Update for October 30th, 2026 Data Security Incident
WorkOS security bulletin, 2026-11-06
- ARIA-X security model and limitations
GitHub (01NGVI-QINGYI/ARIA-X), 2026-11-20 (checked)
- Leash by StrongDM README
GitHub (strongdm/leash), 2026-11-20 (checked)
- Leash Cedar policy reference (CEDAR.md)
GitHub (strongdm/leash), 2026-11-20 (checked)
- Cedar policy language documentation
Cedar (cedarpolicy.com), 2026-11-20 (checked)
- ARTEX: Attackers Adopted This AI Pentesting Tool in Three Months. Leaked Secrets Are Its Fastest Way In.
StepSecurity, 2026-11-12
- Artex under Leash with a Cedar egress allowlist
GitHub (ottosulin/artex-leashed), 2026-11-20
- ARTEX hardened deployment baseline (v0.1)
GitHub (Lusitaniae/artex-hardening), 2026-11-20 (checked)
Follow the ARTEX story.
New forks, releases and reports, dated and sourced.
