Skip to content

Refactor: Overly Broad Secret Parameter Filtering in Semantic Hash #73

Description

@BerryUIKI

Description

In backend/app/core/cache.py (compute_semantic_node_hash), API keys are stripped from hash computation using:
if not k.lower().endswith("key")

Impact

Legitimate non-secret node parameters such as chroma_key, animation_key, or frame_key are inadvertently excluded from node hash calculation, causing false cache hits across differing parameter values.

Affected Files

  • backend/app/core/cache.py

Proposed Remediation

Use an explicit denylist (e.g. {"api_key", "token", "secret"}) or declare secret types in parameter metadata.

Activity

  1. added
    backendBackend Python / FastAPI / Engine issues
    architectureSystem architecture, contract invariants, and pipeline design
    on Oct 4, 2026
  2. BerryUIKI commented on Oct 4, 2026

    @BerryUIKI
    OwnerAuthor

    Resolved in PR #91

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureSystem architecture, contract invariants, and pipeline designbackendBackend Python / FastAPI / Engine issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions