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

Setting up secret scanning GitHub Action #3

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

mliao95
Copy link
Contributor

@mliao95 mliao95 commented Apr 8, 2024

Description of changes:

This PR adds a new GitHub Action for scanning each PR for strings that match AWS related secret regexes. We can expand this to include other regex patterns further down the line. Here are the blocked secret regexes that come with git-secrets --register-aws

secrets.patterns (A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}
secrets.patterns ("|')?(AWS|aws|Aws)?_?(SECRET|secret|Secret)?_?(ACCESS|access|Access)?_?(KEY|key|Key)("|')?\s*(:|=>|=)\s*("|')?[A-Za-z0-9/\+=]{40}("|')?
secrets.patterns ("|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?("|')?\s*(:|=>|=)\s*("|')?[0-9]{4}\-?[0-9]{4}\-?[0-9]{4}("|')?

See example of this action blocking a PR here: #2

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mliao95 mliao95 marked this pull request as ready for review April 8, 2024 18:33
@mrajatttt mrajatttt self-requested a review April 8, 2024 18:52
@mliao95 mliao95 merged commit 611c62d into main Apr 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants