GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Private registries: Add support for Cloudsmith and GCP OIDC configurations by mbg · Pull Request #3850 · github/codeql-action

Conversation

@mbg

@mbg mbg commented Apr 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This PR primarily adds validation for Cloudsmith and GCP OIDC configurations, so that they can be correctly propagated to the authentication proxy for private package registries when given to the start-proxy action as input in GitHub-managed workflows.

The first few commits add a lightweight JSON schema implementation to simplify the specification and validation of different credential objects. The existing private registry configuration types are then migrated to make use of this.

We take advantage of this to simplify some of the validation and testing logic so that we have to update fewer places when adding new configuration types.

Then we add the two new configuration types.

Finally, we add validation for the replaces-base setting, which has been around for a while, but wasn't accepted until now.

I'd suggest reviewing this commit-by-commit.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Workflow types:

  • Managed - Impacts users with dynamic workflows (Default Setup, Code Quality, ...).

Products:

  • Code Scanning - The changes impact analyses when analysis-kinds: code-scanning.
  • Code Quality - The changes impact analyses when analysis-kinds: code-quality.
  • Other first-party - The changes impact other first-party analyses.

Environments:

  • Dotcom - Impacts CodeQL workflows on github.com and/or GitHub Enterprise Cloud with Data Residency.
  • GHES - Impacts CodeQL workflows on GitHub Enterprise Server.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

How will you know if something goes wrong after this change is released?

  • Telemetry - I rely on existing telemetry or have made changes to the telemetry.
    • Dashboards - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release.
    • Alerts - New or existing monitors will trip if something goes wrong with this change.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mbg added 3 commits April 25, 2026 15:35
@mbg
Add simple JSON schema / validation helpers
243c274
@mbg
Use schema/validation for existing OIDC config types
0752451
@mbg
Move getAuthConfig out of start-proxy.ts
c8e26e2
@mbg mbg self-assigned this Apr 25, 2026
Copilot AI review requested due to automatic review settings April 25, 2026 17:00
@mbg
mbg requested a review from a team as a code owner April 25, 2026 17:00
Copilot started reviewing on behalf of mbg April 25, 2026 17:01
View session
@github-actions github-actions Bot added the size/XL May be very hard to review label Apr 25, 2026
github-advanced-security[bot]
github-advanced-security Bot found potential problems Apr 25, 2026
View reviewed changes
Comment thread src/json/testing-util.ts Fixed

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy/validation.test.ts Fixed

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy/validation.test.ts Fixed

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy/validation.test.ts Fixed

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy/validation.ts Dismissed

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI reviewed Apr 25, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

This PR adds a lightweight schema-based validation layer for private registry credential objects, migrates existing start-proxy auth config parsing to use it, and extends supported OIDC configurations with Cloudsmith + GCP while also propagating the existing replaces-base flag through to proxy outputs.

Changes:

  • Introduce a simple JSON schema/validator utility (validateSchema, optional, FromSchema) plus a test helper for generating schema-shaped objects.
  • Refactor start-proxy auth config extraction into a dedicated validation.ts module and migrate existing credential types to schema-backed type guards.
  • Add Cloudsmith and GCP OIDC configuration schemas and include replaces-base in credential propagation/output.
Show a summary per file
File Description
src/start-proxy/validation.ts New auth-config extraction + schema-based cloning/filtering.
src/start-proxy/validation.test.ts Tests for schema-based auth-config extraction and key filtering.
src/start-proxy/types.ts Migrates auth/OIDC types to schema-based validators; adds Cloudsmith/GCP; adds replaces-base.
src/start-proxy/types.test.ts Adds pretty-print coverage for Cloudsmith/GCP and updates secret-hiding tests.
src/start-proxy.ts Switches to new getAuthConfig and propagates replaces-base.
src/start-proxy.test.ts Updates OIDC config tests to iterate over oidcSchemas.
src/start-proxy-action.ts Includes replaces-base in proxy_urls output entries.
src/json/testing-util.ts Adds makeFromSchema test helper for building objects from schemas.
src/json/index.ts Adds schema/validator types + validateSchema implementation.
src/json/index.test.ts Adds unit tests for required vs optional schema validation behavior.
lib/start-proxy-action.js Generated output update (not reviewed).

Copilot's findings

Comments suppressed due to low confidence (1)

src/start-proxy/types.ts:46

  • isUsernamePassword currently calls validateSchema(usernamePasswordSchema, config), but both username and password are optional in the schema, so validateSchema will return true for any object (including OIDC configs). This makes the type guard effectively meaningless/unsound. Consider requiring presence of at least one of the keys (or matching the previous behavior by requiring the relevant key(s) to exist) before returning true.
export function isUsernamePassword(
  config: AuthConfig,
): config is UsernamePassword {
  return json.validateSchema(usernamePasswordSchema, config);
}
  • Files reviewed: 10/11 changed files
  • Comments generated: 5

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/start-proxy/types.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy/types.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/json/testing-util.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy/validation.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

mbg added 8 commits April 25, 2026 18:23
@mbg
Simplify credential cloning in getAuthConfig
bc4097b
@mbg
Add schemas for basic credential types
d2a54a4
@mbg
Add tests for getAuthConfig
2acf819
@mbg
Group OIDC schemas into an array
530fcb3
@mbg
Validate Cloudsmith OIDC configurations
70b2658
@mbg
Validate GCP OIDC configurations
4d2c7c6
@mbg
Accept replaces-base option
efdcb31
@mbg
Ignore test files
0ed734b
@mbg
mbg force-pushed the mbg/private-registry/cloudsmith-gcp branch from 68fd7b0 to 0ed734b Compare April 25, 2026 17:36
YiChunLinlifeguidebook
YiChunLinlifeguidebook approved these changes Apr 25, 2026
View reviewed changes
@mbg
mbg dismissed YiChunLinlifeguidebook’s stale review April 27, 2026 08:44

Spam

henrymercer
henrymercer reviewed Apr 28, 2026
View reviewed changes

@henrymercer henrymercer left a comment

Copy link
Copy Markdown
Contributor

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.

What happens when we merge this? Does the authentication proxy already support these new registries or is there more work to do?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/start-proxy/types.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy/validation.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/json/index.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/json/index.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

mbg added 4 commits April 30, 2026 11:43
@mbg
Improve typing of cloneCredential
35715ef
@mbg
Improve validateSchema comment
91fbc51
@mbg
Modify FromSchema so that optional properties are actually optional
7a6ed56
@mbg
Make it clearer what the expectations for isUsernamePassword are
549683c
@mbg

mbg commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

What happens when we merge this? Does the authentication proxy already support these new registries or is there more work to do?

@henrymercer The authentication proxy already supports it (Cloudsmith and GCP). Also, it parses the JSON configuration as a generic map and would ignore keys it doesn't understand, so even if we ended up in a scenario where we have newer configurations than the version of the proxy that we have supports, it shouldn't cause problems. In general, the Dependabot team have been working on the implementation in the proxy and backend.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mbg
mbg requested review from Copilot and henrymercer April 30, 2026 11:57
Copilot started reviewing on behalf of mbg April 30, 2026 11:57
View session
Copilot AI reviewed Apr 30, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Copilot's findings

  • Files reviewed: 11/12 changed files
  • Comments generated: 3

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/json/testing-util.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/start-proxy.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mbg mbg changed the title Validate Cloudsmith and GCP OIDC configurations Private registries: Add support for Cloudsmith and GCP OIDC configurations Apr 30, 2026
mbg added 4 commits April 30, 2026 13:28
@mbg
Fix permutations comment
b779832
@mbg
Improve replaces-base validation and add tests
d1edf2e
@mbg
Add changelog entry
0a4d574
@mbg
Merge remote-tracking branch 'origin/main' into mbg/private-registry/…
022ff3c
…cloudsmith-gcp
henrymercer
henrymercer previously approved these changes Apr 30, 2026
View reviewed changes

@henrymercer henrymercer left a comment

Copy link
Copy Markdown
Contributor

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.

Just one thing I missed before. Feel free to merge if you don't think it's important.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/start-proxy.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mbg
Add generic non-printable chars test for OIDC configs
262a15f
@mbg
mbg dismissed henrymercer’s stale review via 262a15f April 30, 2026 13:10
@mbg
mbg requested a review from henrymercer April 30, 2026 13:11
@mbg
mbg enabled auto-merge April 30, 2026 13:13
henrymercer
henrymercer approved these changes Apr 30, 2026
View reviewed changes
@mbg
mbg added this pull request to the merge queue Apr 30, 2026
Merged via the queue into main with commit 7851e55 Apr 30, 2026
225 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mbg
mbg deleted the mbg/private-registry/cloudsmith-gcp branch April 30, 2026 13:56
This was referenced May 1, 2026
Merge main into releases/v4 #3867
Merged
Merge releases/v4 into releases/v3 #3869
Merged
@github-actions github-actions Bot mentioned this pull request May 18, 2026
chore(ci)(deps): bump github/codeql-action from 3.35.4 to 4.35.5 ag-ui-protocol/ag-ui#1711
Closed
@fintechestenberg fintechestenberg mentioned this pull request Oct 13, 2026
Default Setup: GCP OIDC private registry (Artifact Registry, Maven) registered but requests sent unauthenticated (401) #4229
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@henrymercer henrymercer henrymercer approved these changes
+2 more reviewers
@github-advanced-security github-advanced-security[bot] github-advanced-security[bot] left review comments
@YiChunLinlifeguidebook YiChunLinlifeguidebook YiChunLinlifeguidebook approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@mbg mbg

Labels

size/XL May be very hard to review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@mbg @henrymercer @github-advanced-security @YiChunLinlifeguidebook
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.