Hushfang

Hushfang / Guide

A secret registry at runtime

A settings loader knows a field is private. An SDK making a request needs its value. By the time a retry reaches a log handler, the field name and the secret type can both be gone. Hushfang lets the code that knows the secret teach the code that writes the log. Register a credential when you load or generate it, reveal it for the operation, and reuse that registry to mask recognized appearances in the diagnostic. The request ID, retry count and failure reason can survive intact.

One retry through the process

Moment What the application has What happens
Load A Pydantic settings model with a typed secret The owner calls register_model. Hushfang prepares matchable spellings in process memory.
Call The SDK needs an ordinary string or bytes The caller discloses it. A revealing block can also clean an exception leaving this call.
Retry The SDK emits a message containing an encoded value A RedactingFormatter attached to the text handler uses the same registry after interpolation.
Investigate request=r17 rejected *** The operator can correlate the failure. Other handlers and exporters need their own integration.

The application can also generate a signing key. Its type tells Hushfang to look for private key representations while retaining public material where the supported format distinguishes them. Registration is explicit. A new token must be registered before first use. Old values may still occur in queued records after rotation. The current registry keeps sensitive values and reversible forms until cleared or discarded. It cannot repair an earlier write, and an unknown value in arbitrary text may pass through. Runnable examples · Password field comparison · Registry latency

Prior art and the product claim

Project How the value becomes known Where matching happens
Apache Airflow Accessing a Connection password or sensitive Variable activates masking. Tasks can call mask_secret for other values. Task output can be scrubbed even after the original field name is gone. Airflow documents the scope boundary for values passed to another task. Airflow masking
GitHub Actions runner A workflow can register a runtime value with add-mask. The runner masks subsequent output and prepares encodings including Base64, JSON and URI forms. Both registration and representation-aware masking have precedents. Workflow command · Runner encoders
logmask A Python process can start with an empty masker and call add when it obtains a token. The masker recognizes known values in rendered text. This is a direct standalone Python analogue. Package and examples
Hushfang A Python application supplies individual wrapped credentials or a validated Pydantic model to an application-owned registry. The declared type contributes matching rules. The same registry can serve a text formatter and an explicit disclosure boundary. Hushbench checks the entire emitted line and the public information that survives. Secret handling · Measured outcomes

In a local comparison, both logmask 0.1.5 and Hushfang 0.1.0 received request=r17 rejected demo%2F47%2Bmint. Each initially returned the original text. After registering the synthetic value demo/47+mint, each returned request=r17 rejected ***. This exercises one encoding and one output path. Hushbench also runs the Airflow Task SDK filter and the official GitHub Actions runner assembly on the same text-registration cohort. Their documented scope and their measured outputs are recorded separately. Runtime comparison

The product opportunity is an application-level contract for Python: choose the policy when the credential still has a type, carry that knowledge to each supported output, and show exactly what survives. Hushbench makes the trade-off inspectable by reporting leaks, damage to public diagnostics and latency for a stated workload.