og-arin commited on
Commit
ac4929a
Β·
verified Β·
1 Parent(s): 4352d74

Update openenv.yaml

Browse files
Files changed (1) hide show
  1. openenv.yaml +109 -35
openenv.yaml CHANGED
@@ -1,48 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  name: "PhishGuard-Env"
2
- version: "1.0.0"
3
- description: "Phishing triage simulation for SOC Analysts."
 
 
 
4
 
5
- tasks:
6
- - id: "lv1"
7
- name: "basic_spam_detection"
8
- grader: "grader.py"
9
 
10
- - id: "lv2"
11
- name: "phishing_detection"
12
- grader: "grader.py"
 
 
 
 
 
13
 
14
- - id: "lv3"
15
- name: "safe_email_identification"
16
- grader: "grader.py"
 
 
 
 
17
 
18
- - id: "lv4"
19
- name: "malware_detection"
20
- grader: "grader.py"
 
 
 
 
21
 
22
- - id: "lv5"
23
- name: "internal_safe_mail"
24
- grader: "grader.py"
 
 
 
 
25
 
26
- - id: "lv6"
27
- name: "business_email_compromise"
28
- grader: "grader.py"
 
 
 
 
29
 
30
- - id: "lv7"
31
- name: "document_phishing"
32
- grader: "grader.py"
 
 
 
 
 
 
 
 
 
33
 
34
- - id: "lv8"
35
- name: "attachment_malware"
36
- grader: "grader.py"
 
 
 
 
37
 
38
- - id: "lv9"
39
- name: "qr_phishing"
40
- grader: "grader.py"
 
 
 
 
 
 
 
 
 
 
 
41
 
42
- - id: "lv10"
43
- name: "supply_chain_attack"
44
- grader: "grader.py"
45
 
46
  tags:
47
- - "cybersecurity"
48
- - "openenv"
 
 
 
 
 
1
+ # openenv.yaml – PhishGuard-Env
2
+ # ================================
3
+ # WHY THIS FILE WAS REWRITTEN
4
+ # ----------------------------
5
+ # The OpenEnv validator runs two checks:
6
+ #
7
+ # Phase 1 (static, before any episode):
8
+ # Reads this file. Requires:
9
+ # β€’ Top-level `id` field (environment identifier)
10
+ # β€’ `entry_point` field (importable class path: module:ClassName)
11
+ # β€’ `tasks` list with at least 3 entries, each with `id` and `grader`
12
+ # β€’ `scoring` block describing the reward contract
13
+ #
14
+ # Phase 2 (runtime, after running an episode):
15
+ # Calls /reset then /step repeatedly.
16
+ # Counts distinct `task_id` values returned in /step responses.
17
+ # Requires β‰₯ 3 distinct task IDs that match the `id` fields in `tasks`.
18
+ #
19
+ # Previous failure: tasks used level IDs (lv1–lv10) instead of semantic
20
+ # category IDs, and the runtime /step returned those same level IDs.
21
+ # The validator counted 10 IDs Γ— 1 occurrence each β€” not β‰₯ 3 graded categories.
22
+ #
23
+ # Fix: tasks now use the five semantic IDs defined in grader.TASK_REGISTRY.
24
+ # The runtime env.py resolves every scenario's email_type to its task_id via
25
+ # grader.resolve_task_id(), so YAML and runtime are always in sync.
26
+
27
+ id: phishguard-env
28
  name: "PhishGuard-Env"
29
+ version: "2.0.0"
30
+ description: >
31
+ A high-fidelity SOC analyst simulation environment for LLM benchmarking.
32
+ An AI agent triages 10 emails spanning 5 distinct threat categories,
33
+ managing a 3-life Health Bar while keeping rewards strictly in (0.0, 1.0).
34
 
35
+ entry_point: "env:PhishGuardEnv"
 
 
 
36
 
37
+ tasks:
38
+ - id: "task_spam"
39
+ name: "Spam Detection"
40
+ grader: "grader.grade_task_spam"
41
+ description: >
42
+ Identify unsolicited bulk/commercial mail and route it to spam
43
+ without over-escalating to a full domain block.
44
+ Scenarios: lv1 (prize lottery), lv2 (promotional bulk mail).
45
 
46
+ - id: "task_phishing"
47
+ name: "Phishing Detection"
48
+ grader: "grader.grade_task_phishing"
49
+ description: >
50
+ Detect credential-harvesting and typosquat phishing attacks
51
+ and block the offending domain at the perimeter.
52
+ Scenarios: lv3 (googIe.com typosquat), lv4 (fake doc-share link).
53
 
54
+ - id: "task_safe"
55
+ name: "Safe Email Identification"
56
+ grader: "grader.grade_task_safe"
57
+ description: >
58
+ Recognise legitimate internal and partner emails and pass them
59
+ through without causing business disruption (false-positive test).
60
+ Scenarios: lv5 (manager meeting), lv6 (HR portal link).
61
 
62
+ - id: "task_malware"
63
+ name: "Malware Delivery Detection"
64
+ grader: "grader.grade_task_malware"
65
+ description: >
66
+ Identify emails delivering executable payloads or macro-enabled
67
+ attachments and quarantine them for forensic analysis.
68
+ Scenarios: lv7 (PE binary dropper), lv8 (unsigned Excel macro).
69
 
70
+ - id: "task_bec"
71
+ name: "Business Email Compromise Detection"
72
+ grader: "grader.grade_task_bec"
73
+ description: >
74
+ Detect BEC and supply-chain attacks, including adversarial cases
75
+ where SPF and DMARC authentication both pass on a compromised domain.
76
+ Scenarios: lv9 (wire-transfer BEC), lv10 (supply-chain partner).
77
 
78
+ observation_space:
79
+ type: object
80
+ fields:
81
+ sender: { type: string, description: "Full sender email address" }
82
+ subject: { type: string, description: "Email subject line" }
83
+ body: { type: string, description: "Plain-text email body" }
84
+ links: { type: array, items: string, description: "URLs in the email" }
85
+ has_attachments: { type: boolean, description: "True if attachments present" }
86
+ spf_record: { type: string, description: "SPF result: pass|fail|softfail|none" }
87
+ dmarc_record: { type: string, description: "DMARC result: pass|fail|none" }
88
+ urgency_level: { type: string, description: "low|medium|high|critical" }
89
+ confidence_hint: { type: string, description: "Noisy SIEM/gateway signal (optional)" }
90
 
91
+ action_space:
92
+ type: string
93
+ allowed:
94
+ - MARK_SAFE # Confirmed legitimate β€” deliver to inbox
95
+ - MOVE_TO_SPAM # Bulk/unsolicited β€” no active threat
96
+ - QUARANTINE # Suspicious β€” hold for investigation
97
+ - BLOCK_DOMAIN # Confirmed phishing/BEC β€” block at perimeter
98
 
99
+ scoring:
100
+ description: >
101
+ Every reward is strictly inside the open interval (0.0, 1.0).
102
+ 0 and 1 are never returned. Guaranteed by the safe_score() transform.
103
+ formula: "safe_score(raw) = 0.01 + 0.98 * raw, raw in [0.0, 1.0]"
104
+ minimum: 0.01
105
+ maximum: 0.99
106
+ health_system:
107
+ max_health: 3
108
+ drain_threshold: 0.15
109
+ description: >
110
+ Rewards below 0.15 (Breach=0.030, Disruption=0.059, Wrong=0.108)
111
+ deduct one life. Episode ends when health reaches 0 or all 10
112
+ scenarios are completed.
113
 
114
+ max_steps: 30
 
 
115
 
116
  tags:
117
+ - cybersecurity
118
+ - phishing
119
+ - soc-analyst
120
+ - email-triage
121
+ - openenv
122
+ - reinforcement-learning