asset

package
v0.18.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchMembersOfAsset added in v0.18.5

func FetchMembersOfAsset(ctx core.Context) ([]core.User, error)

func NewHTTPController added in v0.17.1

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

func NewService

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

Types

type AssetDTO added in v0.17.1

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"`

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

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

	RepositoryProvider *string `json:"repositoryProvider,omitempty"`
	IsPublic           bool    `json:"isPublic"`
}

func ToDTO added in v0.17.1

func ToDTO(asset models.Asset) AssetDTO

func ToDTOs added in v0.17.1

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

type AssetDetailsDTO added in v0.18.5

type AssetDetailsDTO struct {
	AssetDTO
	Members []core.User `json:"members"`
}

func ToDetailsDTO added in v0.18.5

func ToDetailsDTO(asset models.Asset, members []core.User) AssetDetailsDTO

type AssetDetailsWithSecretsDTO added in v0.18.5

type AssetDetailsWithSecretsDTO struct {
	AssetWithSecretsDTO
	Members []core.User `json:"members"`
}

func ToDetailsDTOWithSecrets added in v0.18.5

func ToDetailsDTOWithSecrets(asset models.Asset, members []core.User) AssetDetailsWithSecretsDTO

type AssetWithSecretsDTO added in v0.18.5

type AssetWithSecretsDTO struct {
	AssetDTO
	BadgeSecret   *uuid.UUID `json:"badgeSecret"`
	WebhookSecret *uuid.UUID `json:"webhookSecret"`
}

type LookupResponse added in v0.17.1

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.1

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.
	IsPublic           *bool   `json:"isPublic"`
}

Jump to

Keyboard shortcuts

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