Documentation
¶
Overview ¶
Package ghas implements the pkg/source plugin for GitHub Advanced Security code-scanning alerts (CodeQL first): it consumes code_scanning_alert webhook deliveries, fetches the full alert for rule help and location detail, and normalizes it into a source.Finding — extracting CWE identifiers from CodeQL rule tags as the advisory categorization.
Index ¶
Constants ¶
const ID = "ghas"
ID is the source identifier stamped into the security-source label.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertGetter ¶
type AlertGetter interface {
GetAlert(ctx context.Context, repo ghclient.Repo, number int) (*ghclient.Alert, error)
}
AlertGetter fetches the full code-scanning alert; the webhook payload carries a summary, but the rule help markdown only comes from the API.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the GHAS source plugin.
func New ¶
func New(alerts AlertGetter) *Handler
New builds the handler around an alert fetcher (typically an adapter that resolves the right installation client per repository).