security: remove clear-text exception logging in secrets backend (alert 53) - #134
Merged
Merged
Conversation
abhihashi
force-pushed
the
fix/secvuln-53-clear-text-logging-access
branch
from
August 14, 2026 21:13
c83ca5a to
2c67c17
Compare
cugu
previously approved these changes
Aug 17, 2026
abhihashi
force-pushed
the
fix/secvuln-53-clear-text-logging-access
branch
from
August 19, 2026 13:13
2c67c17 to
5b212e5
Compare
ruff 0.16.x expanded its default rule set to include UP (pyupgrade), PIE, and RUF rules not previously enforced, causing CI to fail on every PR. This commit resolves all violations so the lint step passes cleanly. Changes in pyproject.toml: - Add [tool.ruff.lint] with an explicit select and ignore list, pinning the enforced rule set so future ruff upgrades cannot silently add new failures - Ignore E501 (line-too-long) and RUF012 (mutable-class-default) which are either the formatter's responsibility or a pydantic Field() pattern Codebase changes (ruff --fix + manual): - UP006/UP007/UP045: replace deprecated typing generics (List, Dict, Optional, Tuple) with built-in equivalents (list, dict, X | None, tuple) - UP035: remove unused 'from typing import ...' lines - UP015/UP018: remove redundant open() mode args and str() literals - PIE790: remove unnecessary pass in abstract method stubs - RUF100: remove unused noqa directives - E712: replace '== True' comparisons with truthiness checks - W291/W293/W292: remove trailing whitespace and add missing EOF newlines
…t exposure Code scanning alert #53 (grove/secrets/__init__.py:74). Passing the exception object directly into the structured log 'extra' dict could expose the secret value in clear text, as backend error messages (e.g. AWS, Vault) may echo back the credential being fetched. Remove the 'exception' key from the extra dict in the AccessException / IndexError handler and set exc_info=False to ensure no secret material leaks through the logging pipeline.
abhihashi
force-pushed
the
fix/secvuln-53-clear-text-logging-access
branch
from
August 19, 2026 13:25
5b212e5 to
55f18f4
Compare
cugu
approved these changes
Aug 19, 2026
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
Fixes code scanning alert
#53— clear-text logging of sensitive information atgrove/secrets/__init__.py:74.Root cause
The
exceptionobject was passed directly into the structured logextradict inside theAccessException / IndexErrorhandler. Secret backends (AWS Secrets Manager, Vault, etc.) can echo credential paths or values back inside their error messages. Bindingerrtoextracaused the full exception string — potentially including secret material — to be emitted as clear-text in every log pipeline.Change
exception: errfromextraso no secret material enters the log record.exc_info=Falseexplicitly to prevent the logger from attaching the traceback (which could also carry the exception message) via a parent handler configured withexc_info=True.