Skip to content

Escape IDs in request paths, and keep secrets out of reprs and tracebacks - #1497

Merged
frenck merged 1 commit into
mainfrom
frenck/hardening
Oct 10, 2026
Merged

frenck merged 1 commit into
mainfrom
frenck/hardening

Conversation

@frenck

@frenck frenck commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Proposed Changes

(Describe the changes and rationale behind them)

Found in a review, and reproduced.

  • Escape IDs in request paths. An ID like ../tailnet/-/keys/k1234 made delete_device() delete a key instead; empty, ., and .. IDs are refused.
  • Leave the API key, OAuth client secret, and the secrets of keys, webhooks, OAuth apps, new tailnets, and log streaming out of the repr, so logging them does not leak credentials.
  • Do not show locals in CLI tracebacks; older Typer versions did, which showed the credentials.
  • Raise an authentication error for a malformed OAuth token response, without the response in it, instead of using "None" as the token or letting another error escape.

Related Issues

(GitHub link to related issues or pull requests)

@frenck frenck added security Marks a security issue that needs to be resolved asap. bugfix Inconsistencies or issues which will cause a problem for users or implementers. labels Oct 10, 2026
@frenck
frenck merged commit de1e139 into main Oct 10, 2026
32 of 34 checks passed
@frenck
frenck deleted the frenck/hardening branch October 10, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers. security Marks a security issue that needs to be resolved asap.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant