Documentation ¶
Index ¶
- func SetHeaderInfo(headers *HeaderInfo, s1 *detectors.Result)
- func SetUserResponse(userResponse *UserRes, s1 *detectors.Result)
- type HeaderInfo
- type Scanner
- func (Scanner) DefaultEndpoint() string
- func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (results []detectors.Result, err error)
- func (s Scanner) Keywords() []string
- func (s Scanner) Type() detectorspb.DetectorType
- func (s Scanner) VerifyGithub(ctx context.Context, client *http.Client, token string) (bool, *UserRes, *HeaderInfo, error)
- func (Scanner) Version() int
- type UserRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetHeaderInfo ¶ added in v3.70.1
func SetHeaderInfo(headers *HeaderInfo, s1 *detectors.Result)
func SetUserResponse ¶ added in v3.70.1
Types ¶
type HeaderInfo ¶ added in v3.70.1
type Scanner ¶
type Scanner struct{ detectors.EndpointSetter }
func (Scanner) DefaultEndpoint ¶
func (Scanner) FromData ¶
func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (results []detectors.Result, err error)
FromData will find and optionally verify GitHub secrets in a given set of bytes.
func (Scanner) Keywords ¶
Keywords are used for efficiently pre-filtering chunks. Use identifiers in the secret preferably, or the provider name.
func (Scanner) Type ¶
func (s Scanner) Type() detectorspb.DetectorType
func (Scanner) VerifyGithub ¶ added in v3.70.1
type UserRes ¶ added in v3.70.1
type UserRes struct { Login string `json:"login"` Type string `json:"type"` SiteAdmin bool `json:"site_admin"` Name string `json:"name"` Company string `json:"company"` UserURL string `json:"html_url"` // Included in GitHub Enterprise Server. LdapDN string `json:"ldap_dn"` }
TODO: Add secret context?? Information about access, ownership etc
Click to show internal directories.
Click to hide internal directories.