Repository navigation
Conversation
A repo-local .ytrack/config.json could set a different url while inheriting the global token, so running ytrack inside an untrusted clone sent the user's token to an arbitrary server. The global token is now only used when the effective URL matches the global URL; a different local URL requires a local token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
I asked Claude Code to run a quick security audit after I cloned ytrack, and this was the only one it labeled as "High".
A repo-local .ytrack/config.json could set a different url while inheriting the global token, so running ytrack inside an untrusted clone sent the user's token to an arbitrary server. The global token is now only used when the effective URL matches the global URL; a different local URL requires a local token.
FYI, here are the other findings:
Medium
No HTTPS enforcement (client.go:245, set-url). An http:// URL is accepted, and the bearer token then goes over plaintext. This includes a typo'd or attacker-supplied local URL (see fix: do not send global token to a local URL #1). Fix: reject non-https URLs, except perhaps
localhost, unless the user passes an explicit--insecure.Tokens passed as command-line arguments (set-token , global set-token , shown in the README and Pages docs). The token lands in shell history and is briefly visible in
psto other local users.initalready reads it from stdin;set-tokenshould do the same (prompt with echo off, or accept - for stdin).Script injection in update-homebrew-tap.yml.
inputs.versionflows intosteps.checksum.outputs.versionand is then expanded as${{ … }}directly inside arun:block. A crafted version string runs shell code in a job that holdsHOMEBREW_TAP_TOKEN. The same unvalidated version is written into the Ruby formula heredoc, so it could also inject Ruby into the tap. Only people with write access can trigger it, which limits the risk. Fix: pass values viaenv:and validate against^[0-9]+\.[0-9]+\.[0-9]+$.Low / hardening
HOMEBREW_TAP_TOKENis set at job level inrelease.ymland workflow level inupdate-homebrew-tap.yml, so every step can see it, including third-party actions. Scope it to the one step that uses it. It's also embedded in thegit cloneURL and persists in.git/configon the runner; that runner is temporary, so the exposure is small.contents: write/id-tokenpermissions. Pin to SHAs.formatAPIError). Anyone who can edit an issue can embed ANSI/OSC escape sequences that spoof terminal output. Strip control characters before printing..gitignoreentry automatically, or keeping the token global by default.{…}. These are the user's own arguments, so there's no privilege gain, just odd queries.