YashashMathur commited on
Commit
586fc32
·
verified ·
1 Parent(s): 9c5e9c1

fix: audit fixes - aegis_env/environment.py

Browse files
Files changed (1) hide show
  1. aegis_env/environment.py +2 -2
aegis_env/environment.py CHANGED
@@ -59,7 +59,7 @@ class AEGISEnvironment(Environment):
59
  # Ground truth tracks the expected correct response for RL signals
60
  self.ground_truth = {
61
  "decision": "ALLOW",
62
- "violation_type": "None",
63
  "applicable_rules": [],
64
  "suspicious_apis_caught": False,
65
  }
@@ -173,7 +173,7 @@ class AEGISEnvironment(Environment):
173
 
174
  # Calculate Reward using validated action dict + current level for dynamic weights
175
  level = CurriculumScheduler.get_level(self.step_count)
176
- reward = self.rewarder.calculate_total(action_dict, self.ground_truth, "", level=level)
177
 
178
  # BUG-4 FIX: Log confirmed violations to memory for compound-attack detection (CMP-01)
179
  if self.memory and self.ground_truth.get("violation_type", "none") != "none":
 
59
  # Ground truth tracks the expected correct response for RL signals
60
  self.ground_truth = {
61
  "decision": "ALLOW",
62
+ "violation_type": "none",
63
  "applicable_rules": [],
64
  "suspicious_apis_caught": False,
65
  }
 
173
 
174
  # Calculate Reward using validated action dict + current level for dynamic weights
175
  level = CurriculumScheduler.get_level(self.step_count)
176
+ reward = self.rewarder.calculate_total(action_dict, self.ground_truth, action_dict.get("explanation", ""), level=level)
177
 
178
  # BUG-4 FIX: Log confirmed violations to memory for compound-attack detection (CMP-01)
179
  if self.memory and self.ground_truth.get("violation_type", "none") != "none":