v1

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ScannerType_name = map[int32]string{
		0: "SCANNER_TYPE_UNSPECIFIED",
		1: "SCANNER_TYPE_MCP",
		2: "SCANNER_TYPE_SKILL",
		3: "SCANNER_TYPE_A2A",
	}
	ScannerType_value = map[string]int32{
		"SCANNER_TYPE_UNSPECIFIED": 0,
		"SCANNER_TYPE_MCP":         1,
		"SCANNER_TYPE_SKILL":       2,
		"SCANNER_TYPE_A2A":         3,
	}
)

Enum value maps for ScannerType.

View Source
var (
	Severity_name = map[int32]string{
		0: "SEVERITY_UNSPECIFIED",
		1: "SEVERITY_NONE",
		2: "SEVERITY_INFO",
		3: "SEVERITY_LOW",
		4: "SEVERITY_MEDIUM",
		5: "SEVERITY_HIGH",
		6: "SEVERITY_CRITICAL",
	}
	Severity_value = map[string]int32{
		"SEVERITY_UNSPECIFIED": 0,
		"SEVERITY_NONE":        1,
		"SEVERITY_INFO":        2,
		"SEVERITY_LOW":         3,
		"SEVERITY_MEDIUM":      4,
		"SEVERITY_HIGH":        5,
		"SEVERITY_CRITICAL":    6,
	}
)

Enum value maps for Severity.

View Source
var File_agntcy_dir_security_v1_scan_report_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Finding

type Finding struct {

	// Unique rule identifier within the scanner (e.g. "SOCIAL_ENG_ANTHROPIC_IMPERSONATION").
	RuleId string `protobuf:"bytes,1,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
	// Severity of this finding.
	Severity Severity `protobuf:"varint,2,opt,name=severity,proto3,enum=agntcy.dir.security.v1.Severity" json:"severity,omitempty"`
	// Human-readable description of the issue.
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// File or artifact location where the issue was detected.
	Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"`
	// Logical category of the issue (e.g. "social_engineering", "policy_violation").
	Category string `protobuf:"bytes,5,opt,name=category,proto3" json:"category,omitempty"`
	// Suggested remediation for the issue.
	Remediation string `protobuf:"bytes,6,opt,name=remediation,proto3" json:"remediation,omitempty"`
	// contains filtered or unexported fields
}

Finding is a single issue identified by a scanner.

func (*Finding) Descriptor deprecated

func (*Finding) Descriptor() ([]byte, []int)

Deprecated: Use Finding.ProtoReflect.Descriptor instead.

func (*Finding) GetCategory

func (x *Finding) GetCategory() string

func (*Finding) GetLocation

func (x *Finding) GetLocation() string

func (*Finding) GetMessage

func (x *Finding) GetMessage() string

func (*Finding) GetRemediation

func (x *Finding) GetRemediation() string

func (*Finding) GetRuleId

func (x *Finding) GetRuleId() string

func (*Finding) GetSeverity

func (x *Finding) GetSeverity() Severity

func (*Finding) ProtoMessage

func (*Finding) ProtoMessage()

func (*Finding) ProtoReflect

func (x *Finding) ProtoReflect() protoreflect.Message

func (*Finding) Reset

func (x *Finding) Reset()

func (*Finding) String

func (x *Finding) String() string

type ScanReport

type ScanReport struct {

	// Type of scanner that produced this report.
	ScannerType ScannerType `` /* 135-byte string literal not displayed */
	// Version string of the scanner binary (e.g. "0.4.2").
	ScannerVersion string `protobuf:"bytes,2,opt,name=scanner_version,json=scannerVersion,proto3" json:"scanner_version,omitempty"`
	// Timestamp at which the scan was performed, in RFC3339 format.
	ScannedAt string `protobuf:"bytes,3,opt,name=scanned_at,json=scannedAt,proto3" json:"scanned_at,omitempty"`
	// Whether the scanner considers the artifact safe.
	IsSafe bool `protobuf:"varint,4,opt,name=is_safe,json=isSafe,proto3" json:"is_safe,omitempty"`
	// Highest severity level observed across all findings.
	MaxSeverity Severity `` /* 132-byte string literal not displayed */
	// Individual findings produced by the scan. Empty when is_safe is true.
	Findings []*Finding `protobuf:"bytes,6,rep,name=findings,proto3" json:"findings,omitempty"`
	// Names of the analyzer modules that ran (e.g. "static_analyzer", "bytecode").
	Analyzers []string `protobuf:"bytes,7,rep,name=analyzers,proto3" json:"analyzers,omitempty"`
	// Arbitrary key-value metadata attached by the scanner or the caller.
	// Clients running custom scanners can use this to surface extra details
	// without extending the schema (e.g. "policy_version", "ruleset_url").
	Annotations map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

ScanReport is the result of running a scanner against a record's source artifact. It is stored as a referrer of type "agntcy.dir.security.v1.ScanReport" and attached to the record CID it describes.

ScanReport can be encoded into a RecordReferrer object as follows:

type = "agntcy.dir.security.v1.ScanReport"
data = ScanReport message encoded as JSON

func (*ScanReport) Descriptor deprecated

func (*ScanReport) Descriptor() ([]byte, []int)

Deprecated: Use ScanReport.ProtoReflect.Descriptor instead.

func (*ScanReport) GetAnalyzers

func (x *ScanReport) GetAnalyzers() []string

func (*ScanReport) GetAnnotations

func (x *ScanReport) GetAnnotations() map[string]string

func (*ScanReport) GetFindings

func (x *ScanReport) GetFindings() []*Finding

func (*ScanReport) GetIsSafe

func (x *ScanReport) GetIsSafe() bool

func (*ScanReport) GetMaxSeverity

func (x *ScanReport) GetMaxSeverity() Severity

func (*ScanReport) GetScannedAt

func (x *ScanReport) GetScannedAt() string

func (*ScanReport) GetScannerType

func (x *ScanReport) GetScannerType() ScannerType

func (*ScanReport) GetScannerVersion

func (x *ScanReport) GetScannerVersion() string

func (*ScanReport) MarshalReferrer

func (r *ScanReport) MarshalReferrer() (*corev1.RecordReferrer, error)

MarshalReferrer encodes the ScanReport into a RecordReferrer.

func (*ScanReport) ProtoMessage

func (*ScanReport) ProtoMessage()

func (*ScanReport) ProtoReflect

func (x *ScanReport) ProtoReflect() protoreflect.Message

func (*ScanReport) ReferrerType

func (r *ScanReport) ReferrerType() string

ReferrerType returns the fully-qualified proto type name used as the referrer type tag.

func (*ScanReport) Reset

func (x *ScanReport) Reset()

func (*ScanReport) String

func (x *ScanReport) String() string

func (*ScanReport) UnmarshalReferrer

func (r *ScanReport) UnmarshalReferrer(ref *corev1.RecordReferrer) error

UnmarshalReferrer loads a ScanReport from a RecordReferrer.

type ScannerType

type ScannerType int32

ScannerType identifies which scanner produced a ScanReport.

const (
	ScannerType_SCANNER_TYPE_UNSPECIFIED ScannerType = 0
	// MCP behavioral scanner (github.com/cisco-ai-defense/mcp-scanner).
	ScannerType_SCANNER_TYPE_MCP ScannerType = 1
	// Skill security scanner (github.com/cisco-ai-defense/skill-scanner).
	ScannerType_SCANNER_TYPE_SKILL ScannerType = 2
	// A2A scanner (github.com/cisco-ai-defense/a2a-scanner).
	ScannerType_SCANNER_TYPE_A2A ScannerType = 3
)

func (ScannerType) Descriptor

func (ScannerType) Enum

func (x ScannerType) Enum() *ScannerType

func (ScannerType) EnumDescriptor deprecated

func (ScannerType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ScannerType.Descriptor instead.

func (ScannerType) Number

func (x ScannerType) Number() protoreflect.EnumNumber

func (ScannerType) String

func (x ScannerType) String() string

func (ScannerType) Type

type Severity

type Severity int32

Severity ranks the impact of a finding or the overall scan result.

const (
	Severity_SEVERITY_UNSPECIFIED Severity = 0
	Severity_SEVERITY_NONE        Severity = 1
	Severity_SEVERITY_INFO        Severity = 2
	Severity_SEVERITY_LOW         Severity = 3
	Severity_SEVERITY_MEDIUM      Severity = 4
	Severity_SEVERITY_HIGH        Severity = 5
	Severity_SEVERITY_CRITICAL    Severity = 6
)

func (Severity) Descriptor

func (Severity) Descriptor() protoreflect.EnumDescriptor

func (Severity) Enum

func (x Severity) Enum() *Severity

func (Severity) EnumDescriptor deprecated

func (Severity) EnumDescriptor() ([]byte, []int)

Deprecated: Use Severity.Descriptor instead.

func (Severity) Number

func (x Severity) Number() protoreflect.EnumNumber

func (Severity) String

func (x Severity) String() string

func (Severity) Type

Jump to

Keyboard shortcuts

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