Repository navigation
TK-C010: the other common ways to switch off AWS detection wait for a person - #581
Closed
LoopGlitch26 wants to merge 3 commits into
Closed
LoopGlitch26 wants to merge 3 commits into
LoopGlitch26 wants to merge 3 commits into
Conversation
… person TK-C010 held stopping or deleting a trail, a GuardDuty detector or a Config recorder, but not switching them off by an option. It now also holds, in a shell and through call_aws: - guardduty update-detector with --no-enable, or a feature's Status DISABLED in shorthand or JSON; - guardduty create-filter or update-filter with --action ARCHIVE (or --action=ARCHIVE), which archives matching findings as they arrive; - cloudtrail update-trail with --s3-bucket-name, --no-enable-log-file-validation, --no-include-global-service-events, --no-is-multi-region-trail or --no-is-organization-trail; - configservice delete-delivery-channel, securityhub batch-disable-standards, route53resolver delete- and disassociate-resolver-query-log-config, and organizations leave-organization. Each option is read within sixteen words of its command, as any unique prefix (aws reads one), so the fallback engine stays linear (58 ms at worst on 64 KiB built to rescan). Turning them on, a filter that only notes findings, and a new key prefix stay allowed. A limits row names what stays unheld: features or settings read from a file or --cli-input-json, GuardDuty's older --data-sources option and create-ip-set. E17 gains 16 harmful and 12 benign cases (794 of 794 held, 1 false alarm in 855). E21: the held-out and blind pools are unchanged; E17's benign calls on strict stay at 46 held (5.4% of 855); the shell rewrites cover 466 commands, all contained. E21's committed machine and latency are kept. Finishes #543 by shrinivas-sn: their cases and look-alikes, with the review's other spellings, docs and evals. Fixes #539 Co-authored-by: shrinivas-sn <shrinusn2001@gmail.com> Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
… own spacing The three new call_aws branches (update-trail, update-detector, a filter's --action) read the words after the command as a separator, then a word. In a JSON value a backslash can start either, so 64 KiB of backslashes after one of those commands took about 400 ms a decision on the fallback engine, four times as long each time the input doubled. They now read a word, then its separator, as TK-C001 does: at most 26 ms there (main: 17), 7.5 ms on RE2. TK-C010 is in Speed.RESCAN and gets only the generic fillers, so a Speed test now decides that input after each command on both engines. The shell branches read runs of spaces between words, so a feature's Status in JSON with two spaces between members or pretty-printed over lines is held (TK-C010's pattern alone: at most 19 ms on 64 KiB, main 15). The limits row names a Status further than sixteen words after the command. E17 and E21 move only their policy hashes; E21's committed machine and latency are kept. Co-authored-by: shrinivas-sn <shrinusn2001@gmail.com> Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
…the merged packs Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
10 tasks done
Member
Author
|
Landed in #543. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #539. Supersedes #543 by @shrinivas-sn, who wrote the first version and the look-alike cases (credited as co-author). It carries the review's changes, built from
mainafter 1.5.3.TK-C010 now holds, in the shell and through
call_aws:guardduty update-detector --no-enable, and a feature'sStatusset toDISABLED, in shorthand or JSON (with or without spaces);guardduty create-filterandupdate-filterwith--action ARCHIVEor--action=ARCHIVE;cloudtrail update-trailwith--s3-bucket-name,--no-enable-log-file-validation,--no-include-global-service-eventsor--no-is-organization-trail;configservice delete-delivery-channel,securityhub batch-disable-standards,organizations leave-organization;route53resolver delete-anddisassociate-resolver-query-log-config.Options are read as any unique prefix, within sixteen words of the command. The old
(.*? )?and(\S* )?scans are gone, and the pattern stays linear: the worst 64 KiB case takes 58 ms (main: 11 ms).Docs:
docs/policy-v2.mdlists the new commands.file://or--cli-input-jsoninput,--data-sources,create-ip-set, and an option past sixteen words.Pack:
server-cloudgoes from-16to-17; only this PR touches that pack.Results:
Tests:
tests/test_signer_policy.py,test_policy2.py,test_eval_docs.pyandtest_e21_policy.pypass (317), andmake lintis clean. Without the change, 88 test cases fail.