Skip to content

fix(release): redact the token in the GitHub and GitLab release error output - #36852

Open
AgentEnder wants to merge 1 commit into
masterfrom
ss-bearer-token-log-e9d15dac
Open

fix(release): redact the token in the GitHub and GitLab release error output#36852
AgentEnder wants to merge 1 commit into
masterfrom
ss-bearer-token-log-e9d15dac

Conversation

@AgentEnder

Copy link
Copy Markdown
Member

Current Behavior

When creating a GitHub or GitLab release fails, the error output includes Token Header Data: [object Object]. It doesn't leak the token today, but it reads like a formatting bug, and the obvious fix (JSON.stringify, like the Body: line next to it) would print the bearer token in CI logs.

Expected Behavior

The line names the header the token was sent under, with the value redacted: Token Header: Authorization: Bearer <redacted>, or Token Header: none when no token was configured. Specs assert the token itself never appears.

Related Issue(s)

Fixes #

NXC-4910, raised by https://socket.dev/npm/package/nx/alerts/23.1.2?alert_name=gptSecurity


View Polygraph session ↗

… output

- The API-error output printed `Token Header Data: [object Object]`. It never
  leaked a token, but it read as a formatting bug and the obvious fix
  (`JSON.stringify`, as the adjacent `Body:` line does) would have written the
  bearer token to CI logs.
- Print the header name with the value redacted instead, or `none` when no
  token was configured, so a failing release still shows which credential
  source was used.
- Add specs for both clients asserting the token never appears in the output.

Flagged by the Socket gptSecurity analysis of nx 23.1.2.
@netlify

netlify Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 53ecee6
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6a93a4ba10b9ec0008a4c75f
😎 Deploy Preview https://deploy-preview-36852--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 53ecee6
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6a93a4babf5aa90008936fdf
😎 Deploy Preview https://deploy-preview-36852--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Nx Cloud AI Fix could not be generated

View fix generation details ↗


View your CI Pipeline Execution ↗ for commit 53ecee6

Command Status Duration Result
nx affected --targets=lint,oxlint,test,build,e2... ❌ Failed 53m 34s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 4s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 1m 2s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 19s View ↗
nx-cloud record -- nx format:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-30 04:32:19 UTC

@polygraph-app
polygraph-app Bot marked this pull request as ready for review August 30, 2026 03:34
@polygraph-app
polygraph-app Bot requested a review from a team as a code owner August 30, 2026 03:34
@polygraph-app
polygraph-app Bot requested a review from JamesHenry August 30, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant