Skip to content

fix(core): evaluate ignore files named with dot prefixes - #5458

Merged
wenshao merged 1 commit into
QwenLM:mainfrom
tt-a1i:fix/ignore-dotdot-filenames
Jun 20, 2026
Merged

fix(core): evaluate ignore files named with dot prefixes#5458
wenshao merged 1 commit into
QwenLM:mainfrom
tt-a1i:fix/ignore-dotdot-filenames

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use the shared path-boundary helper in .gitignore and .qwenignore parsers
  • add regressions for project files whose names start with ..
  • keep traversal paths such as ../..secret.log outside the ignore checks

Fixes #5457

Validation

  • npx vitest run packages/core/src/utils/gitIgnoreParser.test.ts --testNamePattern "two dots"
  • npx vitest run packages/core/src/utils/qwenIgnoreParser.test.ts --testNamePattern "two dots"
  • npx vitest run packages/core/src/utils/gitIgnoreParser.test.ts packages/core/src/utils/qwenIgnoreParser.test.ts
  • npx eslint packages/core/src/utils/gitIgnoreParser.ts packages/core/src/utils/gitIgnoreParser.test.ts packages/core/src/utils/qwenIgnoreParser.ts packages/core/src/utils/qwenIgnoreParser.test.ts
  • npx prettier --check packages/core/src/utils/gitIgnoreParser.ts packages/core/src/utils/gitIgnoreParser.test.ts packages/core/src/utils/qwenIgnoreParser.ts packages/core/src/utils/qwenIgnoreParser.test.ts && git diff --check
  • npm run typecheck --workspace=packages/core

AI Assistance Disclosure

I used Codex to review the changes, sanity-check the implementation against existing patterns, and help spot potential edge cases.

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found. LGTM! ✅

The fix correctly replaces the naive relativePath.startsWith('..') with isPathWithinRoot(), which properly distinguishes path traversal (../..secret.log) from dot-prefixed filenames (..secret.log). Tsc, eslint, and tests all pass. The removed redundant startsWith(projectRoot) guard in gitIgnoreParser is safe — isPathWithinRoot covers all those cases.

— DeepSeek/deepseek-v4-pro via Qwen Code /review

@wenshao
wenshao marked this pull request as ready for review June 20, 2026 10:21
@wenshao

wenshao commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

@qwen-code /triage

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Thanks for the PR, @tt-a1i!

Template: headings deviate from the PR template ("Summary" / "Validation" instead of "What this PR does" / "Reviewer Test Plan", missing "Why it's needed", "Risk & Scope", and "Linked Issues" sections). Not blocking here since the content is present and the change is small — but please use the standard template for future PRs.

Direction: clear-cut bugfix. The ignore parsers incorrectly reject valid filenames starting with .. (e.g. ..secret.log) because relativePath.startsWith('..') can't distinguish traversal paths from dot-prefixed names. This is a real correctness issue in core file-filtering logic. Well-aligned with the project.

Approach: minimal and correct. The fix replaces the naive startsWith('..') check with the existing isPathWithinRoot() helper from workspaceContext.ts, which uses ..${path.sep} — correctly matching ../foo but not ..secret.log. The redundant absoluteFilePath.startsWith(this.projectRoot) guard in gitIgnoreParser.ts is cleaned up since isPathWithinRoot supersedes it. Regression tests cover both parsers. +27/-7 across 4 files — tight scope, no drive-by changes.

Moving on to code review. 🔍

中文说明

感谢贡献,@tt-a1i

模板: 标题与 PR 模板 不一致(用了 "Summary" / "Validation" 而非标准标题,缺少 "Why it's needed"、"Risk & Scope"、"Linked Issues" 章节)。鉴于内容齐全且改动较小,此次不阻塞——但后续 PR 请使用标准模板。

方向: 明确的 bugfix。忽略解析器用 relativePath.startsWith('..') 判断路径越界,会误判 ..secret.log 这类以 .. 开头的合法文件名。属于核心文件过滤逻辑的正确性缺陷,方向完全对齐。

方案: 最小且正确。用已有的 isPathWithinRoot() 辅助函数替换朴素的 startsWith('..') 检查——该函数用 ..${path.sep} 匹配,能区分 ../foo(越界)和 ..secret.log(合法文件名)。同时清理了 gitIgnoreParser.ts 中多余的 startsWith(this.projectRoot) 判断。两个解析器都加了回归测试。4 个文件 +27/-7,范围紧凑,无多余改动。

进入代码审查 🔍

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Code Review

Independent proposal: replace relativePath.startsWith('..') with the existing isPathWithinRoot() helper, which uses ..${path.sep} to distinguish traversal paths from dot-prefixed filenames. The PR does exactly this — clean, minimal, no surprises.

No correctness issues, no security concerns, no AGENTS.md violations. The shared helper is already used elsewhere in workspaceContext.ts, so this is consistent reuse. One minor observation: qwenIgnoreParser.test.ts adds a traversal rejection test (../..secret.log), but gitIgnoreParser.test.ts doesn't — the existing traversal tests in the git parser cover this, so not a blocker.

Real-Scenario Testing

Ran a direct parser test script (creates a temp project with .gitignore/.qwenignore containing ..secret.log, then checks both parsers):

Before (main branch — bug present)

=== Bug reproduction: ignore parsers with ..secret.log ===
Project root: /tmp/triage-5458-R1jSSV
.gitignore contents: ..secret.log
.qwenignore contents: ..secret.log

GitIgnoreParser.isIgnored('..secret.log') = false (expected: true)
QwenIgnoreParser.isIgnored('..secret.log') = false (expected: true)
GitIgnoreParser.isIgnored('normal.log') = false (expected: false)
QwenIgnoreParser.isIgnored('normal.log') = false (expected: false)
GitIgnoreParser.isIgnored('../../etc/passwd') = false (expected: false)
QwenIgnoreParser.isIgnored('../../etc/passwd') = false (expected: false)

RESULT: FAIL ❌
  - GitIgnoreParser incorrectly ignores ..secret.log
  - QwenIgnoreParser incorrectly ignores ..secret.log

After (PR #5458 applied)

=== Bug reproduction: ignore parsers with ..secret.log ===
Project root: /tmp/triage-5458-0fZrNd
.gitignore contents: ..secret.log
.qwenignore contents: ..secret.log

GitIgnoreParser.isIgnored('..secret.log') = true (expected: true)
QwenIgnoreParser.isIgnored('..secret.log') = true (expected: true)
GitIgnoreParser.isIgnored('normal.log') = false (expected: false)
QwenIgnoreParser.isIgnored('normal.log') = false (expected: false)
GitIgnoreParser.isIgnored('../../etc/passwd') = false (expected: false)
QwenIgnoreParser.isIgnored('../../etc/passwd') = false (expected: false)

RESULT: ALL PASS ✅

Unit tests (with patch)

 ✓ src/utils/qwenIgnoreParser.test.ts (4 tests) 16ms
 ✓ src/utils/gitIgnoreParser.test.ts (21 tests) 49ms

 Test Files  2 passed (2)
      Tests  25 passed (25)

All checks pass. The fix correctly resolves the bug without regressing traversal-path rejection.

中文说明

代码审查

独立方案:用已有的 isPathWithinRoot() 辅助函数替换 relativePath.startsWith('..')。该函数使用 ..${path.sep} 区分越界路径和以 .. 开头的文件名。PR 的做法与此完全一致——干净、最小化、无意外。

无正确性问题、无安全隐患、无 AGENTS.md 违规。该辅助函数已在 workspaceContext.ts 中使用,属于一致的复用。一个小观察:qwenIgnoreParser.test.ts 新增了越界路径拒绝测试(../..secret.log),而 gitIgnoreParser.test.ts 没有——但 git 解析器已有的越界测试覆盖了该场景,不构成阻塞。

真实场景测试

运行了直接的解析器测试脚本(创建临时项目,.gitignore/.qwenignore 包含 ..secret.log,检查两个解析器):

修复前(main 分支): ..secret.log 返回 false(应该是 true)— 确认 bug 存在。

修复后(PR #5458): ..secret.log 返回 true,越界路径仍返回 false — 全部通过 ✅。

单元测试: 25 个测试全部通过。

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

This is a textbook bugfix. The root cause is clear (startsWith('..') can't distinguish ..secret.log from ../foo), the fix is the minimal correct change (reuse isPathWithinRoot() which already handles this with ..${path.sep}), and the regression tests lock in the behavior. Before/after testing confirms it works, and the 25-test suite passes clean.

The only note is the template deviation (non-standard headings) — mentioned in Stage 1, not a blocker.

Approving. ✅

中文说明

这是一个教科书级的 bugfix。根因清晰(startsWith('..') 无法区分 ..secret.log../foo),修复是最小正确改动(复用已有的 isPathWithinRoot(),用 ..${path.sep} 处理),回归测试锁定了行为。前后对比测试确认修复有效,25 个测试全部通过。

唯一的小问题是 PR 模板标题不一致(Stage 1 已提及),不构成阻塞。

批准 ✅

Qwen Code · qwen3.7-max

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship. ✅

@wenshao

wenshao commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

✅ Local verification (real build + tests via tmux) — recommend merge

I verified this PR end-to-end on a real checkout (not just re-reading the diff). Setup: an isolated git worktree at the PR head 584caecb3, reusing the repo's node_modules, driven inside tmux. All tests below run against the real parser code with real temp dirs and real .gitignore / .qwenignore files (no parser mocking).

Env: Node v22.22.2, Vitest 3.2.4, Linux. Fix commit touches exactly 4 files (+27 / -7), and is the only commit touching them since main.

What the fix does

Both parsers rejected out-of-root paths with relativePath.startsWith('..'), which also matches a legitimate in-root file literally named ..secret.log ('..secret.log'.startsWith('..') === true) → such a file was never evaluated against ignore rules. The PR swaps that for the shared isPathWithinRoot(resolved, root) helper (checks ..${sep} and exact ..), and drops a now-redundant absoluteFilePath.startsWith(projectRoot) gate in gitIgnoreParser.

Results

Check Result
1. PR's own suites on PR code (gitIgnoreParser + qwenIgnoreParser) 25/25 pass
2. A/B — revert only the 2 source .ts to pre-fix, keep PR tests exactly the 2 new "two dots" tests FAIL (expected false to be true), 23 pass
3. Adversarial harness (16 real-FS cases) all pass on PR; differential shows only the dot-prefix/normalize cases flip
4. E2E via FileDiscoveryService.filterFiles() (the @-mention / read_many_files path) PR filters ..secret.log out; pre-fix leaks it into the model-visible set
5. Typecheck (tsc --noEmit, core) — differential vs merge-base 0 new errors (see note)
6. ESLint + Prettier on all 4 files clean

Decisive evidence

  • The new tests are meaningful, not vacuous (A/B Where is the config saved? #2): with the source reverted to the pre-fix startsWith('..') but the PR's test files kept, only the two ..secret.log assertions fail — and flipping the source back to isPathWithinRoot is exactly what turns them green.
  • The fix is surgical — no boundary loosened (如何自定义密钥文件 .env可能与其他文件冲突 #3): running the same 16-case harness on both versions, every traversal/boundary case behaves identically on pre-fix and PR — real traversal ../..secret.log, deep ../../etc/passwd, exact .., absolute /etc/passwd, sibling-prefix <root>-evil/…, and ".git always ignored". Only the intended dot-prefix evaluation (..secret.log, ...weird.log, normalized subdir/../..secret.log) changes. So the change adds evaluation for dot-named in-root files without widening the out-of-root rejection.
  • Real-world impact (E2E Are you interested in AI Terminal? #4): through the user-facing discovery path, a real ..secret.log that the user explicitly ignored leaked into the discovered (model-visible) file list before the fix (['app.ts', '..secret.log']) and is correctly excluded after (['app.ts']), for both .gitignore (inside a git repo — the service only wires GitIgnoreParser there) and .qwenignore.

Correctness notes

  • Removing the absoluteFilePath.startsWith(this.projectRoot) gate is safe: it had a latent sibling-prefix bug (/proj would prefix-match /proj-evil), and the relative-path check already covered that case — confirmed by the sibling-prefix test passing on both versions. isPathWithinRoot strictly supersedes it.
  • Both parsers now share one helper → consistent behavior. The helper is already used elsewhere in workspaceContext, and the existing Windows-separator normalization test still passes.

One note on typecheck

A single local tsc error surfaced — custom-provider.test.ts: Property 'mergeModelsByIdentity' does not exist on type 'ProviderConfig'in a file this PR does not touch. It is a stale-prebuilt-dist artifact of my isolated worktree resolving the monorepo self-import @qwen-code/qwen-code-core to an older built dist; the property does exist in source (providers/types.ts), origin/main has the field and its usage in sync, and a differential typecheck shows the identical single error on both PR-head and merge-base (delta = 0). CI here is fully green (Lint + Test on ubuntu/macOS/windows). Not introduced by this PR.

Verdict

Correct, minimal, and surgical. Fixes #5457 with no regression to the path-boundary checks, and the differential E2E confirms the actual leak is closed. LGTM — good to merge.

🇨🇳 中文版(点击展开)

✅ 本地真实构建 + 测试验证(tmux)— 建议合并

我在真实检出环境中对本 PR 做了端到端验证(不只是看 diff)。方式:在 PR head 584caecb3 上建独立 git worktree,复用仓库 node_modules,全程在 tmux 中执行。下列测试均针对真实解析器代码、使用真实临时目录与真实 .gitignore / .qwenignore 文件(未对解析器打桩)。

环境: Node v22.22.2、Vitest 3.2.4、Linux。修复提交恰好改动 4 个文件(+27 / -7),且是自 main 以来唯一改动这些文件的提交。

修复内容: 两个解析器原先用 relativePath.startsWith('..') 判定"越界路径",但这也会误命中根目录内一个真实名为 ..secret.log 的文件 → 该文件永远不会被 ignore 规则评估。PR 改用共享的 isPathWithinRoot(resolved, root)(判断 ..${sep} 与精确 ..),并删除 gitIgnoreParser 中一处冗余的 absoluteFilePath.startsWith(projectRoot) 判断。

结果:

  1. PR 自带的两套用例跑在 PR 代码上:25/25 通过
  2. A/B —— 只把 2 个源码 .ts 还原为修复前、保留 PR 的测试文件:恰好那 2 个"两个点"新测试失败expected false to be true),其余 23 个通过 → 证明新测试是有效的,且修复正是让它们变绿的原因。
  3. 对抗性用例(16 个真实文件系统用例):在 PR 代码上全部通过;差分对比显示只有"点前缀/归一化"几例发生变化。
  4. 经用户可见路径 FileDiscoveryService.filterFiles()(即 @ 引用 / read_many_files)做 E2E:修复后 ..secret.log 被正确过滤;修复前会泄漏进模型可见的文件列表。
  5. 类型检查(core,tsc --noEmit)与 merge-base 做差分:0 个新增错误(见下方说明)。
  6. 4 个文件的 ESLint + Prettier:干净

关键证据:

  • 新测试有效、非空跑(A/B Where is the config saved? #2): 源码还原成修复前 startsWith('..')、保留 PR 测试时,只有两个 ..secret.log 断言失败;把源码换回 isPathWithinRoot 即恰好使其变绿。
  • 修复是"外科手术式"、未放宽任何边界(如何自定义密钥文件 .env可能与其他文件冲突 #3): 同一套 16 例在两个版本上运行,所有"越界/遍历"用例行为完全一致——真实遍历 ../..secret.log、深层 ../../etc/passwd、精确 ..、绝对路径 /etc/passwd、同名前缀兄弟目录 <root>-evil/…、以及".git 始终被忽略"。仅有目标内的点前缀文件(..secret.log...weird.log、归一化后的 subdir/../..secret.log)评估行为改变。即:只新增了对点前缀文件的评估,放宽对越界路径的拒绝。
  • 真实影响(E2E Are you interested in AI Terminal? #4): 经用户可见的发现路径,用户明确忽略的真实 ..secret.log 在修复前会泄漏进被发现(模型可见)的文件列表['app.ts', '..secret.log']),修复后被正确排除(['app.ts']);.gitignore(需在 git 仓库内,服务仅在此场景装配 GitIgnoreParser)与 .qwenignore 均如此。

正确性补充:

  • 删除 absoluteFilePath.startsWith(this.projectRoot) 是安全的:它本身有同名前缀的潜在缺陷(/proj 会前缀匹配 /proj-evil),而相对路径检查已覆盖该情形——两个版本上的"同名前缀"用例均通过可证。isPathWithinRoot 严格优于它。
  • 两个解析器现共用同一 helper,行为一致;该 helper 在 workspaceContext 中已有使用,且原有 Windows 分隔符归一化测试仍通过。

关于类型检查: 本地出现一个 tsc 报错——custom-provider.test.ts: Property 'mergeModelsByIdentity' does not exist on type 'ProviderConfig'——位于本 PR 未触碰的文件。这是我的独立 worktree 把仓内自引用 @qwen-code/qwen-code-core 解析到较旧的预构建 dist 所致的陈旧产物;该属性在源码 providers/types.ts 中确实存在,origin/main 的字段定义与使用是一致的,且差分类型检查显示 PR-head 与 merge-base 报错完全相同(增量 = 0)。此处 CI 全绿(Lint + ubuntu/macOS/windows 测试)。并非本 PR 引入。

结论: 改动正确、最小、外科手术式,修复 #5457 且未对路径边界检查造成回归,差分 E2E 也证实泄漏已被关闭。LGTM,建议合并。

@wenshao
wenshao merged commit ed82eee into QwenLM:main Jun 20, 2026
33 checks passed
@wenshao

wenshao commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

✅ Runtime E2E verification — ignore files named with dot prefixes

I built and ran the real qwen CLI from this PR (584caecb, Node v22) to confirm the fix end-to-end, not just at the unit level: a gitignored file named ..secret.log (two-dot prefix) leaks through the file-filtering tools on the old code, and is correctly filtered after the fix. Posting as a merge reference.

The bug & the fix

isIgnored() early-returned for any path whose project-relative form startsWith('..') — intended to skip paths outside the root, but it also matched in-root files literally named ..something:

// before — '..secret.log'.startsWith('..') === true → treated as "outside root", never evaluated
if (relativePath === '' || relativePath.startsWith('..')) return false;
// after  — proper boundary check (startsWith('../') + !== '..' + !isAbsolute)
if (relativePath === '' || !isPathWithinRoot(resolved, this.projectRoot)) return false;

So a .gitignore / .qwenignore rule for a ..-prefixed name was silently not honored, and the file surfaced to the model through every ignore-respecting tool (list_directory, glob, ripgrep, read_many_files). The PR also drops a redundant naive absoluteFilePath.startsWith(projectRoot) prefix check in gitIgnoreParser (which had a sibling-dir false positive, e.g. /proj vs /proj-evil).

1) Real CLI E2E — list_directory on a workspace where .gitignore contains ..secret.log

Drove the real CLI's list_directory tool (which readdirs, then applies gitignore filtering) against a git repo with ..secret.log, normal.txt, tracked.txt, .gitignore. Same harness, only the compiled parser logic swapped (dist-level A/B):

Arm list_directory result Files handed to the model ..secret.log
pre-PR startsWith('..') Listed 4 item(s) (1 git-ignored) ..secret.log, .gitignore, normal.txt, tracked.txt leaked
PR isPathWithinRoot Listed 3 item(s) (2 git-ignored) .gitignore, normal.txt, tracked.txt filtered

git status --ignored confirms ..secret.log is genuinely git-ignored — so the pre-PR listing was wrong.

2) Unit tests + revert-fix A/B

  • The PR's parser suites are green: 25 passed (both gitIgnoreParser + qwenIgnoreParser), including the 4 new cases.
  • Revert-only-the-source-check (keep the PR's new tests) → the two should still evaluate files whose names start with two dots tests fail with expected false to be true. So the new tests genuinely pin the bug, and the fix is what makes them pass. Restoring the fix → 25/25 green again.

3) Live run (tmux)

The real interactive TUI (mock-backed, --yolo) executed list_directory live and completed the turn; a terminal A/B then printed:

ARM: PR/NEW (isPathWithinRoot)        list_directory result : Listed 3 item(s) (2 git-ignored)   ..secret.log: ABSENT (ignored) ✓
ARM: pre-PR/OLD (startsWith(..))      list_directory result : Listed 4 item(s) (1 git-ignored)   ..secret.log: PRESENT (leaked) ✗

No regression

A genuinely out-of-root path (../..secret.log) is still correctly not evaluated (isPathWithinRoot → false), covered by the PR's new should not evaluate paths outside the project root test. The ..-fix only un-blocks in-root names.

Verdict

The fix resolves a real ignore-filtering leak for ..-prefixed filenames across both parsers, verified through the actual CLI tool path; tests pin it; no regression on out-of-root paths. LGTM — good to merge. 👍

🇨🇳 中文版(点击展开)

✅ 运行时端到端验证 —— 以点号前缀命名的 ignore 文件

我从本 PR(584caecb,Node v22)构建并运行了真实的 qwen CLI,在运行时层面确认修复(不只是单测):一个被 gitignore 的文件 ..secret.log(双点前缀)在旧代码下会穿透文件过滤工具泄漏出来,修复后被正确过滤。作为 merge 参考。

Bug 与修复

isIgnored() 会对任何"项目相对路径 startsWith('..')"的路径提前返回 —— 本意是跳过根目录之外的路径,但它也误命中了根目录内真正以 ..something 命名的文件:

// 改前 —— '..secret.log'.startsWith('..') === true → 被当成"根目录外",根本没参与判断
if (relativePath === '' || relativePath.startsWith('..')) return false;
// 改后 —— 正确的边界判断(startsWith('../') + !== '..' + !isAbsolute)
if (relativePath === '' || !isPathWithinRoot(resolved, this.projectRoot)) return false;

于是针对 .. 前缀名字的 .gitignore / .qwenignore 规则被悄悄忽略,该文件会通过每一个尊重 ignore 的工具(list_directoryglobripgrepread_many_files)暴露给模型。本 PR 同时删掉了 gitIgnoreParser 里一段冗余且粗糙的 absoluteFilePath.startsWith(projectRoot) 前缀判断(它有兄弟目录误判,例如 /proj vs /proj-evil)。

1)真实 CLI 端到端 —— 在 .gitignore..secret.log 的工作区上 list_directory

驱动真实 CLI 的 list_directory 工具(先 readdir,再做 gitignore 过滤),目标是一个含 ..secret.lognormal.txttracked.txt.gitignore 的 git 仓库。同一套装置,只替换编译后的 parser 逻辑(dist 级 A/B):

分支 list_directory 结果 交给模型的文件 ..secret.log
改前 startsWith('..') Listed 4 item(s) (1 git-ignored) ..secret.log.gitignorenormal.txttracked.txt 泄漏
本 PR isPathWithinRoot Listed 3 item(s) (2 git-ignored) .gitignorenormal.txttracked.txt 被过滤

git status --ignored 确认 ..secret.log 确实被 git 忽略 —— 所以改前的列表是错的。

2)单测 + 撤销修复 A/B

  • PR 的 parser 套件全绿:25 passedgitIgnoreParser + qwenIgnoreParser),含 4 个新增用例。
  • 只把源码里的判断撤回旧逻辑(保留 PR 的新测试)→ 两个 should still evaluate files whose names start with two dots 测试失败,报 expected false to be true。说明新测试确实钉住了这个 bug,而修复正是让它们通过的原因。恢复修复 → 重新 25/25 全绿。

3)实时运行(tmux)

真实交互式 TUI(mock 后端,--yolo)实时执行了 list_directory 并完成该轮;随后终端里的 A/B 打印:

ARM: PR/NEW (isPathWithinRoot)        list_directory result : Listed 3 item(s) (2 git-ignored)   ..secret.log: ABSENT (ignored) ✓
ARM: pre-PR/OLD (startsWith(..))      list_directory result : Listed 4 item(s) (1 git-ignored)   ..secret.log: PRESENT (leaked) ✗

无回归

真正在根目录之外的路径(../..secret.log)仍然被正确地参与判断(isPathWithinRoot → false),由 PR 新增的 should not evaluate paths outside the project root 测试覆盖。这个 .. 修复只放开了根目录内的名字。

结论

该修复解决了两个 parser 上针对 .. 前缀文件名的真实 ignore 过滤泄漏,并通过真实 CLI 工具路径验证;测试钉死了它;对根目录外路径无回归。LGTM —— 可以合并。 👍

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.

Ignore parsers skip files whose names start with two dots

3 participants