Update typos and comments according to PR comments

This commit is contained in:
Marek Wolan
2024-10-08 13:40:40 +01:00
parent 39c190e5f4
commit 56a17c3fea
3 changed files with 6 additions and 6 deletions

View File

@@ -19,14 +19,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added reward calculation details to AgentHistoryItem.
- Added a new Privilege-Escalation-and Data-Loss-Example.ipynb notebook with a realistic cyber scenario focusing on
internal privilege escalation and data loss through the manipulation of SSH access and Access Control Lists (ACLs).
- Added a new extendible `NetworkNodeAdder` class for convenient addition of sets of nodes based on a simplified config.
- Added a new extensible `NetworkNodeAdder` class for convenient addition of sets of nodes based on a simplified config.
### Changed
- File and folder observations can now be configured to always show the true health status, or require scanning like before.
- It's now possible to disable stickiness on reward components, meaning their value returns to 0 during timesteps where agent don't issue the corresponding action. Affects `GreenAdminDatabaseUnreachablePenalty`, `WebpageUnavailablePenalty`, `WebServer404Penalty`
- Node observations can now be configured to show the number of active local and remote logins.
- Ports and IP Protocolsno longer use enums. They are defined in dictionary lookups and are handled by custom validation to enable extendability with plugins.
- Changed AirSpaceFrequency to a data transfer object with a registry to allow extendability
- Ports and IP Protocols no longer use enums. They are defined in dictionary lookups and are handled by custom validation to enable extensibility with plugins.
- Changed AirSpaceFrequency to a data transfer object with a registry to allow extensibility
- Changed the Office LAN creation convenience function to follow the new `NetworkNodeAdder` pattern. Office LANs can now also be defined in YAML config.
### Fixed

View File

@@ -93,7 +93,7 @@ Here is an example of creating a custom node adder, DataCenterAdder:
for i in range(config.num_servers):
server = Computer(
hostname=f"server_{i}_{config.data_center_name}",
ip_address=f"192.168.100.{i + 1}",
ip_address=f"192.168.100.{i + 8}",
subnet_mask="255.255.255.0",
default_gateway="192.168.100.1",
start_up_duration=0

View File

@@ -279,7 +279,7 @@ class PrimaiteGame:
n_type = node_cfg["type"]
new_node = None
# Handle extended nodes
# Default PrimAITE nodes
if n_type == "computer":
new_node = Computer(
hostname=node_cfg["hostname"],
@@ -325,6 +325,7 @@ class PrimaiteGame:
if not (p := node_cfg.get("operating_state"))
else NodeOperatingState[p.upper()],
)
# Handle extended nodes
elif n_type.lower() in Node._registry:
new_node = HostNode._registry[n_type](
hostname=node_cfg["hostname"],
@@ -338,7 +339,6 @@ class PrimaiteGame:
)
elif n_type in NetworkNode._registry:
new_node = NetworkNode._registry[n_type](**node_cfg)
# Default PrimAITE nodes
else:
msg = f"invalid node type {n_type} in config"
_LOGGER.error(msg)