🔒 Artifact-Shield Security Scenarios
This document outlines common usage scenarios for the Artifact-Shield gateway, detailing inputs, expected redactions, and final system outputs.
📅 Scenario 1: Basic Redaction (Redact Only)
Action: R (Default)
Input: "My email is john.doe@company.com and my phone is +1 555-0199."
System Logic:
- Detects
john.doe@company.comvia PII Detector. - Detects
+1 555-0199via PII Detector. - Replaces matches with configured placeholders.
Expected Output:
json
{
"sanitizedText": "My email is [REDACTED_EMAIL] and my phone is [REDACTED_PHONE_NUMBER].",
"llmResponse": null,
"severity": "MEDIUM",
"riskScore": 40,
"wasProxied": false
}🤖 Scenario 2: Secure LLM Proxy (Forwarding)
Action: F (Forward)
Input: "Add this secret to my config: sk-live-12345abcdef67890."
Downstream Alias: openai-gpt4
System Logic:
- Detects
sk-live-12345abcdef67890via Credential Detector. - Assesses risk as
CRITICAL(100). - Sanitizes input:
"Add this secret to my config: [REDACTED_STRIPE_KEY]." - Forwards Sanitized Text to OpenAI endpoint.
- Returns OpenAI's response back to the user.
Expected Output:
json
{
"sanitizedText": "Add this secret to my config: [REDACTED_STRIPE_KEY].",
"llmResponse": "I have successfully processed your request to update the config with the redacted key.",
"severity": "CRITICAL",
"riskScore": 100,
"wasProxied": true
}🕵️ Scenario 3: Audit Only (Analyze)
Action: A (Audit)
Input: "Tell me a story about a secret agent named 007."
System Logic:
- Scans text and finds no PII.
- Risk Score is
0(CLEAN). - Audits the request metadata.
- Does NOT forward to LLM.
Expected Output:
json
{
"sanitizedText": "Tell me a story about a secret agent named 007.",
"llmResponse": null,
"severity": "CLEAN",
"riskScore": 0,
"wasProxied": false
}💳 Scenario 4: Financial Validation (Luhn)
Action: R
Input: "Charge card 4111 1111 1111 1111 please."
System Logic:
- Regex matches the pattern
(?:\\d[ \\-]?){15,16}. FinancialDetectorapplies the Luhn Algorithm.- Validates that
4111111111111111is a valid credit card. - Applies redaction.
Expected Output:
json
{
"sanitizedText": "Charge card [REDACTED_CREDIT_CARD] please.",
"severity": "HIGH",
"riskScore": 50
}⚠️ Edge Case: Database Missing
Scenario: User requests forwardTo: "unknown-llm".
System Logic:
- Scans and sanitizes the input.
- Attempts to find
unknown-llminshield_downstream_configs. - Fails resolution.
- Logs error in audit trial.
Expected Output:
json
{
"sanitizedText": "...",
"llmResponse": "Error: no active downstream found",
"wasProxied": false
}