## Feature Request: API endpoint to read per-package Publishing Access policy #194884
Replies: 4 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for posting in the GitHub Community, @sarinajakhu! We're happy you're here. You are more likely to get a useful response if you are posting your question in the applicable category, the Discussions category is solely related to conversations around the GitHub product Discussions. This question should be in the |
Beta Was this translation helpful? Give feedback.
-
|
This would close a real audit gap. We hit the same friction running internal compliance checks across an npm org. One extension worth considering: the response could also include publish_requires_2fa_enforced_at (timestamp) and last_modified_by so security teams can evidence when the policy was set and detect unauthorized regressions, not just current state. That turns a point-in-time check into an audit trail. An org-level batch endpoint would also align nicely with existing patterns like GET /-/org/{org}/user, keeping the API surface consistent. Would happily test against a beta endpoint if scoped behind a read:packages token. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Discussion Type
Product Feedback
Discussion Content
Feature Request: API endpoint to read per-package Publishing Access policy
Summary
Please add a supported read-only API endpoint that exposes the per-package "Publishing access" policy, specifically the "Require two-factor authentication and disallow tokens (recommended)" setting.
Use case
We are a part of the Security team running monthly ISO 27001 compliance spot checks. As part of this process we need to verify that all packages under our organisation have the recommended publishing access setting enabled.
We manage a mix of private internal packages and a public mobile SDK under our npm organisation, totalling 6 packages checked monthly.
We have already automated our package inventory check via the npm API. The only remaining manual step is visiting each package's settings page in the UI to verify the publishing access setting. With 6 packages checked monthly, this is a manageable but time-consuming manual process that is difficult to evidence for auditors.
What we need
Either:
A read-only token scope would be sufficient — we do not need to modify the setting via API.
Why this matters
This is blocking full automation of our ISO 27001 MFA compliance checks. An API endpoint for this setting would allow security teams to:
We confirmed with npm Support (ticket reference available on request) that no supported endpoint currently exists for this setting.
Suggested endpoint
Could be extended to include a
publish_requires_2faboolean field in the response.Or an org-level equivalent:
Returning a list of all packages and their publishing access settings.
Beta Was this translation helpful? Give feedback.
All reactions