Repository navigation
v2-GDS01: cover streamed replies in output controls - #135
Open
ninadphalak wants to merge 1 commit into
Open
ninadphalak wants to merge 1 commit into
ninadphalak wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GDS01-T1-04 asks for personal data and secret detectors on generated output. It does not say what the detector has to do when the reply is streamed, and most chat interfaces and agent runtimes stream.
One example shows the gap. The model writes an email address and the stream happens to cut it, so one chunk ends with
jane.doe@exaand the next starts withmple.com. A detector that looks only at single chunks sees two harmless fragments. A detector that checks the whole reply at the end finds the address after the user has already seen it. In both cases the log can show a detection while the value was delivered.This PR:
mastra-ai/mastra#23783(fixed in#24189there). A streaming redactor with a fixed carry-over logged a redaction while the first part of the value had already gone out. The fix holds text back.Nothing else changes. The CVEs are untouched. The entry is about 1,360 words excluding references, and every section stays within its limit.
DSGAI mapping
DSGAI01. Related: #118, which makes the same point for Best Practices v2, Part 5.
Checklist
python data_validation/run_all_checks.py)Questions
Disclosure
I wrote the streamed-output bullet in the AI Exchange section cited above. I did not report or fix the Mastra issue; I added a regression test to that project afterwards. This PR links to none of my own reports or tools.
Ninad Phalak, independent security researcher