Skip to content

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Add Trusted Publishing doc #3442

wants to merge 7 commits into from

Conversation

etvorun
Copy link

@etvorun etvorun commented Jul 1, 2025

Adding doc for Trusted Publishing feature

@Copilot Copilot AI review requested due to automatic review settings July 1, 2025 18:36
@etvorun etvorun requested review from a team as code owners July 1, 2025 18:36
Copy link
Contributor

@Copilot Copilot AI left a 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

Copy link

Learn Build status updates of commit 2d88d79:

✅ Validation status: passed

File Status Preview URL Details
docs/nuget-org/overview-nuget-org.md ✅Succeeded View
docs/nuget-org/trusted-publishing.md ✅Succeeded View

For more details, please refer to the build report.

@joelverhagen
Copy link
Member

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

chabiss
chabiss previously approved these changes Jul 2, 2025
Copy link

Learn Build status updates of commit 9aef78f:

✅ Validation status: passed

File Status Preview URL Details
docs/nuget-org/overview-nuget-org.md ✅Succeeded View
docs/nuget-org/trusted-publishing.md ✅Succeeded View

For more details, please refer to the build report.

@etvorun
Copy link
Author

etvorun commented Jul 7, 2025

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

Trusted Publishing UI has "learn more" links pointing to this doc. Thus it needs to go live before onboarding first users.

Copy link

Learn Build status updates of commit 4c44c87:

✅ Validation status: passed

File Status Preview URL Details
docs/nuget-org/overview-nuget-org.md ✅Succeeded View
docs/nuget-org/trusted-publishing.md ✅Succeeded View

For more details, please refer to the build report.

Copy link

Learn Build status updates of commit 98587b5:

✅ Validation status: passed

File Status Preview URL Details
docs/nuget-org/overview-nuget-org.md ✅Succeeded View
docs/nuget-org/trusted-publishing.md ✅Succeeded View

For more details, please refer to the build report.

Copy link

Learn Build status updates of commit 5c85715:

✅ Validation status: passed

File Status Preview URL Details
docs/nuget-org/overview-nuget-org.md ✅Succeeded View
docs/nuget-org/trusted-publishing.md ✅Succeeded View

For more details, please refer to the build report.

Copy link

Learn Build status updates of commit 94dc80e:

✅ Validation status: passed

File Status Preview URL Details
docs/nuget-org/overview-nuget-org.md ✅Succeeded View
docs/nuget-org/trusted-publishing.md ✅Succeeded View

For more details, please refer to the build report.

Comment on lines 86 to 94
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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link

Learn Build status updates of commit 4242d16:

✅ Validation status: passed

File Status Preview URL Details
docs/nuget-org/media/trusted-publishing.png ✅Succeeded View
docs/nuget-org/overview-nuget-org.md ✅Succeeded View
docs/nuget-org/trusted-publishing.md ✅Succeeded View

For more details, please refer to the build report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy