codeql

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package codeql provides a source for fetching code scanning alerts from GitHub CodeQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Number             int      `json:"number"`
	State              string   `json:"state"` // "open", "dismissed", "fixed"
	Rule               Rule     `json:"rule"`
	Tool               Tool     `json:"tool"`
	MostRecentInstance Instance `json:"most_recent_instance"`
	HTMLURL            string   `json:"html_url"`
}

Alert represents a single code scanning alert.

type AlertCounts

type AlertCounts struct {
	Critical int
	High     int
	Medium   int
	Low      int
}

AlertCounts holds alert counts by severity.

type AlertsResponse

type AlertsResponse []Alert

AlertsResponse represents the response from /repos/{owner}/{repo}/code-scanning/alerts. Note: GitHub returns an array of alerts, not a wrapper object.

type Instance

type Instance struct {
	Ref      string   `json:"ref"`
	State    string   `json:"state"`
	Location Location `json:"location"`
}

Instance represents a specific occurrence of the alert.

type Location

type Location struct {
	Path        string `json:"path"`
	StartLine   int    `json:"start_line"`
	EndLine     int    `json:"end_line"`
	StartColumn int    `json:"start_column"`
	EndColumn   int    `json:"end_column"`
}

Location identifies where the alert was found.

type Rule

type Rule struct {
	ID                    string   `json:"id"`
	Name                  string   `json:"name"`
	Severity              string   `json:"severity"`                // "none", "note", "warning", "error"
	SecuritySeverityLevel string   `json:"security_severity_level"` // "low", "medium", "high", "critical"
	Description           string   `json:"description"`
	Tags                  []string `json:"tags"`
}

Rule contains information about the rule that triggered the alert.

type Tool

type Tool struct {
	Name    string  `json:"name"`
	Version *string `json:"version"`
}

Tool identifies the code scanning tool that produced the alert.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL