Skip to content

Put stored Discord and Feedback copies through the shared redaction - #40

Merged
aryanorastar merged 1 commit into
BasedHardware:mainfrom
singhharsh1708:fix/public-copies-use-shared-redaction
Oct 11, 2026
Merged

aryanorastar merged 1 commit into
BasedHardware:mainfrom
singhharsh1708:fix/public-copies-use-shared-redaction

Conversation

@singhharsh1708

Copy link
Copy Markdown
Contributor

Customer problem

A customer who pastes an API key, a bearer token, a street address or an order number in the help forum has it saved as written in the stored copy of the thread, which is shown to the model as evidence and can be quoted to another customer. redactPublic in helpcenter.js and feedback.js only removes emails and long digit runs. A key such as sk-abcdefgh12345678 is stored as sk-abcdefgh[phone], half of it still there. Discord handles and user ids stay too.

Change

redactPublic runs redactSensitive(text, { issue: true }) first, the same boundary as a public issue, then removes any long digit run that is left, as before. feedback.js uses that one helper instead of its own copy.

Evidence

AGENTS.md: customer text and order data go nowhere public, and the way to do that is privacy.js. These two copies were the paths that did not use it.

Verification

  • Added or updated a focused behavior test: one in test/helpcenter.test.js and one in test/feedback.test.js. Both fail on main. An error code and a build number in the same message are kept
  • npm test: 628/628
  • EVAL_NO_MODEL=1 node scripts/customer-eval.js: 8/8
  • Live-model evaluation not needed: the prompt and the model path are unchanged
  • No secrets, customer PII, .env, or railway.toml (the key and the numbers in the tests are made up)
  • No new claim that a person was pinged, an issue was filed, or an email was sent without confirmed success

The copies of help threads and Feedback posts that are saved as
evidence only lost emails and long digit runs. A pasted API key, a
bearer token, a street address, an order number and Discord handles
were stored as written, shown to the model and open to being quoted to
another customer. A key such as sk-abcdefgh12345678 was even stored as
"sk-abcdefgh[phone]". Both copies now pass privacy.js first, and
feedback.js uses the one helper instead of its own.
@aryanorastar
aryanorastar merged commit 6274a3c into BasedHardware:main Oct 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants