Commit Graph

1058 Commits

Author SHA1 Message Date
Nick Todd
0cfd525ab8 2041: change comparison operator in test 2023-12-15 10:14:35 +00:00
Nick Todd
fab39b1506 Merge branch 'dev' into feature/2041_2042-Add-NTP-Services 2023-12-15 09:50:19 +00:00
Czar Echavez
0aeaeaa60f Merged PR 234: #2059: Denial of Service Bot
## Summary
- Moved DataManipulationBot into red applications - these are applications, not services
- moved the connection handling from Service base class to the IOSoftware base class
  - Applications and Services can track the connections they make
  - increased default max sessions to 100
  - made sure the services/applications that are dependent on connections use the IOSoftware connections
- DoSBot follows some sort of kill chain, although at the moment it just:
  - runs a port scan with a 10% success chance (by default)
  - runs a DoS attack that fills a service's max sessions

## Test process
unit test in https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/234?path=/tests/unit_tests/_primaite/_simulator/_system/_applications/_red_applications/test_dos_bot.py&_a=files

integration test in https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/234?path=/tests/integration_tests/system/red_applications/test_dos_bot_and_server.py&_a=files

## 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: #2059
2023-12-14 10:16:34 +00:00
Czar Echavez
592e1a3610 #2059: apply suggestions from PR + adding another test that checks for dos affecting green agent 2023-12-13 11:56:25 +00:00
Nick Todd
f7b5c8ae2f 2041: Remove NTPRequest class (review comment) 2023-12-13 10:34:52 +00:00
Czar Echavez
f0be77c79b #2059: configure missing configurable items 2023-12-12 17:20:31 +00:00
Nick Todd
e620771c8d 2041: Remove IP address from NTP client (review comment) 2023-12-12 17:08:11 +00:00
Czar Echavez
4f79d2ad36 #2059: moved connection handling from Service to IOSoftware + changes that now utilise connections from IOSoftware + dos bot attacking now works + tests 2023-12-12 17:01:03 +00:00
Czar Echavez
1b124035a1 Merge remote-tracking branch 'origin/dev' into feature/2059-denial-of-service-bot-post-beta-2 2023-12-11 08:57:59 +00:00
Czar Echavez
cd5ed48b00 #2059: implementing the service connections limit 2023-12-08 17:07:57 +00:00
Czar Echavez
094e89fff1 #2059: Renamed Red service to red application and moved the datamanipulation bot to the red application folder 2023-12-08 14:54:29 +00:00
Nick Todd
c3015b7f0e Merge branch 'dev' into feature/2041_2042-Add-NTP-Services 2023-12-07 14:55:01 +00:00
Nick Todd
44ada941e6 2041: Reinstate test for ntp_server failure 2023-12-07 14:22:27 +00:00
Marek Wolan
e93fb85672 Merged PR 232: Allow cancelling jobs
## Summary
Fix the azure build pipeline job conditions to correctly stop the job if we cancel the build.

Related work items: #2103
2023-12-07 13:49:08 +00:00
Marek Wolan
385a4997ce New parameter for publishing code coverage 2023-12-07 10:35:50 +00:00
Nick Todd
50a6e17fab 2041: Make NTP work with TCP transport layer 2023-12-06 16:42:28 +00:00
Nick Todd
12ede2329b 2041: Add network config and pytest fixture 2023-12-06 16:41:10 +00:00
Marek Wolan
30b0f12a8d Allow cancelling jobs 2023-12-04 11:34:17 +00:00
Nick Todd
39694fcec2 Merge branch 'dev' into feature/2041_2042-Add-NTP-Services 2023-12-04 11:23:35 +00:00
Christopher McCarthy
4cc2674745 Merged PR 229: Step metadata json output
## Summary
- Added step metadata json file dumps to the environments. Fixed serialization issues in the Switch and ACLRule classes.

## Test process
Nothing outside of a manual inspection for now.

## 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: #2085
2023-12-04 10:47:09 +00:00
Marek Wolan
01b9e661ce Clean up print statements. 2023-12-04 10:45:33 +00:00
Marek Wolan
a5c4f7797d Make saving step metadata optional 2023-12-04 10:42:20 +00:00
Marek Wolan
8ea9db2d34 Merge remote-tracking branch 'origin/dev' into feature/2085-dump_describe_state 2023-12-04 10:38:41 +00:00
Marek Wolan
2203877302 Merged PR 231: Add docpage for config
## Summary
*Replace this text with an explanation of what the changes are and how you implemented them. Can this impact any other parts of the codebase that we should keep in mind?*

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

## 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

Add docpage for config

Related work items: #2088
2023-12-04 10:17:56 +00:00
Marek Wolan
9fa6f0b7ab Formatting improvements in cfg doc page 2023-12-04 10:16:29 +00:00
Marek Wolan
ec8e6b5ff7 Merged PR 228: Fix annoying Ray issues
## Summary
Fix ray episode issues. Allow ray to manage its environment fully - this fixes the perma-zero reward.

## Test process
Running notebooks and primaite sessions.

## 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: #2095
2023-12-04 10:10:10 +00:00
Czar Echavez
6ca28f5d17 Merged PR 230: #2084: add coverage fail condition
## Summary
Added a fail condition for coverage

## Test process
n/a

## 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

#2084: add coverage fail condition

Related work items: #2084
2023-12-04 10:02:24 +00:00
Marek Wolan
ba3d37316b Apply suggestions from review 2023-12-04 09:21:47 +00:00
Marek Wolan
de5fead9a4 Add docpage for config 2023-12-04 09:14:20 +00:00
Czar Echavez
8f063aa339 #2084: apply previous PR suggestions 2023-12-04 09:07:42 +00:00
Czar Echavez
534d4f96f3 #2084: add coverage fail condition 2023-12-04 08:58:03 +00:00
Czar Echavez
f55e18c4c8 Merged PR 225: #2084: Adding more tests
## Summary
Added tests and integrating code coverage checks - current target set to 80% of code to be covered by tests

## Test process
The pull request is literally to add more tests (lol)

## 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

#2084: beginning the introduction of code coverage + adding tests to try to meet the 80% code coverage target

Related work items: #2084
2023-12-03 14:55:20 +00:00
Marek Wolan
105763971d Merge 'origin/dev' into bugfix/episode-length-and-rewards 2023-12-03 14:49:34 +00:00
Czar Echavez
1d5337153b #2084: fix pr autocancel 2023-12-02 19:46:04 +00:00
Czar Echavez
1cc0020381 #2084: only upload copy of html report once 2023-12-02 19:38:45 +00:00
Czar Echavez
53f43dde0d #2084: cleaning up 2023-12-02 19:07:10 +00:00
Czar Echavez
060a46e251 #2084: more debugging 2023-12-02 18:44:27 +00:00
Czar Echavez
7b21f390c0 #2084: more debugging 2023-12-02 15:31:36 +00:00
Czar Echavez
e48f0a6d68 #2084: more debugging 2023-12-02 14:41:45 +00:00
Czar Echavez
2123fbb8f4 #2084: more debugging 2023-12-02 14:17:34 +00:00
Czar Echavez
47287ad1eb #2084: fixing 0% coverage 2023-12-02 13:44:39 +00:00
Czar Echavez
6ecb47f5ae #2084: debug coverage file 2023-12-02 01:19:38 +00:00
Czar Echavez
31c4287f46 #2084: applying github example fix to pipeline 2023-12-02 01:05:13 +00:00
Chris McCarthy
cc04efb31d #2085 - Added step metadata json file dumps to the environments. Fixed serialization issues in the Switch and ACLRule classes. 2023-12-01 16:37:58 +00:00
Czar Echavez
af8401440d #2084: using v2 publish codecov 2023-12-01 16:29:05 +00:00
Czar Echavez
88f74d9eec #2084: remove debugs and comment out the uploading of report 2023-12-01 16:08:02 +00:00
Czar Echavez
8a4978cf96 #2084: remove 80% requirement - causes tests to fail 2023-12-01 15:59:34 +00:00
Chris McCarthy
32c13e06f6 Merge remote-tracking branch 'devops/bugfix/episode-length-and-rewards' into feature/2085-dump_describe_state 2023-12-01 15:58:32 +00:00
Chris McCarthy
008efa1e9d Merge remote-tracking branch 'devops/bugfix/episode-length-and-rewards' into feature/2085-dump_describe_state 2023-12-01 15:55:22 +00:00
Czar Echavez
9a8350fd8f #2084: artifact the report 2023-12-01 15:49:20 +00:00