fix(security): skip symlinks when pinning repos#5
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06d8371f21
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (stats.isSymbolicLink()) { | ||
| this.logger.warn( | ||
| `Skipping symbolic link while adding to IPFS: ${fullPath}`, | ||
| ); | ||
| continue; |
There was a problem hiding this comment.
Preserve in-repo symlinks when pinning sources
When a verified Git repo contains a symlink whose target is still inside the checked-out repo, this unconditional skip drops that source path from the CID even though the build may have followed it successfully. Since verify.controller.ts stores this CID as the pinned source snapshot after checkout and verification, users fetching the pinned source can get a tree that no longer matches or rebuilds the verified commit; the existing isPathInsideRoot check below can distinguish safe in-repo targets from external ones instead of skipping both.
Useful? React with 👍 / 👎.
Summary
Verification