Guard against blank auth value

This shouldn't be possible, but was previously handled by the library
This commit is contained in:
Michael B. Gale
2026-10-13 18:05:49 +01:00
parent f09e27bdf4
commit ccac407b4e
2 changed files with 3 additions and 2 deletions

View File

@@ -138,7 +138,8 @@ function createApiClientWithDetails(
const requestOptions = makeProxyRequestOptions(proxy);
const opts: OctokitOptions = {
auth: auth !== undefined ? `token ${auth}` : undefined,
auth:
auth !== undefined && auth.trim() !== "" ? `token ${auth}` : undefined,
baseUrl: apiDetails.apiURL,
userAgent: `CodeQL-Action/${getActionVersion()}`,
log: {