[PR #4599] [Benchmark] redact results.json and treat credential "none" as no key (#4483, #4484) #5104

Open
opened 2026-11-07 16:32:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4599
Author: @ctr-137
Created: 10/29/2026
Status: 🔄 Open

Base: main ← Head: bench-redact-none-credentials


📝 Commits (1)

  • e438244 [Benchmark] redact results.json and treat credential "none" as no key (#4483, #4484)

📊 Changes

3 files changed (+10 additions, -4 deletions)

View changed files

📝 strata_cli/bench_facts.py (+7 -4)
📝 strata_cli/bench_standard.py (+1 -0)
📝 strata_cli/cli.py (+2 -0)

📄 Description

Fixes #4483 and #4484.

Problem

  1. strata bench run writes results.json without the redaction applied to outputs.jsonl, config.json, engine.log and README. Free text such as track notes, model custom pack or request error messages can therefore leak unredacted paths/names into results.json.
  2. A credential value of none (the value serve/server.py uses for "no key") was taken at face value when supplied via --credential-env, so the runner sent Bearer none (api_key_sent: true) and redacted the common word "none" wherever it occurred.
  3. The API-key redaction used a case-insensitive substring match with a 4-character floor, so even a legitimate longer key could corrupt fields when it occurred inside a hash or a common word.

Result

  • results.json is now redacted with facts.redact_object(doc, redact) before validation and writing.
  • Environment credential value none (case-insensitive) is treated as no key, so no bearer token is sent and the word is not redacted.
  • The key is now redacted with word boundaries and case-sensitively, and only when it is at least 8 characters long (shorter operator keys are not redacted).

Tests

The existing tests/terminal/test_bench_standard.py still passes; the change uses the established redaction helpers and adds no new network/hardware dependencies.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4599 **Author:** [@ctr-137](https://github.com/ctr-137) **Created:** 10/29/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `bench-redact-none-credentials` --- ### 📝 Commits (1) - [`e438244`](https://github.com/Niko1221/Strata/commit/e4382445b34f52501f3ef7fd640c56a16070ed51) [Benchmark] redact results.json and treat credential "none" as no key (#4483, #4484) ### 📊 Changes **3 files changed** (+10 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `strata_cli/bench_facts.py` (+7 -4) 📝 `strata_cli/bench_standard.py` (+1 -0) 📝 `strata_cli/cli.py` (+2 -0) </details> ### 📄 Description Fixes #4483 and #4484. ## Problem 1. `strata bench run` writes `results.json` without the redaction applied to `outputs.jsonl`, `config.json`, `engine.log` and README. Free text such as track notes, model custom pack or request error messages can therefore leak unredacted paths/names into `results.json`. 2. A credential value of `none` (the value `serve/server.py` uses for "no key") was taken at face value when supplied via `--credential-env`, so the runner sent `Bearer none` (`api_key_sent: true`) and redacted the common word "none" wherever it occurred. 3. The API-key redaction used a case-insensitive substring match with a 4-character floor, so even a legitimate longer key could corrupt fields when it occurred inside a hash or a common word. ## Result - `results.json` is now redacted with `facts.redact_object(doc, redact)` before validation and writing. - Environment credential value `none` (case-insensitive) is treated as no key, so no bearer token is sent and the word is not redacted. - The key is now redacted with word boundaries and case-sensitively, and only when it is at least 8 characters long (shorter operator keys are not redacted). ## Tests The existing `tests/terminal/test_bench_standard.py` still passes; the change uses the established redaction helpers and adds no new network/hardware dependencies. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5104
No description provided.