feat(secretsmanager-batch-retrieve-secrets): enable negative filtering through environment variable #704
+48
−12
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.
What does this PR do?
This PR adds an optional mode to the
aws.credential-access.secretsmanager-batch-retrieve-secretsattack technique that allows retrieving all accessible secrets in a region (not just Stratus-created ones) using a negative filter.Changes:
STRATUS_BATCH_RETRIEVE_ALL_SECRETSto enable retrieving all secrets using a negative filter!tagKeyThatWillNeverExistStratusRedTeam)Motivation
I wanted to have both "attack modes" available at run time (specified secrets vs all secrets) without requiring code modifications. Previously, the negative filter version was commented out in the code, requiring manual modification and building.
Environment variables is already established pattern for runtime configuration (similar to
STRATUS_RED_TEAM_ATTACKER_EMAIL).The Detonation command for the alternate mode will be:
Checklist
N/A