Documentation
¶
Overview ¶
Package github implements the logic to detect Github tokens
Index ¶
- Constants
- func NewAppRefreshTokenDetector() veles.Detector
- func NewAppS2STokenDetector() veles.Detector
- func NewAppS2STokenValidator() *simplevalidate.Validator[AppServerToServerToken]
- func NewAppU2SDetector() veles.Detector
- func NewAppU2STokenValidator() *simplevalidate.Validator[AppUserToServerToken]
- func NewClassicPATDetector() veles.Detector
- func NewClassicPATValidator() *simplevalidate.Validator[ClassicPersonalAccessToken]
- func NewFineGrainedPATDetector() veles.Detector
- func NewFineGrainedPATValidator() *simplevalidate.Validator[FineGrainedPersonalAccessToken]
- func NewOAuthTokenDetector() veles.Detector
- func NewOAuthTokenValidator() *simplevalidate.Validator[OAuthToken]
- type AppRefreshToken
- type AppServerToServerToken
- type AppUserToServerToken
- type ClassicPersonalAccessToken
- type FineGrainedPersonalAccessToken
- type OAuthToken
Constants ¶
const ( // S2SValidationEndpoint is endpoint for app s2s token validation. S2SValidationEndpoint = "/installation/repositories" // UserValidationEndpoint is endpoint for user token validation. UserValidationEndpoint = "/user" )
Variables ¶
This section is empty.
Functions ¶
func NewAppRefreshTokenDetector ¶
NewAppRefreshTokenDetector returns a new Veles Detector that finds Github app refresh tokens
func NewAppS2STokenDetector ¶ added in v0.3.5
NewAppS2STokenDetector returns a new Veles Detector that finds Github app server to server tokens
func NewAppS2STokenValidator ¶ added in v0.3.5
func NewAppS2STokenValidator() *simplevalidate.Validator[AppServerToServerToken]
NewAppS2STokenValidator creates a new Validator that validates Github app Server to Server token via the Github API endpoint.
func NewAppU2SDetector ¶ added in v0.3.5
NewAppU2SDetector returns a new Veles Detector that finds Github app user to server tokens
func NewAppU2STokenValidator ¶ added in v0.3.5
func NewAppU2STokenValidator() *simplevalidate.Validator[AppUserToServerToken]
NewAppU2STokenValidator creates a new Validator that validates Github app User to Server token via the Github API endpoint.
func NewClassicPATDetector ¶ added in v0.3.5
NewClassicPATDetector returns a new Veles Detector that finds Github classic personal access tokens
func NewClassicPATValidator ¶ added in v0.3.5
func NewClassicPATValidator() *simplevalidate.Validator[ClassicPersonalAccessToken]
NewClassicPATValidator creates a new Validator that validates Github classic personal access token via the Github API endpoint.
func NewFineGrainedPATDetector ¶ added in v0.3.5
NewFineGrainedPATDetector returns a new Veles Detector that finds Github fine-grained personal access tokens
func NewFineGrainedPATValidator ¶ added in v0.3.5
func NewFineGrainedPATValidator() *simplevalidate.Validator[FineGrainedPersonalAccessToken]
NewFineGrainedPATValidator creates a new Validator that validates Github fine-grained personal access token via the Github API endpoint.
func NewOAuthTokenDetector ¶ added in v0.3.5
NewOAuthTokenDetector returns a new Veles Detector that finds Github oauth tokens.
func NewOAuthTokenValidator ¶ added in v0.3.5
func NewOAuthTokenValidator() *simplevalidate.Validator[OAuthToken]
NewOAuthTokenValidator creates a new Validator that validates Github OAuth token via the Github API endpoint.
Types ¶
type AppRefreshToken ¶
type AppRefreshToken struct {
Token string
}
AppRefreshToken contains a Github App refresh token
type AppServerToServerToken ¶ added in v0.3.5
type AppServerToServerToken struct {
Token string
}
AppServerToServerToken contains a Github App server to server token
type AppUserToServerToken ¶ added in v0.3.5
type AppUserToServerToken struct {
Token string
}
AppUserToServerToken contains a user to server token
A Github App User to Server token is a temporary, secure credential that allows a GitHub App to perform actions on the platform on behalf of a user
type ClassicPersonalAccessToken ¶ added in v0.3.5
type ClassicPersonalAccessToken struct {
Token string
}
ClassicPersonalAccessToken contains a Github classic personal access token
type FineGrainedPersonalAccessToken ¶ added in v0.3.5
type FineGrainedPersonalAccessToken struct {
Token string
}
FineGrainedPersonalAccessToken contains a Github fine-grained personal access token
type OAuthToken ¶ added in v0.3.5
type OAuthToken struct {
Token string
}
OAuthToken contains an oauth token
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package checksum contains the checksum validation logic for github tokens
|
Package checksum contains the checksum validation logic for github tokens |
|
Package mockgithub contains a mock implementation of the Github APIss
|
Package mockgithub contains a mock implementation of the Github APIss |
|
Package validate contains common logic to validate github tokens
|
Package validate contains common logic to validate github tokens |