Created
August 7, 2020 17:15
-
-
Save ievans/5a3b8c954f3dd83ddd6372c2f2b9d81b to your computer and use it in GitHub Desktop.
This file contains 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
# Prompt: Find all instances of boto3.client usage where someone has hardcoded the "aws_secret_access_key". | |
import boto3 as b3 | |
import os | |
# semgrep should fire here | |
client = b3.client( | |
's3', | |
aws_secret_access_key = "jWnyeKHgaSRZVd_THIS_IS_FAKE_EsvPLRKNZCYRXRL", | |
aws_access_key_id = "AKIAIOSFO_THIS_IS_FAKE_DNN7652GQNB") | |
# ok | |
client = b3.client( | |
's3', | |
aws_secret_access_key = os.environ['foo'], | |
aws_access_key_id = os.environ['bar']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment