guardicore / guardicore/monkey

Security report runtime reports time elapsed from the first run since last reset

Open
#2,955 2 comments 0 reactions 0 assignees View on GitHub
Bug Complexity: Low Impact: Low
Dominant language
Python
Stars
7.1k
Forks
830
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug
The Security report will calculate the run time of the simulation as beginning the time the first run was started, to the time the last run was completed. This includes any breaks between the runs. The Island is likely using the timestamps of the first and last agent events received to calculate the runtime.

Example:
- I run a scenario that completes after **2** minutes.
- **10** minutes after it completes, I run a scenario that finishes in **3** minutes.
- The Security report will indicate that the runtime of the simulation was **15** minutes

**This may be a completely valid way to calculate the runtime**, considering manual agent runs. However, it might be nice to reset the data each time the **Run Monkey > From Island** button is pressed.

## To Reproduce
Steps to reproduce the behavior:
1. Run the monkey. Probably easiest to configure the monkey with no IPs to scan
2. Wait 5 minutes
3. Run the monkey again (do not reset data)
4. Look at the Security report, and observe that the time is over 5 minutes

## Expected behavior
The report shows only the time of the last run, instead of all the runs after the last time the data was reset.

## Screenshots
Here we see a long runtime reported:
> ![Screen Shot 2023-02-08 at 4 26 49 PM](https://user-images.githubusercontent.com/11077625/217654824-4083dc6a-4d1b-4e7c-8543-3fad808c3024.jpg)

However, we're also told that three agents were run, and when they were started:
> ![Screen Shot 2023-02-08 at 4 26 16 PM](https://user-images.githubusercontent.com/11077625/217654828-cb460607-8b7e-4495-ab77-7416a94b3a39.jpg)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.