-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Feature]: Tool security classification properties (isDestructive, isReadOnly, isConcurrencySafe) #62962
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.securitySecurity documentationSecurity documentation
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.securitySecurity documentationSecurity documentation
Type
Fields
Priority
None yet
Summary
Add six standard security classification properties to tool definitions so safety decisions (confirmation prompts, parallel scheduling, abort handling) are schema-driven rather than requiring per-call case analysis.
Problem to solve
Tool definitions currently carry
ownerOnlyand participate in allow/deny policy, but have no standard way to declare whether a tool is destructive, read-only, concurrency-safe, or involves external systems. This means:isDestructiveflag.Scaffolding quality (including tool schema design) explains same-model score gaps of 17 issues on 731 SWE-bench problems (SWE-bench leaderboard, Feb 2026). Tool misuse is OWASP #5 agentic risk; tools without declared safety properties are the primary cause (OWASP Top 10 for Agentic Applications, 2026).
Proposed solution
1. Six classification properties
2. Example annotations on existing tools
3. Drive safety decisions from schema
4. Update conformance snapshot
Add the new properties to
TOOL_POLICY_CONFORMANCEinsrc/agents/tool-policy.conformance.tsso CI detects drift when a tool is added without classification.5. Warning language: "may" not "will"
Destructive operation warnings should use
"may"not"will"—git push --forcedoes not overwrite anything if the remote hasn't diverged;rm -rf temp/might be deleting disposable files. Overstated warnings cause alert fatigue; accurate warnings maintain credibility (BP 06).Alternatives considered
tool-policy.ts. Classification properties are the complement — they describe tool behavior, not access control.toAutoClassifierInputproperty enables a separate lightweight safety query before execution (the critic/permission side-query pattern). This is a complement to, not a replacement for, schema-declared properties.Impact
Evidence/examples
Additional information
toAutoClassifierInputis the most subtle property: it compresses a tool invocation (including arguments) into a single line that a safety classifier can evaluate cheaply. Example:exec ls -la /project/src. The classifier sees that string and makes a binary safe/unsafe judgment without loading full tool context.isDestructive = trueshould trigger: confirmation prompt, "may" (not "will") warning language, and a reversibility check (is there a safer alternative?).exec,file_delete,git_push,web_fetch), then fill in the rest incrementally.best-practices/results/agent-review-2026-04-07.md(dimension 04 — Tool design).