diff --git a/lib/entry-points.js b/lib/entry-points.js index 41af9350b6..665302a123 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -162056,7 +162056,10 @@ function isPAT(value) { GITHUB_PAT_FINE_GRAINED_PATTERN ]); } -var ALWAYS_ENABLED_REGISTRY_TYPE = ["git_source"]; +var ALWAYS_ENABLED_REGISTRY_TYPE = [ + "git_source", + "docker_registry" +]; var LANGUAGE_TO_REGISTRY_TYPE = { actions: [], cpp: [], diff --git a/src/start-proxy.test.ts b/src/start-proxy.test.ts index 178f7b4628..ee953798b8 100644 --- a/src/start-proxy.test.ts +++ b/src/start-proxy.test.ts @@ -128,6 +128,12 @@ const gitSourceCredential = { token: "mno", }; +const dockerRegistryCredential = { + type: "docker_registry", + host: "https://registry.example.com", + token: "pqr", +}; + test("getCredentials prefers registriesCredentials over registrySecrets", async (t) => { const registryCredentials = Buffer.from( JSON.stringify([ @@ -633,6 +639,7 @@ test("getCredentials returns only ALWAYS_ENABLED_REGISTRY_TYPE credentials for A const credentialsInput = toEncodedJSON([ ...mixedCredentials, gitSourceCredential, + dockerRegistryCredential, ]); const credentials = startProxyExports.getCredentials( diff --git a/src/start-proxy.ts b/src/start-proxy.ts index 03056ac4cb..74e0b498c4 100644 --- a/src/start-proxy.ts +++ b/src/start-proxy.ts @@ -192,7 +192,10 @@ function isPAT(value: string) { * enabled, because generic CodeQL workflow components may use them rather than just * language-specific components. */ -export const ALWAYS_ENABLED_REGISTRY_TYPE = ["git_source"] as const; +export const ALWAYS_ENABLED_REGISTRY_TYPE = [ + "git_source", + "docker_registry", +] as const; type RegistryMapping = Partial>;