Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sec: review logger.* calls in api/routers/credentials.py for credential body leakage (MEDIUM) #72

@ascender1729

Description

@ascender1729

What

semgrep python-logger-credential-disclosure rule flagged 6 logger calls in:

  • api/routers/credentials.py:66, 88, 104, 129, 145
  • api/routers/blockchain.py:96

The rule fires on any logger format string containing "Credential" — semgrep can't tell whether the %s arguments include credential bodies or just IDs.

What to do

For each line:

  1. Confirm the %s / {} arguments only log entity IDs, error types, or user-facing error messages — NOT the credential value, signature, or private key.
  2. If safe → add # nosemgrep: python.lang.security.audit.logging.logger-credential-leak.python-logger-credential-disclosure with a one-line rationale.
  3. If unsafe (logging the body) → strip the value, log only the ID + error type.

Source

Owner-self code audit on 2026-05-04. Report: ~/recon/code-audit-2026-05-04/SOURCE-AUDIT-REPORT.md Section 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions