Repository navigation
Conversation
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. This pull request contains code changes, so we will not generate a table of review links. 🤖 This comment is automatically generated. |
|
👋 Hi there! It looks like you've modified some files that we can't accept as contributions:
You'll need to raise a new PR that doesn't include those files, before we can review. The complete list of files we can't accept are:
We also can't accept contributions to files in the content directory with frontmatter |
There was a problem hiding this comment.
🔵 Needs a closer look
The security-sensitive migration changes recursive symlink checks, platform-dependent no-follow writes, and child-process path mutations, requiring human runtime validation of end-to-end filesystem, race, and cross-platform behavior.
No open issues 🎉
What changed in this PR
Hardens the content migration utility against symlink traversal and out-of-root inputs while preserving normal migration behavior.
Changes:
- Rejects symbolic links anywhere under
contentbefore mutations begin. - Validates input paths remain within the content tree and uses safer file-write flags.
- Adds integration tests for symlink rejection, invalid paths, and standard migrations.
| File | Description |
|---|---|
| src/content-render/tests/move-by-content-type.ts | Adds regression tests covering symlink traversal prevention, invalid input paths, and standard migration behavior. |
| src/content-render/scripts/move-by-content-type.ts | Adds content-tree symlink detection, path containment validation, safer file writes, and asynchronous error handling. |
Review effort: Lite
Why:
Closes:
What's being changed (if available, include any code snippets, screenshots, or gifs):
Check off the following: