Harden the public project registry - #2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2508a03cf
ℹ️ 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".
| throw new Error(`Public manifest rejects visibility "${project.visibility}" for ${project.id}.`); | ||
| } | ||
|
|
||
| if (!/^https:\/\/github\.com\/DaveHomeAssist\/[A-Za-z0-9._-]+\/?$/.test(project.repo || '')) { |
There was a problem hiding this comment.
Verify repository visibility, not just URL shape
When an entry uses public, unlisted, or isolated visibility but points to a private DaveHomeAssist repository, this regex accepts it because it validates only the URL syntax. npm run sync-manifest would then publish that private repository name and URL in the manifest and both HTML fallbacks while reporting the record as “public-safe,” recreating the exposure this change is intended to prevent; verify visibility through GitHub or a trusted public-repository allowlist.
Useful? React with 👍 / 👎.
Summary
Verified
Guardrails