fix(deps): send the API key via the Backlog-API-Key header - #168
Merged
Merged
Conversation
The Backlog API now accepts the API key in the `Backlog-API-Key` request header. backlog-js 0.19.x still appended it as an `apiKey` query parameter, which leaks the key into proxy and server access logs, browser-style history, and anything else that records request URLs. backlog-js 0.20.x sends the key only in the header, and every request bee makes goes through backlog-js, so bumping the catalog version is enough to move all commands off the query-string transport. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report
File CoverageNo changed files found. |
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.
Summary
The Backlog API now accepts the API key in the
Backlog-API-Keyrequest header. This bumpsbacklog-jsfrom^0.19.1to^0.20.1, which sends the key only in that header instead of appending?apiKey=to every request URL.Why
A key in the query string ends up in proxy and server access logs and anywhere else request URLs are recorded. Every request bee makes goes through
backlog-js(getClient(),auth login,auth status,bee api), so the dependency bump alone moves all commands to the header.Notes
backlog-js0.20.x are additive (contentTypeon file responses, stricterContent-Dispositionparsing, Document comment types).apiKeycontaining control characters (including CR/LF), since header values cannot carry them.apiKeyquery masking inhttp-logger.tsis kept: it still hides a key passed explicitly as a query parameter viabee api.Test plan
fetchand confirmed the request URL has noapiKeyand the headers containBacklog-API-Keyvp checkvp test(118 files, 792 tests)🤖 Generated with Claude Code