Skip to content

Commit 94de8a7

Browse files
anth-volkclaude
andcommitted
Fix the ruff group 6 findings in the code #791 added
#791 landed on main after this stack branched. S105, which this PR enables, flags two values that only look like secrets, and each keeps a reasoned suppression: the redaction pattern for secret-looking key names in the Stage 12 failure-cause module, and the fake database password its tests check redaction removes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8c24085 commit 94de8a7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎projects/policyengine-simulation-executor/src/policyengine_simulation_executor/stage12_runtime/failure_causes.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
)
8787
_BEARER_TOKEN = re.compile(r"(?i)\bbearer\s+[A-Za-z0-9._~+/=-]+")
8888
_SECRET_KEY = (
89-
r"[\w-]*(?:password|passwd|pwd|secret|token|api[_-]?key|access[_-]?key"
89+
r"[\w-]*(?:password|passwd|pwd|secret|token|api[_-]?key|access[_-]?key" # noqa: S105 # a pattern for secret-looking key names, not a secret
9090
r"|private[_-]?key|credentials?|signature|sig)"
9191
)
9292
_SECRET_ASSIGNMENT = re.compile(

‎projects/policyengine-simulation-executor/tests/test_stage12_failure_causes.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from pydantic import BaseModel, TypeAdapter, ValidationError
2121
from sqlalchemy.exc import IntegrityError, OperationalError
2222

23-
DATABASE_PASSWORD = "pooler-password-value"
23+
DATABASE_PASSWORD = "pooler-password-value" # noqa: S105 # fake password; the tests check that redaction removes it
2424
DATABASE_URL = (
2525
f"postgresql://postgres.project:{DATABASE_PASSWORD}"
2626
"@pooler.example.com:5432/postgres"

0 commit comments

Comments
 (0)