-
Notifications
You must be signed in to change notification settings - Fork 496
Add Trusted Publishing doc #3442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds documentation for the new Trusted Publishing feature on NuGet.org and updates the overview page to reference it.
- Introduce a dedicated conceptual doc explaining the Trusted Publishing workflow with GitHub Actions
- Link the new Trusted Publishing doc from the nuget.org overview page
- Provide a sample GitHub Actions YAML snippet for how to obtain and use a short-lived API key
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
docs/nuget-org/trusted-publishing.md | New conceptual documentation for Trusted Publishing |
docs/nuget-org/overview-nuget-org.md | Added “Trusted Publishing” section and link to doc |
Comments suppressed due to low confidence (3)
docs/nuget-org/trusted-publishing.md:10
- Use consistent NuGet branding: capitalize 'NuGet.org' instead of 'nuget.org' in the header.
# Trusted Publishing on nuget.org
docs/nuget-org/trusted-publishing.md:46
- Remove the TODO placeholder or replace it with concrete instructions for producing the package artifact.
# TODO: steps to produce artifacts/my-sdk.nupkg
docs/nuget-org/overview-nuget-org.md:36
- Use title case for the section header: '## Trusted Publishing' to match branding and other headings.
## Trusted publishing
Learn Build status updates of commit 2d88d79: ✅ Validation status: passed
For more details, please refer to the build report. |
We should hold off on merging this until we're very ready for it to go live. For example, the feature is available for everyone without the feature flag |
Learn Build status updates of commit 9aef78f: ✅ Validation status: passed
For more details, please refer to the build report. |
Trusted Publishing UI has "learn more" links pointing to this doc. Thus it needs to go live before onboarding first users. |
Learn Build status updates of commit 4c44c87: ✅ Validation status: passed
For more details, please refer to the build report. |
Learn Build status updates of commit 98587b5: ✅ Validation status: passed
For more details, please refer to the build report. |
Learn Build status updates of commit 5c85715: ✅ Validation status: passed
For more details, please refer to the build report. |
Learn Build status updates of commit 94dc80e: ✅ Validation status: passed
For more details, please refer to the build report. |
docs/nuget-org/trusted-publishing.md
Outdated
Sometimes when you create a Trusted Publishing policy, we can’t get the GitHub repository and owner IDs right away. | ||
This usually happens with private repos. Once these IDs are available—typically after a successful publish—the policy | ||
becomes **active indefinitely**. | ||
|
||
Why does that matter? Because we use those IDs to lock the policy to the original repo and owner. That helps prevent resurrection attacks. Without the IDs, someone could delete a repo, recreate it with the same name, and try to publish as if nothing changed. | ||
|
||
If we don’t have the IDs, the policy starts out as **active for 7 days**. You’ll see this in the UI. It works like a regular policy, but it will automatically become **inactive** after **7 days** unless a publish occurs. | ||
|
||
If no publish happens in time, the policy becomes **inactive**. You can reset the 7-day timer at any point, even if the policy has already become inactive after the initial window expired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes when you create a Trusted Publishing policy, we can’t get the GitHub repository and owner IDs right away. | |
This usually happens with private repos. Once these IDs are available—typically after a successful publish—the policy | |
becomes **active indefinitely**. | |
Why does that matter? Because we use those IDs to lock the policy to the original repo and owner. That helps prevent resurrection attacks. Without the IDs, someone could delete a repo, recreate it with the same name, and try to publish as if nothing changed. | |
If we don’t have the IDs, the policy starts out as **active for 7 days**. You’ll see this in the UI. It works like a regular policy, but it will automatically become **inactive** after **7 days** unless a publish occurs. | |
If no publish happens in time, the policy becomes **inactive**. You can reset the 7-day timer at any point, even if the policy has already become inactive after the initial window expired. | |
When you create a Trusted Publishing policy, sometimes it starts out as temporarily active for 7 days. You’ll see this status in the UI. During this time, it behaves like a regular policy. But if no publish happens within those 7 days, the policy automatically becomes inactive. You can restart the 7-day window at any time—even after it expires. | |
Why is this temporary period necessary? Because for newly created policies it may take NuGet can’tsometime to get the GitHub repository and owner IDs, especially for private repos. These IDs are critical—they lock the policy to the original repo and owner, which helps prevent resurrection attacks. Without them, someone could delete a repo, recreate it with the same name, and try to publish as if nothing changed. | |
Once a successful publish provides those IDs, the policy becomes permanently active. |
Learn Build status updates of commit 4242d16: ✅ Validation status: passed
For more details, please refer to the build report. |
Adding doc for Trusted Publishing feature