fix(profile): classify every tool; boundary tests fail on unclassified ones - #48
Merged
Merged
Conversation
…d ones (#45) The shell-capable list was hand-maintained: a new tool (say clipboard_write) would be scanned but treated as safe. Every served tool now has a class (observe / act / shell) and the tests fail on an unclassified tool, on a non-shell-equivalent profile allowing a shell tool, and on observe holding anything but observe tools. macOS: ToolCatalog is the single list main.swift serves and the tests check (source scan kept as a cross-check). Linux: same classes and checks over tool_list. observe now requires allowlist AND observe class at runtime. Docs: observe protects the computer, not the agent (screenshots can carry prompt injection). Mutation-checked on both sides.
Contributor
Author
|
Note: the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From an external review of
docs/tool-profiles.md(point 1 and point 4; points 2–3 recorded on #45).Problem.
ProfileBoundaryTestsdecided "reaches a shell" from a hand-written list (osascript,key,mouse+exec*). A new tool such asclipboard_writewould be scanned but counted as safe, so a future non-shell profile could allow it and still pass. The scan itself was a regex overlet name = "…", which misses other declarations.Fix.
observe/act/shell(ToolProfile.localToolClass; LinuxLOCAL_TOOL_CLASS). Tests fail on any unclassified tool, on stale entries, on a non-shell-equivalent profile allowing ashelltool, and onobserveholding non-observetools.ToolCatalog.localis the single listmain.swiftserves and the tests check; the source scan remains as a cross-check that nothing is served from outside the catalog.tool_listoutput and require it to matchLOCAL_TOOL_NAMES.observeat runtime now requires allowlist andobserveclass on both platforms.observeprotects the computer, not the agent — screenshots can carry prompt injection.Verified. macOS 118/118, Linux 18/18, clippy
-D warningsclean. Mutation: adding an unclassifiedclipboard_writefailstestEveryServedToolIsClassified(macOS) andevery_served_tool_is_classified_and_the_lists_agree(Linux) with the tool named. No behaviour change for existing profiles.Refs #45.