Documentation
¶
Overview ¶
Package sendgrid provides a verifier for SendGrid API keys. It uses the SendGrid API GET /v3/scopes endpoint to check key validity. That endpoint returns the scopes granted to the key itself and requires no particular permission, so every valid key can reach it regardless of how it is scoped. This avoids misclassifying a valid but narrowly scoped (restricted) key as invalid: a scoped endpoint such as /v3/user/profile returns 403 for a live key lacking that specific scope, which must not read as revoked.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier checks whether a SendGrid API key is active by calling the SendGrid API. It NEVER logs or persists raw key values.
func (*Verifier) Verify ¶
func (v *Verifier) Verify(ctx context.Context, raw detector.RawFinding) finding.VerificationResult
Verify checks if the detected SendGrid API key is valid/active. Raw contains the key value.