Repository navigation
fix(security): phrase.injection credential-transfer recall and line-break false positive - #1630
Merged
Merged
Conversation
…eak joins in phrase.injection #1601: store/save/write/copy placement verbs, inverted 'fill <field> with it', 'the key itself' re-reference, and metadata look-ahead no longer reads the next sentence. #1589: a system-prompt disclosure match joining a line end to a capitalized new sentence is SOFT, lowercase wraps stay HARD.
Deploying mcpproxy-docs with
|
| Latest commit: |
3a34f8f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a7d944d7.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-1601-1589-phrase-injecti.mcpproxy-docs.pages.dev |
…verted config-secret filler (phrase.injection)
…sk key-metadata payloads (phrase.injection)
… once in phrase injection
…ons HARD, accept 'the key itself' in inverted placement
… HARD in inverted credential placement
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 38931719308 --repo smart-mcp-proxy/mcpproxy-go
|
… contents, hash and key-file metadata moves stay off HARD
… a metadata move, cover qualified key metadata and public key
…tensionless foreign-file contents
…ayload, public key possessive
…ct, public key conjunct, file contents of a key file
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Detector changes in
internal/security/detect/checks/phrase_injection.go.#1601 (credential-transfer recall gaps)
store|save|write|copyare now placement verbs in the pronoun and explicit-payload families (credentialPlacementVerbs).fill|populate <field> with <payload>) for key files, config-file secrets, whole config file via pronoun, and a named secret via pronoun.the key itself,the value itself) now counts as the pronoun of a named secret.the length itselfdoes not.... the API key. Type: object, as the scanner appends the input schema) was read as a metadata qualifier of the secret noun and masked it. The metadata look-ahead now stops at the sentence end.#1589 (line-break false positive)
reveal your system\nprompt) stays HARD. Line breaks are recovered from the raw text (CR/LF, Unicode separators and JSON-escaped breaks in the schema), becausePhraseTextcollapses them.lineBreakSoft). Override families are not downgraded, soIgnore all previous\nInstructions ...stays HARD.Reveal your system\nPrompt(capitalized second line) now lands in SOFT, which still holds the change under trust_mode=scan but does not auto-quarantine.Tests
internal/security/scanner/testdata/sec01_injection_variants.json(13 malicious expect=dangerous, 10 benign controls expect=not_dangerous), plus unit testsTestPhraseInjection_LineBreakSentenceStartandTestPhraseInjection_CredentialTransferRecall1601.go test -race ./internal/security/...passes, includingTestSEC01_VariantCorpus_ScanGateOutcomesandTestSEC01_RealWorldBenignCorpora_NoNewHolds.go test -tags server ./internal/security/detect/...passes.--build-tags server, on./internal/security/...and./cmd/scan-eval/...: 0 issues.scan-eval gate on the variants corpus (English entries; malicious = expect:dangerous, benign = hard negatives)
scan-eval --gate --min-recall 1 --max-fp 0passes after the change.Closes #1601
Closes #1589