Skip to content

Add a Log Filter to Strip Github Tokens - #1147

Merged
henderkes merged 1 commit into
crazywhalecc:v3from
luthermonson:v3-log-filter-fix
May 20, 2026
Merged

henderkes merged 1 commit into
crazywhalecc:v3from
luthermonson:v3-log-filter-fix

Conversation

@luthermonson

Copy link
Copy Markdown
Contributor

if you run a build locally with --debug=true and an env var for GITHUB_USER and GITHUB_TOKEN you'll get some passthru logs which include the bearer token for curl requests to github calls. this was caught with local builds as i have those envvars set for quick gh cli usage and claude noticed the token was getting leaked into /log/spc.output.log

now this was with v2 and v3 tried to add a log filter but overlooked adding the encoded username:token (which is the actual contents of the bearer token) to the filters and sending the passthru logs through the filter and this PR remedies that.

i sent claude through your action logs and it found no leaks so it looks like your tokens havent leaked but you probably need to double check just to be safe. note that this would have leaked through the gha scrubbers as it would have only known to scrub GITHUB_USER and GITHUB_TOKEN and not the b64(user:token).

closes #1144

Comment thread src/globals/functions.php Resolved
@luthermonson luthermonson changed the title apply log filter in f_passthru/f_exec and mask basic-auth encoded blob Add a Log Filter to Strip Github Tokens May 20, 2026
Comment thread src/bootstrap.php Resolved
@henderkes
henderkes merged commit 8a37303 into crazywhalecc:v3 May 20, 2026
7 checks passed
@luthermonson
luthermonson deleted the v3-log-filter-fix branch May 20, 2026 06:19
@luthermonson

Copy link
Copy Markdown
Contributor Author

thanks for the help

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants