Repository navigation
fix: SecretStr for the OAuth token, gitleaks 8.30.1 in CI, bare y0_ token rule - #611
Merged
Merged
Conversation
access_token was a plain str, so repr, a traceback or a log line showed the token. It is a SecretStr now; the device flow reads it with get_secret_value(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The action pinned 8.24.3 while .pre-commit-config.yaml runs 8.30.1, so a secret could pass one gate and fail the other. GITLEAKS_VERSION is the action's documented input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The default rules do not know the y0_ token shape, so a token pasted without a key name passed both gates. One rule on top of the defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
мержи |
This branch had an error being deployed
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
Evidence
repr(TokenResponse(access_token="tok-abc"))showed the token; a barey0_token passed gitleaks.After:
test_a_token_response_does_not_show_the_token_in_its_reprand thereprassertion intest_poll_token_successpass;uv run pytest->8144 passed, 5 skipped, coverage 100.00%.y0_token): default config -> no leaks; new config -> 3 findings, allyandex-oauth-token, in the curl header, the JSON value and the plain-text file; a file with the repo-style short literals (y0_abcdefgh,y0_+ 30) -> not caught.no leaks found. The existingy0_literals in the repo are 8-33 characters. Full-history scan was not completed (about 15 CPU-minutes of work, stopped); the three commits of this PR are clean.GITLEAKS_VERSION("novprefix") is from the action README at the pinned SHAe0c47f4f. The action picks.gitleaks.tomlup from the repo root through the gitleaks CLI; not exercised here, CI will show it.Merge Danger
Door: two-way
Blast Radius: CI secret scan
A new gitleaks version and a new rule can surface findings in history on the first CI run; the
gitleakscheck is required.🤖 Generated with Claude Code