Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move aws detector back to ID checking against secrets, make ID the redacted secret #617

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

trufflesteeeve
Copy link
Collaborator

This fixes the git engine test errors we've been seeing. However, it also resets some aspects of the AWS detector that were changed. Specifically:

  • AWS now tries all matched secrets against all IDs, rather than trying IDs against secrets (essentially the outer loop has been switched back)
  • The Redacted secret is now back to being the match ID, instead of no longer existing.

It also makes a couple of slight adjustments:

  • The AWS response body is immediately closed instead of deferred, as it is never used.
  • Anytime a verified secret is found, we skip all remaining secret matches and move on to the next ID. I'm not actually 100% sure that there are no duplicate key IDs, but that's my assumption in making this change.
  • Some variables are renamed to make it clear which of them is the ID and which of them is the secret.

Copy link
Contributor

@dustin-decker dustin-decker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Steve

@dustin-decker dustin-decker merged commit 26bf166 into main Jun 9, 2022
@dustin-decker dustin-decker deleted the adjust-aws-detector branch June 9, 2022 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants