Repository navigation
fix: 核验 grep 组合参数中的模式文件路径 - #215
Draft
lzh2034855417-beep wants to merge 2 commits into
Draft
lzh2034855417-beep wants to merge 2 commits into
lzh2034855417-beep wants to merge 2 commits into
Conversation
SunsetRNE
added a commit
to SunsetRNE/DSHA-Sunset-mod
that referenced
this pull request
Nov 4, 2026
SunsetRNE
pushed a commit
to SunsetRNE/DSHA-Sunset-mod
that referenced
this pull request
Nov 6, 2026
上游 DSH-APP#215(lzh2034855417-beep,69c38ff5),按 git diff 补丁 apply -3 挑入。 main 上 rootReadPaths 对 grep 的 `-f FILE` / `-nfFILE` 等组合短选项把模式文件当作选项跳过, 受保护的短信库路径可借此绕过 Root 读取守卫;Java 与 guest 侧同改。 发布会话附带:tools/java-format-files.json 登记新增的 util/GrepReadPaths.java(格式清单门禁要求)。
SunsetRNE
added a commit
to SunsetRNE/DSHA-Sunset-mod
that referenced
this pull request
Nov 6, 2026
SunsetRNE
added a commit
to SunsetRNE/DSHA-Sunset-mod
that referenced
this pull request
Nov 6, 2026
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.
当前状态:主线已包含实现,PR 尚未合并
本 PR 的 grep 路径校验实现已进入官方主线,当前没有剩余文件差异。GrepReadPaths 在官方 build356 源码批次
7f3750316567e7fc7b0fdc7e2c8b2da5664cc210已存在,Java/Python 接入与关联回归也已收录;这不代表 GitHub 已合并本 PR。已保留原 PR
69c38ff52d6e7c6bc7cdde5916b28b01719db2e1的历史并同步实际 main36d89b72294348d0482d509109cf8e76d51fc1cb。最终来源4c34d79cc2550fabbcef8080350c45e945409d1d与该 main 的 Git tree 完全相同,均为29810e732bb1785128669e958c12ecf58d638f7c,compare 为 0 文件。保持 Draft,供维护者核对贡献历史,无需重复应用实现。原问题及已收录行为
grep 模式文件位于组合短选项时,文件参数可能未进入读取路径核验。纯 Java 参数协作者与 Python 执行侧按一致语义识别分离/附加/组合模式文件、重复参数、模式与过滤条件、数值、
--和输入文件,保留原 argv,未知或无法可靠解释的选项提前拒绝。递归没有指定输入文件时核验默认工作目录。按固定 Toybox 语义,模式文件参数的
-仍作为字面路径核验,只有数据输入位置的-按 stdin 处理。严格识别可能拒绝未识别的 ROM/GNU 扩展。当前实现的实际云端验证
Gradle/JUnit、Python 日志与可下载回执 成功:
DeviceShell*Test:DeviceShellPolicyTest 22 项、DeviceShellPolicyDeleteTest 4 项,合计 26 项,0 failures / 0 errors / 0 skipped。6ef8fc9c5611e0e520178ec170420ad6432c7042的父提交就是上述最终来源,唯一额外差异为临时验证工作流,未进入原 PR。-的 Java canonical/Python readlink 核验,结论 APPROVE。本轮未执行本地 DSHA 代码。以上不是全量单测、Release/Lint、APK 或实机验收;不声明修复递归 READ 子链接范围、路径替换竞态、跨进程撤销或任意同 UID 插件隔离,也不声明完整 Root 安全验收。