Runtime comparison
Python 3.12.16 / 7 cases / 7 active adapters
Output quality
| Adapter | Exact output | Visible canaries | Public controls intact | Errors | Drops |
|---|---|---|---|---|---|
| hushfang | 7 / 7 | 0 / 5 | 2 / 2 | 0 | 0 |
| hushfang-tokens | 7 / 7 | 0 / 5 | 2 / 2 | 0 | 0 |
| logmask | 7 / 7 | 0 / 5 | 2 / 2 | 0 | 0 |
| actions-runner | 6 / 7 | 1 / 5 | 2 / 2 | 0 | 0 |
| loggingredactor | 4 / 7 | 3 / 5 | 2 / 2 | 0 | 0 |
| airflow | 4 / 7 | 3 / 5 | 2 / 2 | 0 | 0 |
| stdlib | 2 / 7 | 5 / 5 | 2 / 2 | 0 | 0 |
Exact output counts full-record matches. Visible canaries count sensitive cases with an exposed marker. Errors and drops count as failed cases.
Shared text-registration cohort. All adapters received the same 7 cases. 0 cases requiring binary registration were excluded for every adapter. Airflow uses its stdlib filter. Actions Runner receives the rendered text via Python.NET. Runner timings include interop.
Registry latency
Reference run on Apple M1 Max. Each sample pairs Hushfang with the standard formatter on the same input.
2026-12-06 UTC · Apple M1 Max · macOS-27.2.1-arm64-arm-64bit-Mach-O · Python 3.14.10 · Hushfang 0.2.0 (matcher adee25594302) · Pydantic 2.14.4 · 66-byte input · 31 paired samples per path and size.
Measurements and method
Per log record
| Secrets | Input | Stdlib p50 | Hushfang p50 | Added p50 | Hushfang p95 |
|---|---|---|---|---|---|
| 1 | Clean | 0.58 µs | 3.67 µs | 3.04 µs | 7.54 µs |
| 1 | One match | 0.58 µs | 4.12 µs | 3.58 µs | 18.96 µs |
| 10 | Clean | 0.58 µs | 7.75 µs | 7.17 µs | 11.33 µs |
| 10 | One match | 0.58 µs | 7.29 µs | 6.75 µs | 8.29 µs |
| 100 | Clean | 0.67 µs | 53.67 µs | 53.00 µs | 58.96 µs |
| 100 | One match | 0.62 µs | 45.92 µs | 45.29 µs | 48.17 µs |
| 1,000 | Clean | 0.58 µs | 14.54 µs | 13.96 µs | 18.75 µs |
| 1,000 | One match | 0.58 µs | 14.79 µs | 14.17 µs | 17.79 µs |
| 10,000 | Clean | 0.62 µs | 14.12 µs | 13.50 µs | 19.67 µs |
| 10,000 | One match | 0.58 µs | 14.75 µs | 14.12 µs | 16.17 µs |
| 100,000 | Clean | 0.58 µs | 13.38 µs | 12.79 µs | 17.58 µs |
| 100,000 | One match | 0.54 µs | 13.71 µs | 13.17 µs | 15.62 µs |
| 1,000,000 | Clean | 0.62 µs | 14.62 µs | 13.96 µs | 18.79 µs |
| 1,000,000 | One match | 0.62 µs | 15.21 µs | 14.58 µs | 18.29 µs |
Registry preparation
| Secrets | Register batch | Peak process RSS (MiB) |
|---|---|---|
| 1 | 118.58 µs | 39.6 |
| 10 | 224.17 µs | 39.8 |
| 100 | 1.16 ms | 39.6 |
| 1,000 | 10.81 ms | 40.7 |
| 10,000 | 111.88 ms | 53.7 |
| 100,000 | 1.17 s | 189.3 |
| 1,000,000 | 12.43 s | 1,536.6 |
Each row comes from a fresh process with the default exact registry. A single register(*values) call receives distinct synthetic 32-character ASCII SecretStr tokens. Setup time covers registration, including preparation of encoded forms. Peak RSS is the worker's process high-water mark, including input objects and temporary allocations. Linux and macOS report RSS in this experiment.
The clean line and the line containing one exact token have equal input length. Each path first checks the complete output and warms both formatters. Each subsequent sample times one format(record) call on a prebuilt record. Stdlib and Hushfang alternate first position in each pair. Added p50 is the median of the paired differences. P95 is the nearest-rank percentile of individual Hushfang calls. These measurements exclude logger dispatch, I/O, queueing, contention and field-name rules.
Reproduce with task bench:latency.
Adapter formatting time
Median microseconds per record across 5 batches of 250 calls after warm-up. Registration and I/O are excluded.
| Adapter | 1 credential | 32 credentials | 128 credentials |
|---|---|---|---|
| stdlib | 2.97 | 2.92 | 2.95 |
| hushfang | 11.98 | 14.45 | 14.31 |
| hushfang-tokens | 13.69 | 16.58 | 16.13 |
| logmask | 5.2 | 29.48 | 168.25 |
| loggingredactor | 9.28 | 10.19 | 13.65 |
| airflow | 6.48 | 7.01 | 6.41 |
| actions-runner | 11.91 | 26.44 | 66.8 |
Case explorer
Username and escaped password in the authorityhttp / supportedstdlib leaked hushfang exact hushfang-tokens exact logmask exact loggingredactor leaked airflow leaked actions-runner exact
http-url-userinfo · Keep the host and path when both parts of userinfo are designated credentials.
Unmasked input
request=r-17 GET https://demo-client-294:maple%4042@api.example.invalid/files?page=2
Expected output
request=r-17 GET https://***:***@api.example.invalid/files?page=2
stdlib leaked
request=r-17 GET https://demo-client-294:maple%4042@api.example.invalid/files?page=2
hushfang exact
request=r-17 GET https://***:***@api.example.invalid/files?page=2
hushfang-tokens exact
request=r-17 GET https://***:***@api.example.invalid/files?page=2
logmask exact
request=r-17 GET https://***:***@api.example.invalid/files?page=2
loggingredactor leaked
request=r-17 GET https://***:maple%4042@api.example.invalid/files?page=2
airflow leaked
request=r-17 GET https://***:maple%4042@api.example.invalid/files?page=2
actions-runner exact
request=r-17 GET https://***:***@api.example.invalid/files?page=2
Repeated percent-encoded access tokenhttp / supportedstdlib leaked hushfang exact hushfang-tokens exact logmask exact loggingredactor leaked airflow leaked actions-runner exact
http-url-query · Keep the query order and page number when an SDK repeats the same query parameter.
Unmasked input
GET https://api.example.invalid/files?access_token=cedar%2F47%2Bmint&page=2&access_token=cedar%2F47%2Bmint
Expected output
GET https://api.example.invalid/files?access_token=***&page=2&access_token=***
stdlib leaked
GET https://api.example.invalid/files?access_token=cedar%2F47%2Bmint&page=2&access_token=cedar%2F47%2Bmint
hushfang exact
GET https://api.example.invalid/files?access_token=***&page=2&access_token=***
hushfang-tokens exact
GET https://api.example.invalid/files?access_token=***&page=2&access_token=***
logmask exact
GET https://api.example.invalid/files?access_token=***&page=2&access_token=***
loggingredactor leaked
GET https://api.example.invalid/files?access_token=cedar%2F47%2Bmint&page=2&access_token=cedar%2F47%2Bmint
airflow leaked
GET https://api.example.invalid/files?access_token=cedar%2F47%2Bmint&page=2&access_token=cedar%2F47%2Bmint
actions-runner exact
GET https://api.example.invalid/files?access_token=***&page=2&access_token=***
Credential in a path segmenthttp / supportedstdlib leaked hushfang exact hushfang-tokens exact logmask exact loggingredactor exact airflow exact actions-runner exact
http-url-path · Retain the host, route and public object type when a path component is a credential.
Unmasked input
GET https://api.example.invalid/files/route-Seed-8721/preview?page=2
Expected output
GET https://api.example.invalid/files/***/preview?page=2
stdlib leaked
GET https://api.example.invalid/files/route-Seed-8721/preview?page=2
hushfang exact
GET https://api.example.invalid/files/***/preview?page=2
hushfang-tokens exact
GET https://api.example.invalid/files/***/preview?page=2
logmask exact
GET https://api.example.invalid/files/***/preview?page=2
loggingredactor exact
GET https://api.example.invalid/files/***/preview?page=2
airflow exact
GET https://api.example.invalid/files/***/preview?page=2
actions-runner exact
GET https://api.example.invalid/files/***/preview?page=2
Basic header derived from URL userinfohttp / supportedstdlib leaked hushfang exact hushfang-tokens exact logmask exact loggingredactor leaked airflow leaked actions-runner leaked
http-basic-header · A registration at the settings boundary must survive conversion into a Basic header.
Unmasked input
Authorization: Basic ZGVtby1jbGllbnQtMjk0Om1hcGxlQDQy status=403 request=r-17
Expected output
Authorization: Basic *** status=403 request=r-17
stdlib leaked
Authorization: Basic ZGVtby1jbGllbnQtMjk0Om1hcGxlQDQy status=403 request=r-17
hushfang exact
Authorization: Basic *** status=403 request=r-17
hushfang-tokens exact
Authorization: Basic *** status=403 request=r-17
logmask exact
Authorization: Basic *** status=403 request=r-17
loggingredactor leaked
Authorization: Basic ZGVtby1jbGllbnQtMjk0Om1hcGxlQDQy status=403 request=r-17
airflow leaked
Authorization: Basic ZGVtby1jbGllbnQtMjk0Om1hcGxlQDQy status=403 request=r-17
actions-runner leaked
Authorization: Basic ZGVtby1jbGllbnQtMjk0Om1hcGxlQDQy status=403 request=r-17
Bearer token and request correlationhttp / supportedstdlib leaked hushfang exact hushfang-tokens exact logmask exact loggingredactor exact airflow exact actions-runner exact
http-bearer-header · Retain the authorization scheme and correlation ID when a client logs its headers.
Unmasked input
Authorization: Bearer demo-bearer-529 X-Request-ID: r-17
Expected output
Authorization: Bearer *** X-Request-ID: r-17
stdlib leaked
Authorization: Bearer demo-bearer-529 X-Request-ID: r-17
hushfang exact
Authorization: Bearer *** X-Request-ID: r-17
hushfang-tokens exact
Authorization: Bearer *** X-Request-ID: r-17
logmask exact
Authorization: Bearer *** X-Request-ID: r-17
loggingredactor exact
Authorization: Bearer *** X-Request-ID: r-17
airflow exact
Authorization: Bearer *** X-Request-ID: r-17
actions-runner exact
Authorization: Bearer *** X-Request-ID: r-17
Public URL on the same hosthttp / supportedstdlib exact hushfang exact hushfang-tokens exact logmask exact loggingredactor exact airflow exact actions-runner exact
http-public-route · A call with the same public route and query keys must survive when their values are public.
Unmasked input
GET https://api.example.invalid/files/preview?view=summary&page=2
Expected output
GET https://api.example.invalid/files/preview?view=summary&page=2
stdlib exact
GET https://api.example.invalid/files/preview?view=summary&page=2
hushfang exact
GET https://api.example.invalid/files/preview?view=summary&page=2
hushfang-tokens exact
GET https://api.example.invalid/files/preview?view=summary&page=2
logmask exact
GET https://api.example.invalid/files/preview?view=summary&page=2
loggingredactor exact
GET https://api.example.invalid/files/preview?view=summary&page=2
airflow exact
GET https://api.example.invalid/files/preview?view=summary&page=2
actions-runner exact
GET https://api.example.invalid/files/preview?view=summary&page=2
Public authentication challenge and correlation IDhttp / supportedstdlib exact hushfang exact hushfang-tokens exact logmask exact loggingredactor exact airflow exact actions-runner exact
http-public-headers · Keep the 403 reason, auth challenge and correlation header for a denied request.
Unmasked input
403 Forbidden | WWW-Authenticate: Bearer realm="files" | X-Request-ID: r-17
Expected output
403 Forbidden | WWW-Authenticate: Bearer realm="files" | X-Request-ID: r-17
stdlib exact
403 Forbidden | WWW-Authenticate: Bearer realm="files" | X-Request-ID: r-17
hushfang exact
403 Forbidden | WWW-Authenticate: Bearer realm="files" | X-Request-ID: r-17
hushfang-tokens exact
403 Forbidden | WWW-Authenticate: Bearer realm="files" | X-Request-ID: r-17
logmask exact
403 Forbidden | WWW-Authenticate: Bearer realm="files" | X-Request-ID: r-17
loggingredactor exact
403 Forbidden | WWW-Authenticate: Bearer realm="files" | X-Request-ID: r-17
airflow exact
403 Forbidden | WWW-Authenticate: Bearer realm="files" | X-Request-ID: r-17
actions-runner exact
403 Forbidden | WWW-Authenticate: Bearer realm="files" | X-Request-ID: r-17
No matching cases.
Environment
Linux-7.0.0-1020-azure-x86_64-with-glibc2.43
hushbench 0.2.0 / pydantic 2.14.4 / hushfang 0.2.0 / logmask 0.1.5 / loggingredactor 0.0.7 / airflow 1.4.0 / actions-runner 2.338.2