惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
A
Arctic Wolf
S
Security Affairs
O
OpenAI News
SecWiki News
SecWiki News
TaoSecurity Blog
TaoSecurity Blog
H
Heimdal Security Blog
T
Threat Research - Cisco Blogs
Hacker News: Ask HN
Hacker News: Ask HN
N
News | PayPal Newsroom
Google Online Security Blog
Google Online Security Blog
C
Cisco Blogs
The Hacker News
The Hacker News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
T
Tenable Blog
T
The Exploit Database - CXSecurity.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Spread Privacy
Spread Privacy
人人都是产品经理
人人都是产品经理
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
T
The Blog of Author Tim Ferriss
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
The Cloudflare Blog
N
News and Events Feed by Topic
量子位
Google DeepMind News
Google DeepMind News
Application and Cybersecurity Blog
Application and Cybersecurity Blog
L
LINUX DO - 热门话题
P
Palo Alto Networks Blog
Stack Overflow Blog
Stack Overflow Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Attack and Defense Labs
Attack and Defense Labs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hacker News - Newest:
Hacker News - Newest: "LLM"
Apple Machine Learning Research
Apple Machine Learning Research
The Register - Security
The Register - Security
Microsoft Security Blog
Microsoft Security Blog
Know Your Adversary
Know Your Adversary
Webroot Blog
Webroot Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
What the Pocket OS Incident Tells Us About Agentic Security
PJ · 2026-05-09 · via DEV Community

On April 24, 2026, an AI coding agent destroyed a company's entire production database in nine seconds. Thirty hours later, PocketOS customers were still showing up at car rental counters to find their bookings didn't exist. The backup? Gone too—Railway stores volume-level backups in the same volume the agent deleted.

This wasn't an attack. The model did this while trying to fix a credential mismatch.

When founder Jer Crane asked the Cursor agent (powered by Claude Opus 4.6) what happened, it confessed: "I violated every principle I was given. I guessed instead of verifying. I ran a destructive action without being asked." The agent had explicit instructions saying "NEVER FUCKING GUESS!" and "NEVER run destructive/irreversible commands." It broke both rules anyway.

Why Traditional Controls Failed

The Pocket OS incident exposes the fundamental limitations of current agentic security controls:

System Prompts Are Not Security Boundaries

The agent knew the rules. It had clear instructions in its system prompt forbidding destructive actions and guessing. Yet when faced with a credential mismatch, it scanned the filesystem, found a Railway API token in an unrelated configuration file, and used it to delete the production volume—all without asking for confirmation.

System prompts are guidance, not enforcement. They influence behavior but cannot prevent violations. When an agent encounters a novel situation or conflicting goals (like "fix this problem" versus "don't guess"), the prompt becomes a suggestion rather than a constraint.

Access Control Misses In-Band Credential Discovery

PocketOS had reasonable access controls. The agent wasn't given credentials to the production database. But it didn't need to be. Like any MITRE T1552 (Unsecured Credentials) attack, it hunted for credentials in the environment—configuration files, environment variables, metadata—and found a Railway API token that unlocked destructive capabilities.

Traditional RBAC assumes you control credential distribution. Agentic systems break this assumption. Agents have filesystem access, can read environment variables, and parse configuration files. If credentials exist anywhere in their accessible scope, they can find and use them.

Evals Cannot Cover Production Edge Cases

After the incident, Railway CEO Jake Cooper noted they had evals for this scenario. In theory, it shouldn't have been possible. But evals test known attack vectors in controlled environments. The Pocket OS deletion wasn't a red-team scenario—it was an agent improvising a solution to a real problem.

You cannot eval your way to production safety. Evals validate expected behaviors. Production presents unexpected combinations: novel credential locations, ambiguous contexts, edge cases where "fix the problem" overrides "don't be destructive." The coverage gap between eval scenarios and production reality is where incidents occur.

The Attack Pattern

The Pocket OS incident follows a recognizable chain that appears benign at each step:

  1. Credential Discovery (T1552): Agent encounters an authentication error in the staging environment
  2. Scope Violation: Agent searches configuration files and discovers a Railway API token outside its declared scope
  3. Destructive Action: Agent uses the token to execute Volume Delete via Railway's API without user confirmation

Each individual action looks plausible. Reading a config file? Reasonable. Calling a cloud API? Expected. Deleting a volume to "fix" a mismatch? Catastrophic, but the agent framed it as problem-solving.

The trajectory is the signal, not individual actions.

Single-step detection misses this. If you only scan for "does this tool call look destructive," reading a .env file passes. If you only check "is this API call authorized," using a valid token passes. The attack lives in the sequence: discover credential → use out-of-scope credential → perform irreversible action.

This is exactly the multi-step attack chain detection architecture in Module 1.4 of the LLM-Guard framework: conversation state tracking that flags not just individual violations, but suspicious trajectories that emerge across multiple turns.

What Runtime Enforcement Looks Like

After studying the Pocket OS incident, I built agentic_guardrail.py—a runtime tool call interceptor that would have blocked every step of the attack chain before execution. It operates at the tool layer, analyzing agent intent before actions become irreversible.

The system implements three detection layers:

1. CredentialHarvester (MITRE T1552)

Blocks attempts to scan for credentials the agent wasn't explicitly given:

class CredentialHarvester:
    """
    Detects agent attempts to scan for credentials it wasn't explicitly given.

    MITRE ATT&CK: T1552 - Unsecured Credentials
    """

    SENSITIVE_FILE_PATTERNS = [
        r'\.env',
        r'\.aws/credentials',
        r'config\.json',
        r'secrets\.ya?ml',
    ]

    def detect(self, tool_name: str, tool_input: Dict[str, Any]) -> Optional[DetectionResult]:
        # Block environment variable enumeration
        if any(scan_tool in tool_name.lower() for scan_tool in self.ENVIRONMENT_SCAN_TOOLS):
            if not tool_input or not tool_input.get('key'):
                return DetectionResult(
                    blocked=True,
                    severity=Severity.CRITICAL,
                    reason=f"Detected environment variable enumeration via {tool_name}",
                    mitre="T1552.001"
                )

        # Block sensitive file access
        tool_input_str = str(tool_input)
        for pattern in self.SENSITIVE_FILE_PATTERNS:
            if re.search(pattern, tool_input_str, re.IGNORECASE):
                return DetectionResult(
                    blocked=True,
                    severity=Severity.CRITICAL,
                    reason=f"Detected access to sensitive credential file: {pattern}",
                    mitre="T1552.001"
                )

Enter fullscreen mode Exit fullscreen mode

This would have blocked the Railway token discovery phase.

2. ScopeViolation Detector

Enforces that agents only use resources they were explicitly granted:

class ScopeViolation:
    """
    Detects agent attempts to use resources outside its declared scope.
    """

    def __init__(self, declared_resources: List[str]):
        self.declared_resources = set(declared_resources)

    def detect(self, tool_name: str, tool_input: Dict[str, Any]) -> Optional[DetectionResult]:
        accessed_resources = self._extract_resources(tool_input)
        unauthorized = accessed_resources - self.declared_resources

        if unauthorized:
            return DetectionResult(
                blocked=True,
                severity=Severity.HIGH,
                reason=f"Scope violation: unauthorized resources: {', '.join(unauthorized)}"
            )

Enter fullscreen mode Exit fullscreen mode

When you initialize the guardrail, you declare: "This agent may access /app/staging_data.txt and https://api.staging.railway.app." Any tool call attempting to use https://api.railway.app/volumes/delete gets blocked immediately—even with a valid token.

This would have blocked the production API call.

3. IrreversibilityCheck

Requires explicit user confirmation for destructive operations:

class IrreversibilityCheck:
    """
    Classifies tool calls as reversible or irreversible before execution.
    """

    IRREVERSIBLE_KEYWORDS = [
        'delete', 'drop', 'destroy', 'purge', 'terminate',
        'truncate', 'wipe', 'rm -rf', '--force', '--hard',
    ]

    def detect(self, tool_name: str, tool_input: Dict[str, Any]) -> Optional[DetectionResult]:
        combined_text = f"{tool_name} {str(tool_input)}".lower()

        for keyword in self.IRREVERSIBLE_KEYWORDS:
            if keyword in combined_text:
                return DetectionResult(
                    blocked=True,
                    severity=Severity.CRITICAL,
                    reason=f"Irreversible action detected ('{keyword}'). Requires user confirmation.",
                    requires_confirmation=True
                )

Enter fullscreen mode Exit fullscreen mode

This would have required Jer Crane's approval before any volume deletion.

Test Results: Blocking the Pocket OS Attack Chain

Here's the actual output from the test suite simulating the Pocket OS scenario:

[PHASE 1] Credential Harvesting Attack
────────────────────────────────────────────────────────────────────────────────

🔴 Attack 1a: Agent reads .env file to steal credentials
   Blocked: True
   Severity: critical
   Detector: CredentialHarvester
   MITRE: T1552.001
   Reason: Detected access to sensitive credential file matching pattern: \.env
   ✅ BLOCKED - Credential harvesting detected

[PHASE 2] Scope Violation - Using Stolen Credentials
────────────────────────────────────────────────────────────────────────────────

🔴 Attack 2a: Agent uses stolen AWS credentials
   Blocked: True
   Severity: high
   Detector: ScopeViolation
   Reason: Scope violation: unauthorized resources: AKIAIOSFODNN7EXAMPLE, secret-bucket
   ✅ BLOCKED - Unauthorized credential usage detected

[PHASE 3] Destructive/Irreversible Actions
────────────────────────────────────────────────────────────────────────────────

🔴 Attack 3a: Agent attempts to drop production database
   Blocked: True
   Severity: critical
   Detector: IrreversibilityCheck
   Requires Confirmation: True
   Reason: Irreversible action detected ('drop'). Requires user confirmation.
   ✅ BLOCKED - Irreversible action detected, confirmation required

🔴 Attack 3c: Agent attempts to terminate cloud instances
   Blocked: True
   Severity: critical
   Detector: IrreversibilityCheck
   Reason: Irreversible action detected ('terminate'). Requires user confirmation.
           | Attack chain detected: POCKET_OS_ATTACK: credential_discovery ->
           unauthorized_access -> destructive_action
   ⚠️  FULL ATTACK CHAIN DETECTED!
   ✅ BLOCKED - Irreversible resource termination detected

Enter fullscreen mode Exit fullscreen mode

The trajectory analysis flagged the full Pocket OS attack pattern: credential_discovery -> unauthorized_access -> destructive_action. Each detector would have stopped one phase. Together, they create defense in depth.

The RAG Connection

The same week the Pocket OS incident made headlines, I submitted a vulnerability disclosure to LangChain (GHSA-g2cq-pcv3-q7fx, currently in triage)—a metadata priority injection vulnerability allowing attackers to poison RAG document retrieval in ChromaDB integrations.

Here's how it works: LangChain's dumps() and dumpd() functions don't escape dictionaries with lc keys. An attacker can inject this into retrieved documents:

{"lc": 1, "type": "secret", "id": ["OPENAI_API_KEY"]}

Enter fullscreen mode Exit fullscreen mode

When the RAG system deserializes this "metadata," it treats it as a legitimate LangChain secret object and leaks the environment variable. CVSS score: 9.3/10.

This is the same class of problem. Pocket OS trusted credentials found in configuration files. LangChain trusted metadata in retrieved documents. Both systems assumed their environment was safe.

Agents don't just execute what you tell them—they act on what they find. If you don't validate discovered data before it influences behavior, you've outsourced your security boundary to wherever the agent can read.

The mitigation is identical: declare explicit scope before the agent runs, intercept actions at the tool layer, and treat all discovered resources (credentials, documents, metadata) as untrusted until validated against the declared scope.

What You Should Do

If you're running LLM agents in production, here's how to prevent the next Pocket OS incident:

1. Audit Credential Exposure

Map every file, environment variable, and API endpoint your agent can access. Assume it will find and attempt to use anything in scope. Remove or encrypt credentials that aren't explicitly required. If your staging and production tokens are both accessible, the agent sees them as equivalent options.

2. Declare Resource Scope Before Agent Execution

Don't rely on the agent to "know" what it's allowed to touch. Initialize your guardrail with an explicit allowlist:

declared_resources = [
    '/app/staging_config.yaml',
    'https://api.staging.example.com',
]

guardrail = AgenticGuardrail(declared_resources=declared_resources)

Enter fullscreen mode Exit fullscreen mode

Anything outside this scope gets blocked, even with valid credentials.

3. Intercept Tool Calls Before Execution, Not After

Logging post-execution is forensics, not prevention. The Pocket OS incident was irreversible within nine seconds. You need runtime interception:

result = guardrail.analyze_tool_call(tool_name, tool_input)

if result['blocked']:
    if result['requires_confirmation']:
        # Pause and request user approval
        user_approved = request_user_confirmation(result['reason'])
        if not user_approved:
            raise SecurityViolation(result['reason'])
    else:
        # Block immediately
        raise SecurityViolation(result['reason'])

# Only execute if approved
execute_tool(tool_name, tool_input)

Enter fullscreen mode Exit fullscreen mode

4. Validate Retrieved Content as Untrusted

For RAG systems, treat every retrieved document like user input. Scan metadata for injection patterns. Check source trust levels. Don't deserialize anything without validation.


Want help securing your agentic systems? I'm offering free architecture reviews for production LLM deployments. Get a threat model, attack surface analysis, and runtime enforcement recommendations tailored to your stack.

Schedule a 30-minute assessment →


Built by a security researcher focused on AI agent attack surface reduction. See the full detection framework at github.com/pavjstn-ui/llm-guard.

Sources