Skip to content

fix: use assertPathWithinRoot return value for CodeQL tracing#13

Merged
hydro13 merged 2 commits intomainfrom
fix/sync-root-codeql-trace
Mar 17, 2026
Merged

fix: use assertPathWithinRoot return value for CodeQL tracing#13
hydro13 merged 2 commits intomainfrom
fix/sync-root-codeql-trace

Conversation

@hydro13
Copy link
Owner

@hydro13 hydro13 commented Mar 17, 2026

Summary

  • CodeQL still flagged fs.statSync(resolved) because resolved was created before the assertPathWithinRoot guard, so the static analysis couldn't trace that the value was safe after the check
  • Changed to use the return value of assertPathWithinRoot directly, so CodeQL can follow the safe data flow
  • Should resolve alert #164

Test plan

  • TypeScript compiles without errors
  • Functionally identical to previous version

@hydro13 hydro13 self-assigned this Mar 17, 2026
@hydro13 hydro13 merged commit 5388903 into main Mar 17, 2026
4 checks passed
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.

1 participant