Repository navigation
[eslint-refiner] ESLint Refiner — first review of no-path-startswith-without-separator, 0 issues (disciplined pass) #75814
Closed
Replies: 1 comment
|
This discussion was automatically closed because it expired on 2026-11-09T03:40:00.459Z.
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Overview
Today's claim (
work_id 16eaaa2e...9ddf2, factory date 2026-10-31) reviewed the ESLint factory's rule set foreslint-factory/**, targeting JS/TS underactions/setup/js/**. A ruleCount diff (72 current imports ineslint-factory/src/index.tsvs 69 recorded in the most recent prior Claim snapshot) pointed at rule drift. Cross-checking every one of the 72 currently-registered rule names against the full combined legacy + prior-Claim-snapshot memory turned up exactly one rule with zero prior mentions:no-path-startswith-without-separator. This was treated as the genuine first-ever-review candidate.Key metrics
no-path-startswith-without-separator, first-ever review)eslint-factoryissues: 0 (confirmed viagh issue list)eslint-factory/actions/setup/js; not pursued furtherCollapsible detail
Rule reviewed: no-path-startswith-without-separator
This rule flags
x.startsWith(path.resolve/join/normalize(...))and bare-identifier-assigned-from-such-a-call containment checks, since a bare directory prefix also matches sibling directories sharing that prefix (e.g./work/repo-evilstarts with/work/repo). It correctly recognizes+ path.sep, a trailing-slash literal/template, or=== rootas safe.Grounded the full non-test
actions/setup/js/**/*.cjscorpus for every.startsWith(call nearpath.: the codebase is highly disciplined — every live containment check already either appends+ path.sep/ a trailing-slash literal, or uses thepath.relative()+relative === ".."/relative.startsWith(".." + path.sep)/path.isAbsolute(relative)idiom (seen insafe_outputs_handlers.cjs,checkout_dynamic.cjs,git_auth_helpers.cjs,runtime_import.cjs,symlink_guard.cjs,upload_artifact.cjs,mcp_server_core.cjs,create_prompt.cjs,work_queue_claim_scope.cjs, and ~20 more). Zero live misfires found for the rule's primary detection path.Two structural theories investigated, both ungrounded today:
path.dirname:PATH_METHODS = {resolve, join, normalize}omitspath.dirname, a common source of a directory value later used in a containment check. Grepped everypath.dirname(call and everystartsWith(path.dirname(/dirname(...).startsWithshape corpus-wide — only 2 matches, both in test files, both comparing a basename against a literal suffix (not a containment check). Zero non-test grounding.isBarePathValueonly inspects an identifier'sVariableDeclaratorinit when it is itself apath.resolve/join/normalize(...)call; any other initializer shape (e.g.path.resolve(base) + "nonSeparatorSuffix") is silently treated as safe rather than checked for an actual trailing separator. Searched forpath.(resolve|join|normalize)(...) +concatenations feeding a laterstartsWithsubject corpus-wide; found none outside the already-correct+ path.sep/+ "/"idiom the rule already recognizes.One concrete-but-confounded instance found:
durable_files.cjs:30-34noSymlinks(file, root):This is exactly the pattern the rule targets — bare
rootwith no separator guard — but isn't flagged becauserootis a function parameter (no traceable single-def initializer), a deliberate rule scope limit rather than a bug. All 4 live call sites (lines 55, 69, 86, 125) pass afile/bundle/targetvalue already validated via a separator-correct check upstream inconfiguration(), so this is currently non-exploitable. Too narrow (1 function, 4 internally-consistent call sites) to clear the established broadly-applicable-idiom bar this workflow uses before filing a confounded finding.Also re-verified the one standing carried theory:
no-unguarded-async-timer-callbackleading-guard-clause gap — still exactly 1 livesetInterval(async...)site (process_runner.cjs:491), still confounded by genuine unguarded trailing risk in the same callback. No new non-confounded site has appeared; not filed, not retired.Next actions
path.dirname) for a live non-testpath.dirname(...).startsWith(...)containment pattern before filing.durable_files.cjsnoSymlinksif a future caller ever passes an unvalidatedfile/rootpair directly.no-unguarded-async-timer-callbackfor a second, non-confounded live timer-callback site.index.tsimport count first, then cross-check every currently-imported rule name against combined memory (snapshot array order is not chronological) to find any still-unreviewed rule.References:
§42442522794
All reactions