asset

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPController added in v0.17.0

func NewHTTPController(repository core.AssetRepository, assetVersionRepository core.AssetVersionRepository, assetService core.AssetService, dependencyVulnService core.DependencyVulnService, statisticsService core.StatisticsService) *httpController

func NewService

func NewService(assetRepository core.AssetRepository, dependencyVulnRepository core.DependencyVulnRepository, dependencyVulnService core.DependencyVulnService) *service

Types

type AssetDTO added in v0.17.0

type AssetDTO struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	Avatar      *string   `json:"avatar,omitempty"`
	Slug        string    `json:"slug"`
	Description string    `json:"description"`
	ProjectID   uuid.UUID `json:"projectId"`

	AvailabilityRequirement    models.RequirementLevel `json:"availabilityRequirement"`
	IntegrityRequirement       models.RequirementLevel `json:"integrityRequirement"`
	ConfidentialityRequirement models.RequirementLevel `json:"confidentialityRequirement"`
	ReachableFromInternet      bool                    `json:"reachableFromInternet"`

	RepositoryID   *string `json:"repositoryId"`
	RepositoryName *string `json:"repositoryName"`

	LastSecretScan    *time.Time `json:"lastSecretScan"`
	LastSastScan      *time.Time `json:"lastSastScan"`
	LastScaScan       *time.Time `json:"lastScaScan"`
	LastIacScan       *time.Time `json:"lastIacScan"`
	LastContainerScan *time.Time `json:"lastContainerScan"`
	LastDastScan      *time.Time `json:"lastDastScan"`

	SigningPubKey *string `json:"signingPubKey"`

	EnableTicketRange            bool     `json:"enableTicketRange"`
	CVSSAutomaticTicketThreshold *float64 `json:"cvssAutomaticTicketThreshold"`
	RiskAutomaticTicketThreshold *float64 `json:"riskAutomaticTicketThreshold"`

	VulnAutoReopenAfterDays *int `json:"vulnAutoReopenAfterDays"`

	BadgeSecret   *uuid.UUID `json:"badgeSecret"`
	WebhookSecret *uuid.UUID `json:"webhookSecret"`

	AssetVersions []models.AssetVersion `json:"refs"`

	ExternalEntityProviderID *string `json:"externalEntityProviderId,omitempty"`
	ExternalEntityID         *string `json:"externalEntityId,omitempty"`

	RepositoryProvider *string `json:"repositoryProvider,omitempty"`
}

func ToDTO added in v0.17.0

func ToDTO(asset models.Asset) AssetDTO

func ToDTOs added in v0.17.0

func ToDTOs(assets []models.Asset) []AssetDTO

type LookupResponse added in v0.17.0

type LookupResponse struct {
	Org     string `json:"org"`
	Project string `json:"project"`
	Asset   string `json:"asset"`
	Link    string `json:"link"`
}

type PatchRequest added in v0.17.0

type PatchRequest struct {
	Name        *string `json:"name"`
	Description *string `json:"description"`

	CVSSAutomaticTicketThreshold *float64 `json:"cvssAutomaticTicketThreshold"`
	RiskAutomaticTicketThreshold *float64 `json:"riskAutomaticTicketThreshold"`
	EnableTicketRange            bool     `json:"enableTicketRange"`

	CentralDependencyVulnManagement *bool `json:"centralDependencyVulnManagement"`

	ReachableFromInternet *bool `json:"reachableFromInternet"`

	ConfidentialityRequirement *models.RequirementLevel `json:"confidentialityRequirement"`
	IntegrityRequirement       *models.RequirementLevel `json:"integrityRequirement"`
	AvailabilityRequirement    *models.RequirementLevel `json:"availabilityRequirement"`

	RepositoryID   *string `json:"repositoryId"`
	RepositoryName *string `json:"repositoryName"`

	ConfigFiles *map[string]any `json:"configFiles"`

	VulnAutoReopenAfterDays *int `json:"vulnAutoReopenAfterDays"`

	WebhookSecret *string `json:"webhookSecret"`
	BadgeSecret   *string `json:"badgeSecret"`

	RepositoryProvider *string `json:"repositoryProvider" validate:"omitempty,oneof=github gitlab"` // either null or github or gitlab, etc.
}

Jump to

Keyboard shortcuts

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