api

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analysis added in v0.2.0

type Analysis struct {
	Proceed        bool              `docstore:"proceed" json:"proceed"`
	Results        string            `docstore:"results" json:"results"` // markdown content
	RawLLMAnalysis *SecurityAnalysis `docstore:"rawLLMAnalysis" json:"rawLLMAnalysis"`
}

type BundleMeta

type BundleMeta struct {
	PatchName     string `json:"patch_name"`
	CurrentBranch string `json:"current_branch"`
	DirName       string `json:"dir_name"`
	DiffCmd       string `json:"diff_cmd"`
	Remote        string `json:"remote"`
	GitDirty      bool   `json:"git_dirty"`
	ScanType      string `json:"scan_type,omitempty"`
}

type CodeMitigationItem added in v0.8.0

type CodeMitigationItem struct {
	LineNumber int    `docstore:"line_number" json:"line_number"`
	Path       string `docstore:"path" json:"path"`
	Content    string `docstore:"content" json:"content"`
	Code       string `docstore:"code" json:"code,omitempty"`
}

Structured output types

type DependencyMitigationItem added in v0.8.0

type DependencyMitigationItem struct {
	Content string `docstore:"content" json:"content"`
}

type Meta added in v0.2.0

type Meta struct {
	Type     string `docstore:"type" json:"type"` // pr, cli
	PR       int    `docstore:"pr" json:"pr"`
	Repo     string `docstore:"repo" json:"repo"`
	Org      string `docstore:"org" json:"org"`
	PRURL    string `docstore:"pr_url" json:"pr_url"`
	Commit   string `docstore:"commit" json:"commit"`
	Branch   string `docstore:"branch" json:"branch"`
	DirName  string `docstore:"dir_name" json:"dir_name"`
	DiffCmd  string `docstore:"diff_cmd" json:"diff_cmd"`
	Remote   string `docstore:"remote" json:"remote"`
	GitDirty bool   `docstore:"git_dirty" json:"git_dirty"`
}

type SecurityAnalysis added in v0.8.0

type SecurityAnalysis struct {
	Recommendation                string                     `docstore:"recommendation" json:"recommendation"`
	Justification                 string                     `docstore:"justification" json:"justification"`
	RequiredCodeMitigations       []CodeMitigationItem       `docstore:"code_mitigations" json:"code_mitigations,omitempty"`
	RequiredDependencyMitigations []DependencyMitigationItem `docstore:"dependency_mitigations" json:"dependency_mitigations,omitempty"`
	ShouldProceed                 bool                       `docstore:"should_proceed" json:"should_proceed"`
	FailedAnalysis                bool                       `docstore:"failed_analysis" json:"failed_analysis"`
	HealthScore                   int                        `docstore:"health_score" json:"health_score"` // 0-5 scale for full repo scans
}

type StatusMeta added in v0.3.0

type StatusMeta struct {
	SortEpoch string `json:"sort"`              // the sort key will be "epoch|status|value", this is the epoch
	Status    string `json:"status"`            // processing, uploaded, etc
	Details   string `json:"details,omitempty"` // detailed message
	UpdatedAt string `json:"updatedAt"`         // Insertion time
}

type UserInspectorResult added in v0.2.0

type UserInspectorResult struct {
	User       string     `docstore:"user" json:"user"` // Primary key
	Sort       string     `docstore:"sort" json:"sort"` // Sort key (epoch timestamp)
	TTL        int64      `docstore:"ttl" json:"ttl"`   // TTL (epoch expiration timestamp)
	Analysis   *Analysis  `docstore:"analysis" json:"analysis,omitempty"`
	Meta       Meta       `docstore:"meta" json:"meta"`
	StatusMeta StatusMeta `docstore:"status_meta" json:"statusMeta"` // Status and metadata
}

UserInspectorResult represents the structure for our DynamoDB table

type WorkspaceApp added in v0.2.0

type WorkspaceApp struct {
	Workspace string `docstore:"workspace" json:"workspace"` // Primary key
	UserOrg   string `docstore:"user_org" json:"user_org"`   // Sort key
}

WorkspaceApp represents the workspace-gh-app table structure

type WorkspaceInspectorResult added in v0.2.0

type WorkspaceInspectorResult struct {
	Workspace string   `docstore:"workspace" json:"workspace"` // Primary key (fixed json tag)
	Sort      string   `docstore:"sort" json:"sort"`           // Sort key (epoch timestamp)
	TTL       int64    `docstore:"ttl" json:"ttl"`             // TTL (epoch expiration timestamp)
	Analysis  Analysis `docstore:"analysis" json:"analysis"`
	Meta      Meta     `docstore:"meta" json:"meta"`
}

WorkspaceInspectorResult represents the workspace-inspector-results table structure

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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