 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Copyright (C) 2025 timbastin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- Constants
- func AddSlashCommandsToDependencyVuln(str *strings.Builder) *strings.Builder
- func AddSlashCommandsToDependencyVulnADF(adf *jira.ADF)
- func AddSlashCommandsToFirstPartyVuln(str *strings.Builder) *strings.Builder
- func AddSlashCommandsToToFirstPartyVulnADF(adf *jira.ADF)
- func WrapHTTPClient(client *http.Client, ...)
- type Affected
- type ArtifactLocation
- type BatchModelWriter
- type CacheTransport
- type ContentTreeElement
- type DependencyVulnHints
- type Driver
- type Fingerprints
- type GitlabIntegrationDTO
- type JiraIntegrationDTO
- type Location
- type ModelReader
- type ModelWriter
- type OSV
- type OpenSourceInsightsProjectResponse
- type OpenSourceInsightsVersionResponse
- type PartialFingerprints
- type PhysicalLocation
- type Pkg
- type Properties
- type Region
- type Repository
- type Result
- type RiskCalculationReport
- type RiskMetrics
- type Rng
- type Rule
- type Run
- type SarifResult
- type Scorecard
- type SemverEvent
- type Tabler
- type Text
- type Tool
- type Transactioner
- type WebhookIntegrationDTO
Constants ¶
const CannotCalculateRisk float64 = 0
    Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArtifactLocation ¶
type BatchModelWriter ¶
type CacheTransport ¶
type CacheTransport struct {
	// contains filtered or unexported fields
}
    func NewCacheTransport ¶
func NewCacheTransport(cacheSize int, expiration time.Duration) *CacheTransport
func (*CacheTransport) Handler ¶
func (c *CacheTransport) Handler() func(req *http.Request, next http.RoundTripper) (*http.Response, error)
type ContentTreeElement ¶
type DependencyVulnHints ¶
type DependencyVulnHints struct {
	AmountOpen              int `json:"amountOpen"`
	AmountFixed             int `json:"amountFixed"`
	AmountAccepted          int `json:"amountAccepted"`
	AmountFalsePositive     int `json:"amountFalsePositive"`
	AmountMarkedForTransfer int `json:"amountMarkedForTransfer"`
}
    used to return information about other instances of a dependency vuln in other parts of an organization
type Fingerprints ¶
type GitlabIntegrationDTO ¶
type JiraIntegrationDTO ¶
type Location ¶
type Location struct {
	PhysicalLocation PhysicalLocation `json:"physicalLocation"`
}
    type ModelReader ¶
type ModelWriter ¶
type OSV ¶
type OSV struct {
	ID            string     `json:"id"`
	Summary       string     `json:"summary"`
	Modified      time.Time  `json:"modified"`
	Published     time.Time  `json:"published"`
	Related       []string   `json:"related"`
	Aliases       []string   `json:"aliases"`
	Affected      []Affected `json:"affected"`
	SchemaVersion string     `json:"schema_version"`
}
    type OpenSourceInsightsProjectResponse ¶
type OpenSourceInsightsProjectResponse struct {
	ProjectKey struct {
		ID string `json:"id"`
	} `json:"projectKey"`
	OpenIssuesCount int        `json:"openIssuesCount"`
	StarsCount      int        `json:"starsCount"`
	ForksCount      int        `json:"forksCount"`
	License         string     `json:"license"`
	Description     string     `json:"description"`
	Homepage        string     `json:"homepage"`
	Scorecard       *Scorecard `json:"scorecard"`
}
    type OpenSourceInsightsVersionResponse ¶
type OpenSourceInsightsVersionResponse struct {
	VersionKey struct {
		System  string `json:"system"`
		Name    string `json:"name"`
		Version string `json:"version"`
	} `json:"versionKey"`
	PublishedAt  time.Time `json:"publishedAt"`
	IsDefault    bool      `json:"isDefault"`
	Licenses     []string  `json:"licenses"`
	AdvisoryKeys []any     `json:"advisoryKeys"`
	Links        []struct {
		Label string `json:"label"`
		URL   string `json:"url"`
	} `json:"links"`
	SlsaProvenances []any    `json:"slsaProvenances"`
	Attestations    []any    `json:"attestations"`
	Registries      []string `json:"registries"`
	RelatedProjects []struct {
		ProjectKey struct {
			ID string `json:"id"`
		} `json:"projectKey"`
		RelationProvenance string `json:"relationProvenance"`
		RelationType       string `json:"relationType"`
	} `json:"relatedProjects"`
}
    type PartialFingerprints ¶
type PhysicalLocation ¶
type PhysicalLocation struct {
	ArtifactLocation ArtifactLocation `json:"artifactLocation"`
	Region           Region           `json:"region"`
}
    type Properties ¶
type Repository ¶
type Repository[ID any, T Tabler, Tx any] interface { ModelWriter[ID, T, Tx] ModelReader[ID, T] BatchModelWriter[T, Tx] Transactioner[Tx] }
type Result ¶
type Result struct {
	Kind                string `json:"kind"`
	RuleID              string `json:"ruleId"`
	Message             Text
	Locations           []Location           `json:"locations"`
	Properties          *Properties          `json:"properties,omitempty"`
	Fingerprints        *Fingerprints        `json:"fingerprints,omitempty"`
	PartialFingerprints *PartialFingerprints `json:"partialFingerprints,omitempty"`
}
    type RiskCalculationReport ¶
type RiskCalculationReport struct {
	EPSS                  float64 `json:"epss"`
	BaseScore             float64 `json:"baseScore"`
	ExploitExists         bool    `json:"exploitExists"`
	VerifiedExploitExists bool    `json:"verifiedExploitExists"`
	UnderAttack           bool    `json:"underAttack"`
	// environment information
	ConfidentialityRequirement string `json:"confidentialityRequirement"`
	IntegrityRequirement       string `json:"integrityRequirement"`
	AvailabilityRequirement    string `json:"availabilityRequirement"`
	Risk float64 `json:"risk"`
	Vector string `json:"vector"`
}
    func (RiskCalculationReport) Map ¶
func (r RiskCalculationReport) Map() map[string]any
func (RiskCalculationReport) String ¶
func (r RiskCalculationReport) String() string
type RiskMetrics ¶
type Rng ¶
type Rng struct {
	Type   string        `json:"type"`
	Repo   string        `json:"repo"`
	Events []SemverEvent `json:"events"`
}
    type SarifResult ¶
type Scorecard ¶
type Scorecard struct {
	Date       time.Time `json:"date"`
	Repository struct {
		Name   string `json:"name"`
		Commit string `json:"commit"`
	} `json:"repository"`
	Scorecard struct {
		Version string `json:"version"`
		Commit  string `json:"commit"`
	} `json:"scorecard"`
	Checks []struct {
		Name          string `json:"name"`
		Documentation struct {
			ShortDescription string `json:"shortDescription"`
			URL              string `json:"url"`
		} `json:"documentation"`
		Score   int    `json:"score"`
		Reason  string `json:"reason"`
		Details []any  `json:"details"`
	} `json:"checks"`
	OverallScore float64 `json:"overallScore"`
	Metadata     []any   `json:"metadata"`
}