mirror of
https://github.com/awslabs/iam-policy-autopilot.git
synced 2026-04-25 16:05:58 +03:00
[GH-ISSUE #111] Decrease false positive findings for waiter extraction in Go and Python #91
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/iam-policy-autopilot#91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mschlaipfer on GitHub (Jan 21, 2026).
Original GitHub issue: https://github.com/awslabs/iam-policy-autopilot/issues/111
Take for example the
dmswaiterEndpointDeleted:We currently generate false positives during the fallback waiter extraction using the waiter creation. We look up
EndpointDeletedincreate_synthetic_calls_internalin thewaiters_lookupgithub.com/awslabs/iam-policy-autopilot@63f953c124/iam-policy-autopilot-policy-generation/src/extraction/go/waiter_extractor.rs (L240)Both
dmsandsagemakerhave such a waiter.dms's operation isDescribeEndpoints,sagemaker's isDescribeEndpoint.DescribeEndpointfurthermore also exists in other services. We end up with twoSdkMethodCalls, where thesagemakerone has multiple possible services populated here:github.com/awslabs/iam-policy-autopilot@63f953c124/iam-policy-autopilot-policy-generation/src/extraction/go/disambiguation.rs (L59-L60)We might not be able to know which of the two findings based on the initial
EndpointDeletedlookup is correct, but we know that the only possible services can bedmsandsagemakerbecause of the particular waiter extraction logic that was applied which led to the operation being added. We must not populate thepossible_serviceswith any further services.Furthermore we have been conservative with import-based filtering, which leads to import-based filtering not applying:
github.com/awslabs/iam-policy-autopilot@63f953c124/iam-policy-autopilot-policy-generation/src/extraction/go/disambiguation.rs (L70-L74)Related issue: https://github.com/awslabs/iam-policy-autopilot/issues/110
We currently have to resolve the waiter to an operation during extraction, and run through the "regular" disambiguation pipeline linked to above. We might specialize this logic if we knew that we extracted a waiter.