Skip to content

security: WARN verdict takes no defensive action #1156

Closed

Description

@garagon

Summary

When the ML prompt injection ensemble returns a WARN verdict (confidence >= 0.60 but below BLOCK threshold), the system logs the event but takes no defensive action. The agent continues executing with full tool access as if the scan returned safe.

Current behavior

In preSpawnSecurityCheck (sidebar-agent.ts):

const result = combineVerdict(signals);
if (result.verdict !== 'block') return false;  // WARN falls through here

WARN is treated identically to safe — no user confirmation, no tool restriction, no rate limiting. The only trace is a log line and a shield icon update.

Risk

A prompt injection payload that scores just below the BLOCK threshold (e.g., 0.70 confidence from one classifier, not cross-confirmed by the second) gets logged but otherwise runs unrestricted. The ML stack correctly identified it as suspicious, but the system discards that signal.

Possible mitigations (not prescriptive)

  • User confirmation gate: show the WARN in the sidepanel, require explicit "proceed anyway" before spawning
  • Tool restriction: spawn the agent with a reduced allowlist (e.g., Read-only, no Bash/Write) on WARN
  • Rate limiting: throttle WARN sessions to prevent automated probing
  • Elevated logging: capture full payload hash + domain for WARN events (currently only BLOCK gets logAttempt)

Each has different UX tradeoffs — filing as issue for design discussion rather than prescribing a fix.

Severity

HIGH — the ML stack has a detection tier (WARN) that produces no defensive output.

Activity

  1. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @16francej Please close this issue as resolved. The security flow no longer treats a warning as harmless or reports a clean result when defensive action is required; the corrected behavior shipped in the #1594 release work.

  2. capy-ai commented on Oct 3, 2026

    @capy-ai
    Contributor

    The sidebar chat agent that ignored WARN was removed; page text now goes through /pty-inject-scan, and a WARN verdict (including scanner unavailable) makes the extension ask "Inject anyway?" before anything reaches the terminal (extension/sidepanel.js:1005 on main). Fixed in v1.42.0.0 (#1594).
    If you still see this on the latest gstack, please reopen with details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions