Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a new `event` command with one sub-commands called `list` exposed to the end-user. This new command will list all events from a date range, by default last 7 days unless the user provides a different range. Example: Human readable output ``` $ lacework event list EVENT ID | TYPE | SEVERITY | START TIME | END TIME -----------+------------------------------------+----------+----------------------+----------------------- 10 | NewViolations | High | 2020-04-20T13:00:00Z | 2020-04-20T14:00:00Z 4 | VPCNetworkFirewallRuleChanged | Medium | 2020-04-16T20:00:00Z | 2020-04-16T21:00:00Z 8 | VPCNetworkRouteChanged | Medium | 2020-04-19T23:00:00Z | 2020-04-20T00:00:00Z 1 | ProjectOwnershipAssignmentsChanged | Medium | 2020-04-16T17:00:00Z | 2020-04-16T18:00:00Z 6 | NewViolations | Medium | 2020-04-18T13:00:00Z | 2020-04-18T14:00:00Z 3 | VPCNetworkChanged | Medium | 2020-04-16T20:00:00Z | 2020-04-16T21:00:00Z 2 | CloudStorageIAMPermissionChanged | Medium | 2020-04-16T18:00:00Z | 2020-04-16T19:00:00Z 5 | CloudStorageIAMPermissionChanged | Low | 2020-04-17T19:00:00Z | 2020-04-17T20:00:00Z 9 | VPCNetworkRouteChanged | Low | 2020-04-20T04:00:00Z | 2020-04-20T05:00:00Z 7 | VPCNetworkFirewallRuleChanged | Low | 2020-04-19T23:00:00Z | 2020-04-20T00:00:00Z ``` Example: Machine/JSON format ``` $ lacework event list --json [ { "end_time": "2020-04-20T14:00:00Z", "event_id": "10", "event_type": "NewViolations", "severity": "2", "start_time": "2020-04-20T13:00:00Z" }, { "end_time": "2020-04-16T21:00:00Z", "event_id": "4", "event_type": "VPCNetworkFirewallRuleChanged", "severity": "3", "start_time": "2020-04-16T20:00:00Z" }, { "end_time": "2020-04-20T00:00:00Z", "event_id": "8", "event_type": "VPCNetworkRouteChanged", "severity": "3", "start_time": "2020-04-19T23:00:00Z" }, { "end_time": "2020-04-16T18:00:00Z", "event_id": "1", "event_type": "ProjectOwnershipAssignmentsChanged", "severity": "3", "start_time": "2020-04-16T17:00:00Z" }, { "end_time": "2020-04-18T14:00:00Z", "event_id": "6", "event_type": "NewViolations", "severity": "3", "start_time": "2020-04-18T13:00:00Z" }, { "end_time": "2020-04-16T21:00:00Z", "event_id": "3", "event_type": "VPCNetworkChanged", "severity": "3", "start_time": "2020-04-16T20:00:00Z" }, { "end_time": "2020-04-16T19:00:00Z", "event_id": "2", "event_type": "CloudStorageIAMPermissionChanged", "severity": "3", "start_time": "2020-04-16T18:00:00Z" }, { "end_time": "2020-04-17T20:00:00Z", "event_id": "5", "event_type": "CloudStorageIAMPermissionChanged", "severity": "4", "start_time": "2020-04-17T19:00:00Z" }, { "end_time": "2020-04-20T05:00:00Z", "event_id": "9", "event_type": "VPCNetworkRouteChanged", "severity": "4", "start_time": "2020-04-20T04:00:00Z" }, { "end_time": "2020-04-20T00:00:00Z", "event_id": "7", "event_type": "VPCNetworkFirewallRuleChanged", "severity": "4", "start_time": "2020-04-19T23:00:00Z" } ] ``` Issue #68 Signed-off-by: Salim Afiune Maya <[email protected]>
- Loading branch information