model

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package model defines core types used throughout the devsec application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	ID          string   `json:"id"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Rule        string   `json:"rule"`
	Scanner     string   `json:"scanner"`
	Severity    Severity `json:"severity"`
	Location    Location `json:"location"`
}

Finding represents a single security or compliance finding. Fields ordered for optimal memory alignment.

type Location

type Location struct {
	File      string `json:"file"`
	StartLine int    `json:"start_line"`
	EndLine   int    `json:"end_line"`
	Column    int    `json:"column,omitempty"`
}

Location represents the location of a finding in source code.

type Report

type Report struct {
	Metadata  map[string]string `json:"metadata"`
	Timestamp string            `json:"timestamp"`
	Findings  []Finding         `json:"findings"`
	Summary   Summary           `json:"summary"`
}

Report represents an aggregated report from multiple scanners. Fields ordered for optimal memory alignment.

type Severity

type Severity string

Severity represents the severity level of a finding.

const (
	// SeverityCritical represents critical severity findings.
	SeverityCritical Severity = "critical"
	// SeverityHigh represents high severity findings.
	SeverityHigh Severity = "high"
	// SeverityMedium represents medium severity findings.
	SeverityMedium Severity = "medium"
	// SeverityLow represents low severity findings.
	SeverityLow Severity = "low"
	// SeverityInfo represents informational findings.
	SeverityInfo Severity = "info"
)

type Summary

type Summary struct {
	Total    int `json:"total"`
	Critical int `json:"critical"`
	High     int `json:"high"`
	Medium   int `json:"medium"`
	Low      int `json:"low"`
	Info     int `json:"info"`
}

Summary provides a summary of findings by severity.

Jump to

Keyboard shortcuts

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