-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add Tailscale detector #1719
Add Tailscale detector #1719
Conversation
@marwan-at-work Thanks for submitting this PR! I love Tailscale :) One of the engineers will review this PR. In the meantime, would you mind resolving the merge conflicts? |
client = common.SaneHttpClient() | ||
|
||
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives. | ||
keyPat = regexp.MustCompile(`^tskey-(api|oauth)-[0-9A-Za-z_]+-[0-9A-Za-z_]+$`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably don't want to just limit to these prefixes. There are quite a few: https://tailscale.com/kb/1277/key-prefixes/. But we also may add more later, so maybe just a regex for the key type as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh! I guess these are the only two that will work with the oauth/verify endpoint. In that case, we may actually want to rethink how we implement the key checking endpoint on the Tailscale side 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We ended up with a new endpoint that should verify everything? Updated the regex to reflect it
@zricethezav thanks for the kind words. Resolved the conflicts and the PR is ready for review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @marwan-at-work, I know you spent a decent amount of time getting this ironed out and we really appreciate the contribution. Similar to Zach, I am also a huge Tailscale fan!
Hi @marwan-at-work, Just wanted to double-check about the It would be better to have a more general endpoint that could be utilized to verify the validity of the token. |
@bugbaba this is going to be a general endpoint for all secret scanning products that don't require a specific implementation besides validating a token (as opposed to GitHub for example, which requires specific public key verification, request/response body shapes, etc). A more generic endpoint that I saw in other implementations is to hit a As for documentation, this endpoint is end customers would care about, but it's something we'll discuss for sure. Thanks |
Description:
This PR adds a new Tailscale detector for API and Oauth tokens
Fixes #1712
Checklist:
make test-community
)?make lint
this requires golangci-lint)?