docs(skill): say that page content is data, never instructions - #289
Open
basil-k-aji-dev wants to merge 1 commit into
Open
basil-k-aji-dev wants to merge 1 commit into
basil-k-aji-dev wants to merge 1 commit into
Conversation
Both skills tell the agent to read arbitrary pages — observe, get-html, snapshot, screenshot, console, network — inside the user's real, logged-in profile, and neither says that what comes back is untrusted. A repo-wide search found no prompt-injection guidance in any markdown; the only place page data is labelled untrusted is a protocol comment in bsk-protocol that the agent never sees. The absence stands out because the skills already constrain behaviour elsewhere: never extract credentials, never evaluate secrets, never record banking or SSO pages. Untrusted page content is the same class of rule and was simply missing. States it where the reading happens, in both skills, with a pointer from the standing rules at the top of each. Names the read commands and the element names and labels that get passed back to click/fill/select, since those carry page text too, and says what to do instead: stop, tell the user what the page tried, do not comply. AGENT_INSTALL.md asks the installing agent to repeat it to the user, because the person granting access to their logged-in browser should know a page cannot redirect the agent, and that an agent appearing to follow one has been injected rather than instructed. Documentation only; no behavioural or technical mitigation. The reporter's further suggestions — delimiting tool output, a domain allowlist, a consent-to-consequence step — are deliberately left out of scope. Fixes Tencent#286
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.
Fixes #286.
Verified the report before writing anything
@TianjinAI's evidence holds at
fa953dc. Re-running their searches on a fresh clone:One hit, about
BSK_HOMEpermissions, unrelated to page content. And the one place page data is labelled untrusted iscrates/bsk-protocol/src/tools/record_v2.rs:13— a Rust doc comment the agent never reads.The gap stands out precisely because the skills are careful elsewhere: "Never extract credentials, cookies, tokens, or other secrets", "Never evaluate secrets", "never record banking, SSO or password-manager pages". Untrusted page content is the same class of rule and was simply absent.
What this adds
The rule goes where the reading happens — the top of Read and interact in both skills — with a one-line pointer from the standing rules at the top of each file, so an agent that only reads the header still meets it.
It names the commands that return page text (
observe,get-html,snapshot,screenshot,console,network) and, separately, the element names and labels handed back toclick/fill/select—TargetDescriptorV2already documents those as untrusted page text internally, so an agent passing them around is moving page-controlled strings whether or not it realises.It also says why this tool is different from an ordinary fetch: the read happens inside the user's real, logged-in profile, so a page that redirects the agent acts with their sessions.
AGENT_INSTALL.mdasks the installing agent to repeat it to the user. Someone granting access to their logged-in browser should know a page cannot redirect the agent, and that an agent which appears to follow one has been injected rather than instructed — otherwise that behaviour reads as a malfunction rather than a defence working.Scope
Documentation only. No sanitisation, no provenance marking, no allowlist. @TianjinAI's further suggestions — delimiting
observe/get-htmloutput, an optional domain allowlist, consent-to-consequence before consequential actions in a borrowed tab — are deliberately out of scope here; they are design decisions for the maintainers, and a missing rule is worth closing on its own.Wording follows the issue's suggested text, tightened to the skills' existing imperative voice.
Checks
Re-running the report's own greps after the change:
untrusted|injection|maliciousskill/SKILL.mdpackages/dsh-plugin-browserskill/skill/SKILL.mdAGENT_INSTALL.mdMarkdown only; CI here builds and tests Rust, so nothing in this diff is exercised by it. I have not run the skills against a live browser — there is nothing executable to run.