On February 17, 2026, an unauthorized party published a modified Cline CLI package using a compromised npm token. Cline's maintainers report that the modification added an unexpected OpenClaw install. The CLI binary was unchanged, and the editor extensions were outside the incident scope. The maintainer report establishes the package exposure window. It does not establish a count of compromised machines. Cline postmortem.
Review the release boundary
Separate public issue triage from the authority to publish a release. Give the triage workflow only the tools and credentials it needs. Review which identities can change the trusted release workflow and publish artifacts. Cline reports that it moved npm publication to OIDC provenance after the incident.
Pre-action authorization is one control for tool calls routed through a connected enforcement point. Pair it with least-privilege workflow permissions, isolated publishing credentials and package provenance. The examples below illustrate a possible defensive configuration and do not describe a mitigation deployed during the incident.
Component 1: The passport (identity + capabilities + limits)
An OAP passport is a JSON document that cryptographically binds an agent's identity to what it is allowed to do. Here is a compliant passport for an issue triage agent, using the actual OAP v1.0 schema:
{
"passport_id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "template",
"spec_version": "oap/1.0",
"owner_id": "org_cline_12345678",
"owner_type": "org",
"assurance_level": "L2",
"status": "active",
"capabilities": [
{
"id": "github.issue.comment"
},
{
"id": "github.issue.label"
},
{
"id": "github.issue.assign"
}
],
"limits": {
"github.issue.comment": {
"max_per_hour": 10,
"max_length_chars": 4000
},
"github.issue.label": {
"max_labels_per_issue": 5,
"allowed_labels": ["bug", "enhancement", "documentation", "question", "wontfix"]
}
},
"regions": ["US", "EU", "CA"],
"metadata": {
"name": "Cline Issue Triage Bot",
"description": "AI agent for GitHub issue triage - READ ONLY, no shell access",
"version": "1.0.0",
"contact": "[email protected]",
"repository": "https://github.com/cline/cline"
},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-02-01T00:00:00Z",
"version": "1.0.0"
}
Notice what's absent from this passport's capabilities:
system.command.execute(shell execution)npm.install(package installation)agent.session.create(agent session creation)file.write(file writes)
The agent is what the passport says it is. It cannot expand its own capabilities; the signature would fail verification.
Component 2: The decision (authorization outcome)
When a tool call is attempted, APort evaluates it against the passport and returns a decision using the OAP v1.0 Decision schema:
{
"decision_id": "550e8400-e29b-41d4-a716-446655440003",
"policy_id": "system.command.execute.v1",
"agent_id": "550e8400-e29b-41d4-a716-446655440001",
"owner_id": "org_cline_12345678",
"assurance_level": "L2",
"allow": false,
"reasons": [
{
"code": "oap.capability_not_granted",
"message": "Capability 'system.command.execute' is not in this agent's passport"
}
],
"created_at": "2026-01-28T14:32:10Z",
"expires_in": 300,
"passport_digest": "sha256:abcd1234efgh5678ijkl9012mnop3456",
"signature": "ed25519:efgh5678ijkl9012mnop3456qrst7890==",
"kid": "oap:registry:key-2026"
}
A deny decision tells the connected consumer to stop the proposed call. Verify enforcement at the application or tool boundary. Hosted signed decisions can document the evaluated context, policy and outcome. Use executor records to check what ran and whether it produced side effects. Decision and enforcement contract.
Test one proposed control
Choose a harmless permitted triage action and a prohibited test action. Verify that the intended hook sees both calls, that a denial stops dispatch, and that paths outside the hook have their own controls. Test what happens when verification is unavailable. Review subprocesses, package lifecycle behavior and credential access as distinct boundaries.
Installation for supported integrations
For OpenClaw (5 minutes)
# Run the setup wizard
npx @aporthq/aport-agent-guardrails openclaw
# The wizard will:
# 1. Create a passport at ~/.openclaw/aport/passport.json
# 2. Install the before_tool_call plugin
# 3. Set up audit logging
# 4. Test the guardrail
# Verify it's running
aport-guardrail system.command.execute '{"command":"ls"}' # → ALLOW
aport-guardrail system.command.execute '{"command":"rm -rf /"}' # → DENY
For Cursor
npx @aporthq/aport-agent-guardrails cursor
# Writes ~/.cursor/hooks.json with beforeShellExecution hook
# Restarts automatically
For LangChain (python)
# Step 1: Create passport and config
npx @aporthq/aport-agent-guardrails langchain
# Step 2: Install the Python runtime adapter
pip install aport-agent-guardrails-langchain
# Step 3: Set up the adapter
aport-langchain setup
# Step 4: Add to your agent
from langchain.agents import AgentExecutor
from aport_guardrails_langchain import APortCallback
# APortCallback intercepts every tool call before execution
guardrail = APortCallback()
agent_executor = AgentExecutor(
agent=agent,
tools=tools,
callbacks=[guardrail] # This agent passes configured tool calls through the guardrail
)
For CrewAI (python)
npx @aporthq/aport-agent-guardrails crewai
pip install aport-agent-guardrails-crewai
aport-crewai setup
from crewai import Agent
from aport_guardrails_crewai import register_aport_guardrail
@register_aport_guardrail()
def before_tool_call(tool_name: str, tool_input: dict) -> dict:
# Configure which calls the hook can evaluate
# Return the input unchanged to allow, or raise to deny
return tool_input
For GitHub Actions workflows (Clinejection-specific)
# .github/workflows/ai-triage-secure.yml
name: AI Issue Triage (APort-Protected)
on:
issues:
types: [opened]
jobs:
triage:
runs-on: ubuntu-latest
permissions:
issues: write
# Explicitly NOT granting: contents, packages, actions
steps:
- name: Setup APort Passport
run: |
npx @aporthq/aport-agent-guardrails openclaw \
--non-interactive \
--output /tmp/triage-passport.json
- name: Validate Passport Has No Shell Capabilities
run: |
# Fail the workflow if passport grants shell access
cat /tmp/triage-passport.json | python3 -c "
import json, sys
p = json.load(sys.stdin)
caps = [c['id'] for c in p.get('capabilities', [])]
forbidden = ['system.command.execute', 'file.write', 'agent.session.create']
violations = [c for c in caps if any(f in c for f in forbidden)]
if violations:
print(f'SECURITY FAIL: Forbidden capabilities in passport: {violations}')
sys.exit(1)
print('Passport security check passed')
"
- name: Run AI Triage with Guardrail
uses: anthropic/claude-code-action@v2
with:
allowed_non_write_users: "*"
env:
APORT_GUARD_ENABLED: "true"
APORT_PASSPORT_PATH: "/tmp/triage-passport.json"
APORT_AUDIT_LOG: "/tmp/aport-audit.log"
- name: Upload APort Audit Log
if: always()
uses: actions/upload-artifact@v4
with:
name: aport-audit-${{ github.event.issue.number }}
path: /tmp/aport-audit.log
Exercise suspension and credential recovery
In a disposable environment, suspend the passport and test whether each connected caller observes the new status and stops a new protected action. Record what happens to cached decisions and work already started. A workflow owner should separately disable affected jobs, revoke exposed credentials and verify the state of published artifacts.
A passport records identity and authority. A policy decision records whether a request was allowed. The connected executor supplies evidence of what happened. Review those records together with repository and package logs when investigating a release.
Get started
# OpenClaw
npx @aporthq/aport-agent-guardrails openclaw
# Cursor
npx @aporthq/aport-agent-guardrails cursor
# LangChain
npx @aporthq/aport-agent-guardrails langchain
pip install aport-agent-guardrails-langchain && aport-langchain setup
# CrewAI
npx @aporthq/aport-agent-guardrails crewai
pip install aport-agent-guardrails-crewai && aport-crewai setup
- GitHub: aporthq/aport-agent-guardrails
- Website: aport.io
- Pricing: aport.io/pricing
- Enterprise rollout: aport.io/enterprise
- OAP Specification: github.com/aporthq/aport-agent-guardrails/external/aport-spec/oap/oap-spec.md
References
- Grith.ai Security Team. (2026). Clinejection: When Your AI Tool Installs Another. https://grith.ai/blog/clinejection-when-your-ai-tool-installs-another
- Shapira, N., Wendler, C., Yen, A., et al. (2026). Agents of Chaos: An Empirical Study of Autonomous LLM Agent Failures. arXiv:2602.20021 [cs.AI]. https://arxiv.org/abs/2602.20021
- Uchibeke, U., & APort Engineering Team. (2026). Open Agent Passport (OAP) v1.0: Authorization Specification for AI Agent Interoperability. Zenodo. https://doi.org/10.5281/zenodo.18901596
- Cline. (2026). Unauthorized Cline CLI npm publish postmortem.