AdguardTeam / AdguardTeam/FiltersCompiler

trusted-* scriptlets dropped in convertToUbo() even if uBO resources include trusted scriptlets

未关闭
#273 0 条评论 0 个 reaction 已指派 1 人 已被 @maximtop 认领 在 GitHub 查看
Priority: P4
主要语言
JavaScript
星标
64
派生
11
PR 合并指标
30 天内没有已合并 PR

描述

I found that there's a confusion about the trusted scriptlet conversion to uBO format.

In `FiltersCompiler`, this code explicitly skips trusted scriptlets when converting to uBO:

- https://github.com/AdguardTeam/FiltersCompiler/blob/4ab18cd54fc4c7313d0e2c5e788ed5fa01c2c98b/src/main/converter.js#L131-L136

At the same time, uBO’s Resources Library documents trusted scriptlets (for example `trusted-click-element`, `trusted-set-session-storage-item`, etc.), and they mention the Adguard website, which indicates the correspondence:

- https://github.com/gorhill/ublock/wiki/Resources-Library#trusted-click-elementjs-

So I’m trying to understand the rationale in `FiltersCompiler`. Is this an intentional policy decision (e.g., trust-source/security model mismatch) rather than a technical capability mismatch? Or is it just outdated information?

If it's the latter case, would it make sense add conversion support for trusted scriptlets?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。