Changes since v0.1.0 (commit
9f0bbdd)
New Features
Topology Randomization Seed
- Agents can now pass an explicit
seedduringreset()to deterministically control topology randomization. - The seed is propagated through all RNG processes (IP re-mapping, network mapping) ensuring reproducible episodes.
GameCoordinatorvalidates that a seed value is present before accepting a topology-randomization reset request; malformed requests are rejected with a descriptive error response.
Agent Name Sanitization
- Agent names are now sanitized during the join handshake, preventing downstream issues caused by invalid or adversarial names.
Goal Description Validation
- The config parser now validates attacker goal descriptions at load time, including checking that referenced C&C IP addresses exist in the scenario topology.
Block Action Serialization
blocked_ipis now correctly parsed as an IP object inBlockIPaction parameters, fixing a silent serialization bug.
Malformed Action Handling
- The coordinator now returns an explicit error response when an agent sends a malformed or unrecognized action, rather than silently dropping it.
WhiteBox Docker Image
- A new
Dockerfilebuild argument allows building a WhiteBox variant of the environment image. - Instructions added to the README along with a (currently disabled) GitHub workflow for publishing the WhiteBox image.
Improvements
World Classes — Refactored
NetSecGameandWhiteBoxNetSecGamewere split into separate files undernetsecgame/game/worlds/for cleaner project organization.- Network mapping logic refactored to preserve relative distances between hosts and adds fallback handling for edge cases in IP assignment.
WhiteBoxNetSecGamenow correctly reports that IP re-mapping is not supported when responding to reset requests.- Reset processing for topology randomization moved to the coordinator level, separating concerns more clearly.
get_valid_actions()return type unified toSet[Action].
GameCoordinator — Hardened Reset Logic
- Correctly detects and handles the case where an agent disconnects mid-reset.
- Rewards are not assigned when there are no remaining players.
- Improved logging around reset and reward assignment flows.
Config Parser — Extended
- Handles
integerandNonevalues inActionparameters gracefully. - Added support for parsing the new
seedparameter in reset requests. - Removed deprecated and unused configuration options.
ConfigurationManager — Extended
- Extended with additional utility methods and improved test coverage.
Scenarios Module
- Added
netsecgame/game/scenarios/__init__.pyfor cleaner imports. - Restored missing scenario configurations and example task configuration entries.
Utilities
gamaplay_graphs.pyrenamed togameplay_graphs.py(typo fix).trajectory_recorder.py: CSV storage for replay buffers is now deprecated; JSONL format is recommended instead.- Import compatibility shim added in
netsecgame/utils/utils.pywith deprecation warnings for utilities that were moved.
Parameter Naming — Standardized
use_dynamic_ipsrenamed touse_dynamic_addressesuniformly across code, docstrings, and tests.
Dockerfile — Optimized
- Reduced image size through build optimizations.
False-Positive Reward Fix
- The FP reward is now enforced as non-positive with an explicit validation check and corrected sign convention.
Documentation
- Added dedicated API documentation pages for
NetSecGameandWhiteBoxNetSecGame. - Added configuration parser documentation (
docs/config_parser.md). - Improved
docs/index.md,docs/game_coordinator.md, anddocs/configuration_manager.mdwith updated content and links. - Added a separate PyPI README (
README_pypi.md) and wired it intopyproject.toml. - Enhanced the main
README.mdwith configuration details and WhiteBox Docker build instructions. - All docstrings migrated to Google-style notation.
mkdocs.ymlupdated to include all new documentation pages.
Tests
Three new test modules added:
| Module | Coverage |
|---|---|
tests/agents/test_base_agent.py |
Base agent lifecycle and message handling |
tests/game/test_config_parser.py |
Config parser — full coverage including edge cases |
tests/game/test_configuration_manager.py |
Configuration manager — full coverage |
Additional test additions:
- Tests for
BlockIPaction serialization. - Tests for malformed action handling.
- Tests for topology-randomization seed reset behaviour.
- Fixed mock scope in existing config parser tests.
Housekeeping
- Added GitHub community files:
CODE_OF_CONDUCT.md,CONTRIBUTING.md,SECURITY.md. - Added GitHub Issue Templates for bug reports and feature requests (YAML format).
- Added Pull Request template with an expanded testing checklist.
- Updated
cyst-coredependency to the latest release. - Removed unused imports and dead code throughout the codebase.
- Fixed multiple typos across code, comments, and documentation.
- Added
.coverageto.gitignore.