Skip to content

docs(skill): say that page content is data, never instructions - #289

Open
basil-k-aji-dev wants to merge 1 commit into
Tencent:mainfrom
basil-k-aji-dev:docs/untrusted-page-content
Open

basil-k-aji-dev wants to merge 1 commit into
Tencent:mainfrom
basil-k-aji-dev:docs/untrusted-page-content

Conversation

@basil-k-aji-dev

Copy link
Copy Markdown

Fixes #286.

Verified the report before writing anything

@TianjinAI's evidence holds at fa953dc. Re-running their searches on a fresh clone:

$ grep -rniE "prompt[ -]?injection|untrusted|malicious|never follow|ignore (previous|prior) instruction" --include='*.md' .
docs/remote-extension-connection.md:42:  ...not share it between independent running servers or untrusted OS users.

$ grep -ciE "untrusted|injection|malicious" skill/SKILL.md
0
$ grep -ciE "untrusted|injection|malicious" packages/dsh-plugin-browserskill/skill/SKILL.md
0

One hit, about BSK_HOME permissions, unrelated to page content. And the one place page data is labelled untrusted is crates/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 to click/fill/selectTargetDescriptorV2 already 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.md asks 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-html output, 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:

File untrusted|injection|malicious
skill/SKILL.md 0 → 2
packages/dsh-plugin-browserskill/skill/SKILL.md 0 → 2
AGENT_INSTALL.md 0 → 1

Markdown 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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security] No prompt-injection guidance in the skills, while the agent reads arbitrary pages in the user's logged-in profile

1 participant