Commit Graph

554 Commits

Author SHA1 Message Date
Charlie Crane
7a833afe2d #2656 - Unit tests for new ActionPenalty reward component, testing yaml and some minor changes to the implementation. Need to update Documentation to detail how this is added 2024-06-26 12:20:28 +01:00
Chris McCarthy
636ec0cdd4 #26661 - Added tests for testing arp doesn't work but also doesn't crash the network if attempting to resolve a broadcast or network address 2024-06-19 11:31:13 +01:00
Charlie Crane
923d2629ca Merged PR 418: Update Pre-Commit to check for valid copyright
## Summary
Updates Pre-commit with the a check to ensure valid copyright headers

## Test process
*How have you tested this (if applicable)?*

## Checklist
- [X] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [ ] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2646
2024-06-13 18:54:48 +00:00
Czar Echavez
101fa3ebdb #2658: change key of observation to match what is in CAOS document 2024-06-13 16:29:02 +01:00
Marek Wolan
fad8d936e6 Merge remote-tracking branch 'origin/dev' into feature/2646_Update-pre-commit-to-check-for-valid-copyright 2024-06-13 12:52:09 +01:00
Czar Echavez
539577ddc3 #2658: added monitored traffic into config + default obs space 2024-06-13 11:48:13 +01:00
Czar Echavez
bbcde47fa5 #1847: fix test 2024-06-11 16:43:38 +01:00
Czar Echavez
76e954d1a1 Merge remote-tracking branch 'origin/dev' into feature/1847-more-red-agents 2024-06-11 14:26:11 +01:00
Chris McCarthy
85325361b3 #2618 - Fixed the error that had NIC traffic describe state with enums as keys in the dict 2024-06-06 14:13:26 +01:00
Czar Echavez
e1ba0ff125 #2610: apply suggestions from PR 2024-06-06 01:46:42 +01:00
Chris McCarthy
81bcf99855 #2646 - Added a custom pre-commit hook that ensure the copyright clause is added to .py and .rst files. 2024-06-05 09:11:37 +01:00
Czar Echavez
5c23276be5 #2610: removed tap logic from ransomware script 2024-06-04 13:17:26 +01:00
Marek Wolan
c5f131ece5 fix reward logging 2024-05-31 15:00:18 +01:00
Chris McCarthy
5eea5bf4f9 #2618 - Integrated the NMAP into the action and requests functionality to enable agent usage. added NMAP agents tests. 2024-05-31 13:53:18 +01:00
Marek Wolan
0c19546322 #2588 optional RL deps 2024-05-29 14:54:45 +01:00
Chris McCarthy
716f3ece1e #2618 - Added NMAP application, documentation, and tests. 2024-05-29 13:13:42 +01:00
Charlie Crane
85f03570f7 Merged PR 376: 2457 - Remove Hardcoding from Links
## Summary
This PR removes the hardcoding of Link bandwidth, and makes it possible to be configured via the network yaml definitions.
Link bandwidth will still default to 100 if this is not present, to prevent breaking all previous defined networks.

## Test process
All tests continue to pass.
`basic_network_config.yaml` now provides a non-default link bandwidth which is confirmed within unit tests.

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #2457
2024-05-22 11:35:48 +00:00
Czar Echavez
af71fe52be Merged PR 378: Add create file/folder and file access requests
## Summary
Added requests in file system that allows:
- file to be created
- folder to be created
- file to be "accessed"

## Test process
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/378?_a=files&path=/tests/integration_tests/test_simulation/test_request_response.py

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2606
2024-05-21 10:35:49 +00:00
Christopher McCarthy
be0cf10847 Merged PR 380: #2561 - Set the DatabaseServer service to automatically install the FTPClient
## Summary
- Set the DatabaseServer service to automatically install the upon install to enable backup. Added some defensive statements that gracefully handle backup/restore requests when FTPClient is not installed.

## Test process
Added test that installs `DatabaseServer` on a new node then checks for an installed `FTPClient`.

## Checklist
- [ ] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [ ] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2561 - Set the DatabaseServer service to automatically install the  upon install to enable backup. Added some defensive statements that gracefully handle backup/restore requests when FTPClient is not

Related work items: #2561, #2570
2024-05-21 08:56:50 +00:00
Czar Echavez
80b1988ab9 #2606: add agent actions + test 2024-05-20 13:10:21 +01:00
Chris McCarthy
7a404773ac #2561 - Ran pre-commit hook 2024-05-20 12:44:58 +01:00
Czar Echavez
e98ae0bd09 #2606: altered so that the request is done in file system + also completing access request 2024-05-17 16:59:24 +01:00
Charlie Crane
f66d9d5817 Merge branch 'dev' into feature/2457-Set_link_bandwidth_via_config 2024-05-14 14:44:20 +01:00
Charlie Crane
74514e977d #2457 - Syncing changes made. Updates to documentation and tests 2024-05-14 11:05:37 +01:00
Charlie Crane
71684dc5f0 #2457 - Initial commit removing the hardcoding of bandwidth values within links. Now pull it from configuration files, defaulting to 100 if not implemented 2024-05-13 14:42:15 +01:00
Chris McCarthy
e2f061fde0 #2561 - Set the DatabaseServer service to automatically install the upon install to enable backup. Added some defensive statements that gracefully handle backup/restore requests when FTPClient is not installed. 2024-05-13 07:58:43 +01:00
Chris McCarthy
ebbdea517e 2536 - Removed 'real files' from FileSystem and FTP 2024-05-13 07:30:33 +01:00
Marek Wolan
4d3c85bc14 #2550 Backport changes into core 2024-05-07 15:35:02 +01:00
Marek Wolan
535e064af5 unflake test 2024-05-03 11:05:33 +01:00
Marek Wolan
4f38184959 remove redundant comment 2024-05-03 09:08:26 +01:00
Marek Wolan
4a02d1d8e5 Readd import statement 2024-05-02 17:00:29 +01:00
Marek Wolan
6ef6a5cd18 Merge remote-tracking branch 'origin/dev' into feature/remove-ftp-client-default-app 2024-05-02 16:52:24 +01:00
Marek Wolan
b9b922e776 Make ftp client only default on computers, not servers 2024-05-02 15:51:06 +01:00
Czar Echavez
25807653f4 Merge remote-tracking branch 'origin/dev' into feature/2533-improve-dev-tools-in-primaite-cli 2024-05-01 16:11:52 +01:00
Czar Echavez
b6b5ce91c2 #2533: clean up temp items in tests + fixing the CLI tests 2024-05-01 14:33:33 +01:00
Czar Echavez
a2fb04e6f6 #2533: set default dev output path + clean up 2024-05-01 14:02:40 +01:00
Chris McCarthy
d72622f3f7 Merge branch 'dev' into feature/2519_Make-airspace-an-attribute-of-Simulation
# Conflicts:
#	CHANGELOG.md
2024-05-01 10:22:44 +01:00
Czar Echavez
729f9c5064 #2533: fix primaite config recreated when running setup 2024-04-30 19:15:54 +01:00
Czar Echavez
73f64cd89c Merge remote-tracking branch 'origin/dev' into feature/2533-improve-dev-tools-in-primaite-cli 2024-04-30 18:27:05 +01:00
Chris McCarthy
04eb33e28a #2519 - Dropped failed unit test in test_wireless_router.py as it didn't actually test any functionality and simply just tested the config parser, which we now do in the integration test. 2024-04-30 16:07:38 +01:00
Czar Echavez
ab3d23785d #2533: precommit 2024-04-30 15:50:53 +01:00
Chris McCarthy
bc573dfed0 #2519 - refactored all air-space usage to that a new instance of AirSpace is created for each instance of Network. This 1:1 relationship between network and airspace will allow parallelization. Added additional WirelessRouter test that tests wireless connectivity from config file too. 2024-04-30 15:46:16 +01:00
Czar Echavez
59990813f5 #2533: added tests + log level for output 2024-04-30 15:43:25 +01:00
Christopher McCarthy
a82ee2b8e1 Merged PR 354: Network focussed dev config documentation
## Summary
Built three networks, one is the minimal network, one is a basic LAN, and another is a nice beefy multi-LAN setup with ISP and DNS along with applications, services. Documented the process when building the config files. Included the config files as example configs for use.

## Test process
Tested the shit out of the big multi-lan network.

## Checklist
- [ ] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [ ] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2266
2024-04-30 13:53:28 +00:00
Chris McCarthy
a141c8d212 #2266 - fixed typos from PR suggestions 2024-04-30 14:08:12 +01:00
Nick Todd
5b03013e3f Merge branch 'dev' into bugfix/2299-check_hash_function_corrupts_files_and_folders 2024-04-29 15:44:06 +01:00
Chris McCarthy
81d4006240 #2266 - Finalised the tests and fleshed out the documentation more. 2024-04-26 23:18:09 +01:00
Marek Wolan
394e76048f Merge remote-tracking branch 'origin/dev' into feature/2476-training-schedules-mockup 2024-04-26 16:23:41 +01:00
Marek Wolan
30cc04411d #2476 apply pr comments 2024-04-26 16:23:02 +01:00
Charlie Crane
5ee23dcb17 Merged PR 348: #2462 - Refactor of DatabaseClient and DatabaseServer
## Summary
Refactor of `DatabaseClient` and `DatabaseService` to update how connection IDs are generated. These are now provided by DatabaseService when establishing a connection.
Creation of `DatabaseClientConnection` class. This is used by `DatabaseClient` to hold a dictionary of active db connections.

## Test process
Tests have been updated to reflect the changes and all pass

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #2462
2024-04-26 14:52:21 +00:00