Add scope property to credentials metadata json object#1722
Merged
AbhishekBhaskar merged 2 commits intoJun 22, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for a scope field in credentials metadata so registries (notably npm registries) can specify a package scope (e.g., @mycompany) and ensures the value is not treated as a secret for log masking.
Changes:
- Adds
scope?: stringto theCredentialtype. - Includes
scopeincredentials-metadatageneration when present. - Updates secret masking logic and tests to ensure
scopeis not masked.
Show a summary per file
| File | Description |
|---|---|
src/api-client.ts |
Extends the Credential type to include optional scope. |
src/updater.ts |
Adds scope to generated credentials-metadata objects. |
src/main.ts |
Adds scope to the “non-secrets” allowlist for masking. |
__tests__/updater.test.ts |
Adds coverage verifying scope is emitted in credentials-metadata. |
__tests__/main.test.ts |
Adds coverage verifying scope is not passed to core.setSecret. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 1
Copilot stopped work on behalf of
AbhishekBhaskar due to an error
June 22, 2026 05:39
kbukum1
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for a
scopefield on credentials-metadata, allowing registries to specify a package scope (e.g.,@mycompany). This follows the same pattern asreplaces-base.Changes
scope?: stringto theCredentialtypescopein credentials-metadata generation when present on a credentialscopeto the non-secrets list so it is not masked in logsExample