fix: scope dependent actions to matching resource types instead of wildcard#588
Merged
kmcquade merged 3 commits intosalesforce:masterfrom Apr 13, 2026
Conversation
|
Thanks for the contribution! Before we can merge this, we need @raajheshkannaa to sign the Salesforce Inc. Contributor License Agreement. |
Contributor
Author
|
I have signed the CLA. Please re-check. |
…e resource type When generating policies, dependent actions like kms:PutKeyPolicy were always added with Resource: '*' even when they support the same ARN type as the primary action. This grants broader permissions than necessary. Now, before defaulting a dependent action to wildcard, we check if it supports the same resource type as the primary action. If it does, the action is added to the same SID with the specific ARN constraint. Actions that are wildcard-only or from a different service still get Resource: '*'. Fixes salesforce#382
8f989be to
356ef07
Compare
Collaborator
|
@gruebel I'm good with this, how about you? |
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 #382
*as the resource ARN