-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpolicy.example.yaml
More file actions
46 lines (37 loc) · 1.45 KB
/
Copy pathpolicy.example.yaml
File metadata and controls
46 lines (37 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# InjectGuard Policy Configuration
# Copy this to policy.yaml and customize for your deployment.
policy:
# Score thresholds (0.0 = everything passes, 1.0 = nothing passes)
threshold_block: 0.85 # Score above this → content is BLOCKED
threshold_sanitize: 0.70 # Score above this → content is SANITIZED (dangerous parts stripped)
threshold_flag: 0.60 # Score above this → content is FLAGGED (logged but passed through)
# Actions
action_on_block: reject # reject | quarantine
action_on_flag: sanitize_and_log # sanitize_and_log | log_only | pass
# Scanner layers
enable_ml_classifier: true # DeBERTa-v3 ONNX model (requires download)
enable_similarity: false # Vector similarity search (requires chromadb)
enable_llm_judge: false # LLM-based judge for ambiguous cases
# Scanner weights (must sum to ~1.0 for active scanners)
scanner_weights:
heuristic: 0.35
ml_classifier: 0.40
similarity: 0.15
llm_judge: 0.10
# Content rules
content_rules:
max_content_length: 100000
strip_html_scripts: true
strip_hidden_elements: true
scan_metadata: true
# Domain allowlist (empty = allow all)
allowlist_domains: []
# - docs.python.org
# - en.wikipedia.org
# Domain denylist
denylist_domains: []
# - known-malicious.com
# File hash allowlist (sha256)
allowlist_file_hashes: []
# Pattern denylist (additional regex patterns to always block)
denylist_patterns: []