Skip to content

install: operation log records the raw source argument, including any URL credentials #878

Closed

Description

@salmonumbrella

Found by source inspection at f1faa4b; no repro was executed. The examples below use made-up values.

Current behavior

logInstallOp writes the install source into the operation log. When positional arguments exist, it replaces summary.Source with args[0] (install.go#L600-L605). Search installs pass the result source as args too (search.go#L488, search_batch.go#L645).

summary.Source is not redacted either. It comes from source.Raw (install_handlers.go#L34), which is the original user input (source.go#L123). Either way, the oplog stores the source string exactly as the user typed it.

So installing from a URL with embedded credentials, for example:

skillshare install https://user:[email protected]/team/skills.git

would write user:example-token into the operation log. Anyone who reads the log, or the dashboard's log view, can then see the credential. sanitizeTokens exists (auth.go#L277), but it only redacts values of known token environment variables in error text. It is not applied to the logged source, and it would miss credentials that are typed inline.

Request

Strip URL userinfo (or replace it with [REDACTED]) from the source before logInstallOp stores it, on every install path, including search installs.

Suggested regression test

A unit test that calls logInstallOp with a synthetic https://u:secret@host/repo.git source, through both args and summary.Source, and asserts that the logged entry contains neither secret nor u:.

Activity

  1. self-assigned this
    on Nov 13, 2026
  2. added
    bug
    security
    on Nov 13, 2026
  3. runkids commented on Nov 13, 2026

    @runkids
    Owner

    Thanks for tracing this through the source and pointing at the exact lines.

    Fixed in #881. The operation log no longer keeps credentials from a URL source: userinfo and query are stripped from the logged source and from any error message that echoes it, for CLI, search and dashboard installs. It will be in the next release. Entries written before then still hold the source as typed, so running skillshare log --clear once is worth it.

    If you spot another place a credential slips through, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsecurity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions