Skip to content

TK-C010: the other common ways to switch off AWS detection wait for a person - #581

Closed
LoopGlitch26 wants to merge 3 commits into
mainfrom
agent/issue-539
Closed

LoopGlitch26 wants to merge 3 commits into
mainfrom
agent/issue-539

Conversation

@LoopGlitch26

Copy link
Copy Markdown
Member

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 main after 1.5.3.

TK-C010 now holds, in the shell and through call_aws:

  • guardduty update-detector --no-enable, and a feature's Status set to DISABLED, in shorthand or JSON (with or without spaces);
  • guardduty create-filter and update-filter with --action ARCHIVE or --action=ARCHIVE;
  • cloudtrail update-trail with --s3-bucket-name, --no-enable-log-file-validation, --no-include-global-service-events or --no-is-organization-trail;
  • configservice delete-delivery-channel, securityhub batch-disable-standards, organizations leave-organization;
  • route53resolver delete- and disassociate-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:

  • TK-C010's line in docs/policy-v2.md lists the new commands.
  • A limits row says in words what stays unheld: file:// or --cli-input-json input, --data-sources, create-ip-set, and an option past sixteen words.

Pack: server-cloud goes from -16 to -17; only this PR touches that pack.

Results:

  • E17: 794 of 794 held, 1 false alarm in 855.
  • E21: the held-out and blind pools are unchanged. Strict still holds 46 E17 benign calls (5.4%), and 466 commands and 2,237 rewrites are contained. The baseline is kept.

Tests: tests/test_signer_policy.py, test_policy2.py, test_eval_docs.py and test_e21_policy.py pass (317), and make lint is clean. Without the change, 88 test cases fail.

LoopGlitch26 and others added 3 commits November 4, 2026 02:37
… 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>
@LoopGlitch26

Copy link
Copy Markdown
Member Author

Landed in #543.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TK-C010: hold the other common ways to switch off AWS detection

1 participant