You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* remove `write-to` and `send-to` and rename `print` to `search` on alerts/security-data cmds
* remove unused loggers
* update tests
* fix case where exception is printed on KeyboardInterrupt and closed pipe.
* update readme and changelog
* add TCP examples
* remove tests for removed func
* remove tests for removed loggers
* fix bug from change in latest py42
* add note about external tools for more complex requirements
* updated docs
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,16 +13,23 @@ how a consumer would use the library (e.g. adding unit tests, updating documenta
13
13
### Changed
14
14
15
15
-`-i` (`--incremental`) has been removed, use `-c` (`--use-checkpoint`) with a string name for the checkpoint instead.
16
+
16
17
- The code42cli has been migrated to the [click](https://click.palletsprojects.com) framework. This brings:
17
-
- BREAKING CHANGE: Commands that accept multiple values for the same option now must have the option flag provided
18
-
before each value:
19
-
`--option value1 --option value2` instead of `--option value1 value2` (which was previously possible).
18
+
- BREAKING CHANGE: Commands that accept multiple values for the same option now must have the option flag provided before each value:
19
+
use `--option value1 --option value2` instead of `--option value1 value2` (which was previously possible).
20
20
- Cosmetic changes to error messages, progress bars, and help message formatting.
21
21
22
+
- The `print` command on the `security-data` and `alerts` command groups has been replaced with the `search` command.
23
+
This was a name change only, all other functionality remains the same.
24
+
22
25
### Added
23
26
24
27
- Profile can now save multiple alert and file event checkpoints. The name of the checkpoint to be used for a given query should be passed to `-c` (`--use-checkpoint`).
25
28
29
+
### Removed
30
+
31
+
- The `write-to` and `send-to` commands on `security-data` and `alerts` command groups.
Copy file name to clipboardExpand all lines: docs/commands/alerts.md
+4-37Lines changed: 4 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
# Alerts
2
2
3
-
## Shared arguments
3
+
## search
4
4
5
-
Search args are shared between `print`, `write-to`, and `send-to` commands.
5
+
Search for alerts and print them to stdout.
6
6
7
+
Arguments:
7
8
*`advanced-query`: A raw JSON alerts query. Useful for when the provided query parameters do not satisfy your
8
9
requirements. WARNING: Using advanced queries is incompatible with other query-building args.
9
10
*`-b`, `--begin`: The beginning of the date range in which to look for alerts, can be a date/time in yyyy-MM-dd (UTC)
@@ -32,43 +33,9 @@ Search args are shared between `print`, `write-to`, and `send-to` commands.
32
33
*`-f`, `--format` (optional): The format used for outputting file events. Available choices= [CEF,JSON,RAW-JSON].
33
34
*`-c`, `--use-checkpoint` (optional): Get only file events that were not previously retrieved by writing the timestamp of the last event retrieved to a named checkpoint.
34
35
35
-
## print
36
-
37
-
Print file events to stdout.
38
-
39
-
Arguments:
40
-
* search args (note that begin date is often required).
41
-
42
-
Usage:
43
-
```bash
44
-
code42 alerts print -b <begin-date><args>
45
-
```
46
-
47
-
## write-to
48
-
49
-
Write file events to the file with the given name.
50
-
51
-
Arguments:
52
-
*`output_file`: The name of the local file to send output to.
53
-
* search args (note that begin date is often required).
54
-
55
-
Usage:
56
-
```bash
57
-
code42 alerts write-to -b 2020-03-01 <rgs>
58
-
```
59
-
60
-
## send-to
61
-
62
-
Send file events to the given server address.
63
-
64
-
Arguments:
65
-
*`server`: The server address to send output to.
66
-
*`protocol` (optional): Protocol used to send logs to server. Available choices= [TCP, UDP].
67
-
* search args (note that begin date is often required).
Copy file name to clipboardExpand all lines: docs/commands/securitydata.md
+7-38Lines changed: 7 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,14 @@
1
1
# Security Data
2
2
3
-
## Shared arguments
4
3
5
-
Search args are shared between `print`, `write-to`, and `send-to` commands.
4
+
## search
6
5
7
-
*`--advanced-query` (optional): A raw JSON file events query. Useful for when the provided query parameters do not
6
+
Search for file events and print them to stdout.
7
+
8
+
Arguments:
9
+
*`--advanced-query` (optional | cannot be used with other query options): A raw JSON file events query. Useful for when the provided query parameters do not
8
10
satisfy your requirements. WARNING: Using advanced queries is incompatible with other query-building args.
11
+
*`--saved-search` (optional | cannot be used with other query options): Get events from a saved search filter (created in the Code42 admin console) with the given ID.
9
12
*`-b`, `--begin` (required except for non-first runs in checkpoint mode): The beginning of the date range in which to
10
13
look for file events, can be a date/time in yyyy-MM-dd (UTC) or yyyy-MM-dd HH:MM:SS (UTC+24-hr time) format where
11
14
the 'time' portion of the string can be partial (e.g. '2020-01-01 12' or '2020-01-01 01:15') or a short value
@@ -28,45 +31,11 @@ Search args are shared between `print`, `write-to`, and `send-to` commands.
28
31
*`-f`, `--format` (optional): The format used for outputting file events. Available choices= [CEF,JSON,RAW-JSON].
29
32
*`-c`, `--use-checkpoint` (optional): Get only file events that were not previously retrieved by writing the timestamp of the last event retrieved to a named checkpoint.
30
33
31
-
32
-
## print
33
-
34
-
Print file events to stdout.
35
-
36
-
Arguments:
37
-
* search args (note that begin date is often required).
38
-
39
-
Usage:
40
-
```bash
41
-
code42 security-data print -b <begin-date><args>
42
-
```
43
-
44
-
## write-to
45
-
46
-
Write file events to the file with the given name.
47
-
48
-
Arguments:
49
-
*`output_file`: The name of the local file to send output to.
50
-
* search args (note that begin date is often required).
0 commit comments