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

GitHub secret scanning integration #1019

Open
wojtekmach opened this issue Mar 31, 2021 · 3 comments
Open

GitHub secret scanning integration #1019

wojtekmach opened this issue Mar 31, 2021 · 3 comments

Comments

@wojtekmach
Copy link
Member

GitHub has a secret scanning feature that can alert users when they accidentally commit secrets like API tokens.

GitHub partners with service providers (which maintain these API tokens) to detect leaked secrets:

Joining the secret scanning program on GitHub

  • Contact GitHub to get the process started.
  • Identify the relevant secrets you want to scan for and create regular expressions to capture them.
  • For secret matches found in public repositories, create a secret alert service which accepts webhooks from GitHub that contain the secret scanning message payload.
  • Implement signature verification in your secret alert service.
  • Implement secret revocation and user notification in your secret alert service.
  • Provide feedback for false positives (optional).

(https://docs.github.com/en/developers/overview/secret-scanning)

I think it would be beneficial for the community if Hex joins this program.

GitHub recently changed the format of the tokens they maintain so if we were to participate, it'd probably make sense to first consider if we should change the format of our tokens too so they could be more easily detected. For example, instead of the token format being ~r/^[a-z0-9]{32}$/, we prefix it with hex_: ~r/^hex_[a-z0-9]{32}$/.

Thoughts?

@Ch4s3
Copy link
Contributor

Ch4s3 commented Jul 2, 2022

This seems like a nice feature. Are there downsides to changing the token format?

@yordis
Copy link
Contributor

yordis commented Jul 17, 2022

@Ch4s3 it depends if they will invalidate all the previous tokens or support both formats. It will require all the tokens to be invalid so we must update them.

GitHub at some point showed (or still do), so warning when detecting old token formats.

@ericmj
Copy link
Member

ericmj commented Aug 19, 2022

We will not invalidate existing tokens as it would be too disruptive to users so when adding the new token format we will also be supporting the old one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants