Documentation
¶
Index ¶
- Variables
- type Action
- type BenchmarkTask
- type CloudAccount
- type Condition
- type Containers
- type Details
- type Exception
- type Items
- type List
- type Macro
- type MacroCondition
- type NotificationChannel
- type NotificationChannelOptions
- type Policy
- type Processes
- type ReadPaths
- type ReadWritePaths
- type Rule
- type ScanningGate
- type ScanningGateParam
- type ScanningPolicy
- type ScanningPolicyAssignment
- type ScanningPolicyAssignmentImage
- type ScanningPolicyAssignmentList
- type Syscalls
- type SysdigSecureClient
- type TCPListenPorts
- type Team
- type UDPListenPorts
- type UserRoles
- type UserRulesFile
- type UsersList
- type VulnerabilityException
- type VulnerabilityExceptionList
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedBenchmarkTaskSchemas = []string{
"aws_foundations_bench-1.3.0",
"gcp_foundations_bench-1.2.0",
"azure_foundations_bench-1.3.0",
}
Functions ¶
This section is empty.
Types ¶
type BenchmarkTask ¶ added in v0.5.19
type BenchmarkTask struct {
ID int `json:"id,omitempty"`
Name string `json:"name"`
Schema string `json:"schema"`
Scope string `json:"scope"`
Schedule string `json:"schedule"`
Enabled bool `json:"enabled"`
}
func BenchmarkTaskFromJSON ¶ added in v0.5.19
func BenchmarkTaskFromJSON(body []byte) *BenchmarkTask
func (*BenchmarkTask) ToJSON ¶ added in v0.5.19
func (t *BenchmarkTask) ToJSON() io.Reader
type CloudAccount ¶ added in v0.5.17
type CloudAccount struct {
AccountID string `json:"accountId"`
Provider string `json:"provider"`
Alias string `json:"alias"`
RoleAvailable bool `json:"roleAvailable"`
RoleName string `json:"roleName"`
ExternalID string `json:"externalId,omitempty"`
WorkLoadIdentityAccountID string `json:"workloadIdentityAccountId,omitempty"`
WorkLoadIdentityAccountAlias string `json:"workLoadIdentityAccountAlias,omitempty"`
}
func CloudAccountFromJSON ¶ added in v0.5.17
func CloudAccountFromJSON(body []byte) *CloudAccount
func (*CloudAccount) ToJSON ¶ added in v0.5.17
func (e *CloudAccount) ToJSON() io.Reader
type Condition ¶
type Condition struct {
Condition string `json:"condition"`
Components []interface{} `json:"components"`
}
type Containers ¶
type Details ¶
type Details struct {
// Containers
Containers *Containers `json:"containers,omitempty"`
// Filesystems
ReadWritePaths *ReadWritePaths `json:"readWritePaths,omitempty"`
ReadPaths *ReadPaths `json:"readPaths,omitempty"`
// Network
AllOutbound bool `json:"allOutbound,omitempty"`
AllInbound bool `json:"allInbound,omitempty"`
TCPListenPorts *TCPListenPorts `json:"tcpListenPorts,omitempty"`
UDPListenPorts *UDPListenPorts `json:"udpListenPorts,omitempty"`
// Processes
Processes *Processes `json:"processes,omitempty"`
// Syscalls
Syscalls *Syscalls `json:"syscalls,omitempty"`
// Falco
Append *bool `json:"append,omitempty"`
Source string `json:"source,omitempty"`
Output string `json:"output,omitempty"`
Condition *Condition `json:"condition,omitempty"`
Priority string `json:"priority,omitempty"`
Exceptions []*Exception `json:"exceptions,omitempty"`
RuleType string `json:"ruleType"`
}
type Exception ¶ added in v0.5.16
type Exception struct {
Name string `json:"name"`
Fields interface{} `json:"fields,omitempty"`
Comps interface{} `json:"comps,omitempty"`
Values interface{} `json:"values,omitempty"`
}
type List ¶
type List struct {
Name string `json:"name"`
Items Items `json:"items"`
Append bool `json:"append"`
ID int `json:"id,omitempty"`
Version int `json:"version,omitempty"`
}
func ListFromJSON ¶
type Macro ¶
type Macro struct {
ID int `json:"id,omitempty"`
Version int `json:"version,omitempty"`
Name string `json:"name"`
Condition MacroCondition `json:"condition"`
Append bool `json:"append"`
}
func MacroFromJSON ¶
type MacroCondition ¶
type MacroCondition struct {
Condition string `json:"condition"`
}
type NotificationChannel ¶
type NotificationChannel struct {
ID int `json:"id,omitempty"`
Version int `json:"version,omitempty"`
Type string `json:"type"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
Options NotificationChannelOptions `json:"options"`
}
func NotificationChannelFromJSON ¶
func NotificationChannelFromJSON(body []byte) NotificationChannel
func NotificationChannelListFromJSON ¶
func NotificationChannelListFromJSON(body []byte) []NotificationChannel
func (*NotificationChannel) ToJSON ¶
func (n *NotificationChannel) ToJSON() io.Reader
type NotificationChannelOptions ¶
type NotificationChannelOptions struct {
EmailRecipients []string `json:"emailRecipients,omitempty"` // Type: email
SnsTopicARNs []string `json:"snsTopicARNs,omitempty"` // Type: SNS
APIKey string `json:"apiKey,omitempty"` // Type: VictorOps, OpsGenie
RoutingKey string `json:"routingKey,omitempty"` // Type: VictorOps
Url string `json:"url,omitempty"` // Type: OpsGenie, Webhook and Slack
Channel string `json:"channel,omitempty"` // Type: Slack
Account string `json:"account,omitempty"` // Type: PagerDuty
ServiceKey string `json:"serviceKey,omitempty"` // Type: PagerDuty
ServiceName string `json:"serviceName,omitempty"` // Type: PagerDuty
Region string `json:"region,omitempty"` // Type: OpsGenie
NotifyOnOk bool `json:"notifyOnOk"`
NotifyOnResolve bool `json:"notifyOnResolve"`
SendTestNotification bool `json:"sendTestNotification"`
}
type Policy ¶
type Policy struct {
ID int `json:"id,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Severity int `json:"severity"`
Enabled bool `json:"enabled"`
RuleNames []string `json:"ruleNames"`
Actions []Action `json:"actions"`
Scope string `json:"scope,omitempty"`
Version int `json:"version,omitempty"`
NotificationChannelIds []int `json:"notificationChannelIds"`
Type string `json:"type"`
Runbook string `json:"runbook"`
}
func PolicyFromJSON ¶
type ReadWritePaths ¶
type Rule ¶
type Rule struct {
ID int `json:"id,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags"`
Details Details `json:"details"`
Version int `json:"version,omitempty"`
}
func RuleFromJSON ¶
type ScanningGate ¶ added in v0.5.48
type ScanningGate struct {
ID string `json:"id,omitempty"`
Gate string `json:"gate"`
Trigger string `json:"trigger"`
Action string `json:"action"`
Params []ScanningGateParam `json:"params"`
}
type ScanningGateParam ¶ added in v0.5.48
type ScanningPolicy ¶ added in v0.5.48
type ScanningPolicy struct {
ID string `json:"id,omitempty"`
Version string `json:"version,omitempty"`
Name string `json:"name"`
Comment string `json:"comment"`
IsDefault bool `json:"isDefault,omitempty"`
PolicyBundleId string `json:"policyBundleId,omitempty"`
Rules []ScanningGate `json:"rules"`
}
-------- Scanning Policies --------
func ScanningPolicyFromJSON ¶ added in v0.5.48
func ScanningPolicyFromJSON(body []byte) (result ScanningPolicy)
func (*ScanningPolicy) ToJSON ¶ added in v0.5.48
func (policy *ScanningPolicy) ToJSON() io.Reader
type ScanningPolicyAssignment ¶ added in v0.5.48
type ScanningPolicyAssignment struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Registry string `json:"registry"`
Repository string `json:"repository"`
Image ScanningPolicyAssignmentImage `json:"image"`
PolicyIDs []string `json:"policy_ids"`
WhitelistIDs []string `json:"whitelist_ids"`
}
type ScanningPolicyAssignmentImage ¶ added in v0.5.48
type ScanningPolicyAssignmentList ¶ added in v0.5.48
type ScanningPolicyAssignmentList struct {
Items []ScanningPolicyAssignment `json:"items"`
PolicyBundleId string `json:"policyBundleId"`
}
-------- Scanning Policy Assignments --------
func ScanningPolicyAssignmentFromJSON ¶ added in v0.5.48
func ScanningPolicyAssignmentFromJSON(body []byte) (result ScanningPolicyAssignmentList)
func (*ScanningPolicyAssignmentList) ToJSON ¶ added in v0.5.48
func (policy *ScanningPolicyAssignmentList) ToJSON() io.Reader
type SysdigSecureClient ¶
type SysdigSecureClient interface {
CreatePolicy(context.Context, Policy) (Policy, error)
DeletePolicy(context.Context, int) error
UpdatePolicy(context.Context, Policy) (Policy, error)
GetPolicyById(context.Context, int) (Policy, int, error)
CreateRule(context.Context, Rule) (Rule, error)
GetRuleByID(context.Context, int) (Rule, error)
UpdateRule(context.Context, Rule) (Rule, error)
DeleteRule(context.Context, int) error
CreateNotificationChannel(context.Context, NotificationChannel) (NotificationChannel, error)
GetNotificationChannelById(context.Context, int) (NotificationChannel, error)
GetNotificationChannelByName(context.Context, string) (NotificationChannel, error)
DeleteNotificationChannel(context.Context, int) error
UpdateNotificationChannel(context.Context, NotificationChannel) (NotificationChannel, error)
CreateList(context.Context, List) (List, error)
GetListById(context.Context, int) (List, error)
DeleteList(context.Context, int) error
UpdateList(context.Context, List) (List, error)
CreateMacro(context.Context, Macro) (Macro, error)
GetMacroById(context.Context, int) (Macro, error)
DeleteMacro(context.Context, int) error
UpdateMacro(context.Context, Macro) (Macro, error)
CreateVulnerabilityExceptionList(context.Context, *VulnerabilityExceptionList) (*VulnerabilityExceptionList, error)
GetVulnerabilityExceptionListByID(context.Context, string) (*VulnerabilityExceptionList, error)
DeleteVulnerabilityExceptionList(context.Context, string) error
UpdateVulnerabilityExceptionList(context.Context, *VulnerabilityExceptionList) (*VulnerabilityExceptionList, error)
CreateVulnerabilityException(context.Context, string, *VulnerabilityException) (*VulnerabilityException, error)
GetVulnerabilityExceptionByID(context.Context, string, string) (*VulnerabilityException, error)
DeleteVulnerabilityException(context.Context, string, string) error
UpdateVulnerabilityException(context.Context, string, *VulnerabilityException) (*VulnerabilityException, error)
CreateCloudAccount(context.Context, *CloudAccount) (*CloudAccount, error)
GetCloudAccountById(context.Context, string) (*CloudAccount, error)
DeleteCloudAccount(context.Context, string) error
UpdateCloudAccount(context.Context, string, *CloudAccount) (*CloudAccount, error)
GetTrustedCloudIdentity(context.Context, string) (string, error)
CreateScanningPolicy(context.Context, ScanningPolicy) (ScanningPolicy, error)
GetScanningPolicyById(context.Context, string) (ScanningPolicy, error)
DeleteScanningPolicyById(context.Context, string) error
UpdateScanningPolicyById(context.Context, ScanningPolicy) (ScanningPolicy, error)
CreateScanningPolicyAssignmentList(context.Context, ScanningPolicyAssignmentList) (ScanningPolicyAssignmentList, error)
GetScanningPolicyAssignmentList(context.Context) (ScanningPolicyAssignmentList, error)
DeleteScanningPolicyAssignmentList(context.Context, ScanningPolicyAssignmentList) error
}
func NewSysdigSecureClient ¶
func NewSysdigSecureClient(sysdigSecureAPIToken string, url string, insecure bool) SysdigSecureClient
func WithExtraHeaders ¶
func WithExtraHeaders(client SysdigSecureClient, extraHeaders map[string]string) SysdigSecureClient
type TCPListenPorts ¶
type Team ¶
type Team struct {
ID int `json:"id,omitempty"`
Version int `json:"version,omitempty"`
Theme string `json:"theme"`
Name string `json:"name"`
Description string `json:"description"`
ScopeBy string `json:"show"`
Filter string `json:"filter"`
CanUseSysdigCapture bool `json:"canUseSysdigCapture"`
UserRoles []UserRoles `json:"userRoles,omitempty"`
DefaultTeam bool `json:"default"`
Products []string `json:"products"`
}
-------- Team --------
func TeamFromJSON ¶
type UDPListenPorts ¶
type UserRulesFile ¶
func UserRulesFileFromJSON ¶
func UserRulesFileFromJSON(body []byte) UserRulesFile
func (*UserRulesFile) ToJSON ¶
func (userRulesFile *UserRulesFile) ToJSON() io.Reader
type VulnerabilityException ¶ added in v0.5.10
type VulnerabilityException struct {
ID string `json:"id"`
Gate string `json:"gate"`
TriggerID string `json:"trigger_id"`
Notes string `json:"notes"`
ExpirationDate *int `json:"expiration_date,omitempty"`
Enabled bool `json:"enabled"`
}
func VulnerabilityExceptionFromJSON ¶ added in v0.5.10
func VulnerabilityExceptionFromJSON(body []byte) *VulnerabilityException
func (*VulnerabilityException) ToJSON ¶ added in v0.5.10
func (e *VulnerabilityException) ToJSON() io.Reader
type VulnerabilityExceptionList ¶ added in v0.5.10
type VulnerabilityExceptionList struct {
ID string `json:"id,omitempty"`
Version string `json:"version"`
Name string `json:"name"`
Comment string `json:"comment"`
}
func VulnerabilityExceptionListFromJSON ¶ added in v0.5.10
func VulnerabilityExceptionListFromJSON(body []byte) *VulnerabilityExceptionList
func (*VulnerabilityExceptionList) ToJSON ¶ added in v0.5.10
func (l *VulnerabilityExceptionList) ToJSON() io.Reader
Click to show internal directories.
Click to hide internal directories.