Commit 292a307
authored
Refactor/click (#107)
* refactor profile
* fix show
* use profile_name_arg on all funcs that take one
* fix profile_name args in functions
* legal hold initial move to click
* progress
* more progress
* functioning security-data
* add clear-checkpoint
* completed security-data and some misc refactoring
* make incremental incompatible
* refactor alerts
* clean up --begin option validation
* fix legalhold state/sdk args and delete a bunch of stuff
* start on alert-rules
* changes
* some help strings and refactor bulk options
* remove compat since py2 is no longer supported
* start refactoring detectionlists
* more refactoring detectionlists
* changes
* working refactor of departing-employee
* HRE refactor plus etc.
* fix handle_parse_result funcs to prevent errors on autocomplete
* refactor generate_template to shared function
* templates and help strings
* legal hold help texts
* main banner and more help texts
* fix reset_pw, some work on refactoring logging exceptions
* progress
* more logging refactors
* done refactoring logger/exceptions/printing
* remove uneeded loggers, use echo instead of print in utils
* bring in worker fix
* refactor progress bar, remove all u-prefixes
* progress bar labels and improved help texts
* fix bad alerts strings from a pycharm refactor, and a better fix for logging exception handling when BrokenPipe encountered
* clean up main
* use echo for printing lh policy
* correct create profile help
* remove util.open_file and usage
* encoding
* change log_error
* remove underscores from packages
* line length
* bring in saved search work
* specify click and colorama min versions
* pull in new cursor store changes
* add cmd names in bulk helps
* remove hyphens and change commands to actions in bulk helps
* fix util tests
* fix sdk, profile, and logger tests
* fix config tests
* remove unused imports
* fix a bug in profile loading
* improve read_flat_file
* update generate_template_cmd_factory to allow for flat file templates
* correct "remove" templates for DE and HRE to be flat files
* fix bulk tests
* optimize imports everywhere
* fix profile cmd tests
* add message to delete-all
* fix deprecated callback arg usage
* fix alert tests
* add check for valid json in --advanced-query arg
* fix advanced-query callback to handle None
* narrow the exception catching
* actually return the arg in the callback
* format option correctly in advanced-query error
* raise ClickException since it's just an input validation error
* fix alerts tests
* fix the rest of alert tests
* alert-rules tests
* make saved-search incompatible with advanced-query
* oops, forgot to implement saved-search extraction
* fix cursor_store tests
* fix file reader callbacks
* u prefixes
* add bulk alert-rules tests
* refactor some fixtures, add some tests, make sure cli_state obj is in all runs
* refactor fixtures
* move cursor_store and logger_factory tests and a few tweaks elsewhere
* securitydata tests
* legalhold tests
* make runner a fixture, fix departing-employee tests
* prevent opening of checkpoint file if --use-checkpoint not actually passed in
* fix bug in adding risk tags
* rest of fix for risk tags
* remove future import
* update `generate_template_cmd_factory` to take an arbitrary amount of commands, add `add-risk-tags`/`remove-risk-tags` templates to HRE bulk cmds
* better bulk csv testing
* fixed HRE tests
* fix risk_tag splitting from csv input
* add missing @global_options on HRE bulk commands, remove unused RiskTagError
* fix test_bulk
* fix sdk_client tests
* fix py3.5 timezone error
* account for potential race in bulk test call arg order
* check correct method call
* see if sleep fixes intermittent bulk test failure
* another check to fix test?
* see if side effect helps test
* use len(call_args_list) instead of call_count for atomicity due to threads
* bulk threading fix for departing employee
* fix bug when no profiles exist
* optimize imports
* attempt thread-safe side effects
* complete thread-safe side effects
* rename @global_options to @sdk_options
* refactor matter member printing
* remove unused _current_row attr from BulkProcessor
* rename private click command funcs, rework alert-rules `show` logic into _get_rule_type_func
* only print inactive when option is passed
* update changelog and readme1 parent ba832b3 commit 292a307
File tree
119 files changed
+4984
-7854
lines changed- docs
- integration
- src/code42cli
- cmds
- alerts
- rules
- detectionlists
- legal_hold
- search
- securitydata
- savedsearch
- tests
- cmds
- alerts
- rules
- detectionlists
- legal_hold
- securitydata
- savedsearch
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
119 files changed
+4984
-7854
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
215 | | - | |
| 217 | + | |
216 | 218 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 219 | + | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 223 | + | |
| 224 | + | |
227 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
| |||
45 | 55 | | |
46 | 56 | | |
47 | 57 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
64 | | - | |
65 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
66 | 76 | | |
67 | 77 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
| 31 | + | |
29 | 32 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | | - | |
| 60 | + | |
58 | 61 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
This file was deleted.
0 commit comments