feat(egress): implement PRD 0053 — DLP addon with Gateway API matches
Replace path_allowlist with Gateway API HTTPRoute match vocabulary (paths, methods, headers with AND/OR semantics) and add DLP scanning to the egress proxy: - Token pattern detection (AWS, GitHub, Anthropic, OpenAI, Stripe, JWT) - Known secret detection (EGRESS_TOKEN_* with base64/URL/hex variants) - Naive prompt injection detection (disclosure + credential, jailbreak) - Per-route DLP configuration via manifest dlp block - Inbound response scanning with block/warn severity Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -262,8 +262,9 @@ class TestRealisticBottleFile(unittest.TestCase):
|
||||
auth:
|
||||
scheme: token
|
||||
token_ref: GITEA_TOKEN
|
||||
path_allowlist:
|
||||
- /didericis/
|
||||
matches:
|
||||
- paths:
|
||||
- value: /didericis/
|
||||
git:
|
||||
remotes:
|
||||
gitea.dideric.is:
|
||||
@@ -275,8 +276,8 @@ class TestRealisticBottleFile(unittest.TestCase):
|
||||
# Spot-check the deep parts; the structure is large.
|
||||
self.assertEqual(2, len(out["egress"]["routes"])) # type: ignore
|
||||
self.assertEqual(
|
||||
["/didericis/"],
|
||||
out["egress"]["routes"][1]["path_allowlist"], # type: ignore
|
||||
"/didericis/",
|
||||
out["egress"]["routes"][1]["matches"][0]["paths"][0]["value"], # type: ignore
|
||||
)
|
||||
self.assertEqual(
|
||||
"Bearer",
|
||||
|
||||
Reference in New Issue
Block a user