You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f218c3f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(review): address post-round-5 bot-review findings on PR #1027
Five items from coderabbit / cubic-dev-ai / kilo-code-bot on round 5:
- Symlink-escape containment (coderabbit + cubic): `makeContentResolver`
working-tree read and `makeCompiledResolver` compiled-SQL read now go
through a `realpath` containment check that rejects any target whose
resolved path falls outside the resolved root. A tracked symlink like
`models/evil.sql → /etc/passwd` no longer leaks external content into
the review pipeline. Applied at both the diff-side (git.ts) and
compiled-side (compiled.ts) resolvers.
- Symlink-consistent path prefix (cubic + kilo): `path.relative(gitRoot,
dbtRoot)` produced a bogus climb path (`../../../var/...`) whenever
`dbtRoot` traversed an unresolved symlink (macOS `/var` → `/private/var`
is the canonical case). The mapped prefix never matched incoming
repo-relative paths, so compiled SQL was silently missed on the exact
monorepo layouts the subdir fix was meant to enable. Both roots are
now realpath-resolved before `path.relative`, and `dbtRootReal` is
handed to `makeCompiledResolver` as its `cwd`. Falls back gracefully
when realpath fails (path deleted mid-run).
- `gitRepoRoot` newline handling (cubic P3): `.trim()` also stripped
legitimate leading/trailing path whitespace. Replaced with an explicit
`\r?\n` terminator strip that leaves everything else intact.
- dbt version comment (cubic P3): the `arguments:` nesting syntax is
documented from dbt v1.10.5, not 1.9+. Comment updated.
New regression tests in `review-subdir-invocation.test.ts`:
- makeContentResolver refuses to read a symlink escaping the git root
- makeCompiledResolver refuses to read a compiled symlink escaping
the compiled root
- gitRepoRoot preserves legitimate path characters (no trim()
regression)
Full altimate review suite: 3790 pass / 640 skip / 0 fail (was 3787
baseline — 3 new tests, +8 expect calls).
Co-Authored-By: Claude Opus 4.7 <[email protected]>
Claude-Session: https://claude.ai/code/session_017zXDXMiNFh4qDPxPCfa2of
0 commit comments