-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Milestone
Description
Bug Description
In netsecgame/game/coordinator.py, _update_agent_status checks goal_check before is_detected using if/elif, so a goal-reaching step short-circuits detection evaluation.
Current logic (netsecgame/game/coordinator.py:787-793):
if self.goal_check(agent):
next_status = AgentStatus.Success
elif self.is_detected(agent):
next_status = AgentStatus.FailBecause detection is in an elif, detection is skipped whenever goal_check(agent) is True.
This conflicts with documented behavior in README.md:229:
If the attacker does a successful action in the same step that the defender successfully detects the action, the priority goes to the defender. The reward is a penalty, and the game ends.
Impact:
- Attacker can receive
Successon a step where defender detection should causeFail. - Reward signal is inconsistent with documented rules.
- Global defender effectiveness is reduced on the most critical (goal) step.
Steps to Reproduce
- Start the NetSecGame server with
use_global_defender: Truein task configuration. - Connect an attacker agent.
- Reach a state where one action completes attacker goal.
- Send the goal-completing action.
- Observe
_update_agent_statusreturnsAgentStatus.Successwhengoal_check(agent)is true, without evaluatingis_detected(agent).
Expected Behavior
Detection must have priority over goal completion when both are true in the same step.
For example:
if self.is_detected(agent):
next_status = AgentStatus.Fail
elif self.goal_check(agent):
next_status = AgentStatus.Success
elif self.is_timeout(agent):
next_status = AgentStatus.TimeoutReachedVersion
0.1.0
Installation / Deployment Method
Running locally from source
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation