Documentation ¶
Index ¶
- Constants
- Variables
- func FindIntegrationType(t string) (integrationType, bool)
- type AlertLevel
- type AwsCloudWatchAlertChannel
- type AwsCloudWatchData
- type AwsCloudWatchResponse
- type AwsEcrCreds
- type AwsEcrData
- type AwsEcrIntegration
- type AwsEcrResponse
- type AwsIntegration
- type AwsIntegrationCreds
- type AwsIntegrationData
- type AwsIntegrationsResponse
- type AzureIntegration
- type AzureIntegrationCreds
- type AzureIntegrationData
- type AzureIntegrationsResponse
- type Client
- func (c *Client) ApiVersion() string
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) DoDecoder(req *http.Request, v interface{}) (*http.Response, error)
- func (c *Client) GenerateToken() (response TokenResponse, err error)
- func (c *Client) GenerateTokenWithKeys(keyID, secretKey string) (TokenResponse, error)
- func (c *Client) NewRequest(method string, apiURL string, body io.Reader) (*http.Request, error)
- func (c *Client) RequestDecoder(method, path string, body io.Reader, v interface{}) error
- func (c *Client) RequestEncoderDecoder(method, path string, data, v interface{}) error
- func (c *Client) URL() string
- type CompAzureSubscriptions
- type CompGcpProjects
- type ComplianceAwsReport
- type ComplianceAwsReportConfig
- type ComplianceAzureReport
- type ComplianceAzureReportConfig
- type ComplianceGcpReport
- type ComplianceGcpReportConfig
- type ComplianceRecommendation
- type ComplianceService
- func (svc *ComplianceService) DownloadAwsReportPDF(filepath string, config ComplianceAwsReportConfig) error
- func (svc *ComplianceService) DownloadAzureReportPDF(filepath string, config ComplianceAzureReportConfig) error
- func (svc *ComplianceService) DownloadGcpReportPDF(filepath string, config ComplianceGcpReportConfig) error
- func (svc *ComplianceService) GetAwsReport(config ComplianceAwsReportConfig) (response complianceAwsReportResponse, err error)
- func (svc *ComplianceService) GetAzureReport(config ComplianceAzureReportConfig) (response complianceAzureReportResponse, err error)
- func (svc *ComplianceService) GetGcpReport(config ComplianceGcpReportConfig) (response complianceGcpReportResponse, err error)
- func (svc *ComplianceService) ListAzureSubscriptions(tenantID string) (response compAzureSubsResponse, err error)
- func (svc *ComplianceService) ListGcpProjects(orgID string) (response compGcpProjectsResponse, err error)
- func (svc *ComplianceService) RunAwsReport(accountID string) (response map[string]interface{}, err error)
- func (svc *ComplianceService) RunAzureReport(tenantID string) (response complianceRunAzureReportResponse, err error)
- func (svc *ComplianceService) RunGcpReport(projectID string) (response complianceRunGcpReportResponse, err error)
- func (svc *ComplianceService) RunIntegrationReport(intgGuid string) (response map[string]interface{}, err error)
- type ComplianceSummary
- type ComplianceViolation
- type ContainerRegCreds
- type ContainerRegData
- type ContainerRegIntResponse
- type ContainerRegIntegration
- func NewContainerRegIntegration(name string, data ContainerRegData) ContainerRegIntegration
- func NewDockerHubRegistryIntegration(name string, data ContainerRegData) ContainerRegIntegration
- func NewDockerV2RegistryIntegration(name string, data ContainerRegData) ContainerRegIntegration
- func NewGcrRegistryIntegration(name string, data ContainerRegData) ContainerRegIntegration
- type ContainerVulnerabilityService
- func (svc *ContainerVulnerabilityService) AssessmentFromImageDigest(imageDigest string) (response VulnContainerAssessmentResponse, err error)
- func (svc *ContainerVulnerabilityService) AssessmentFromImageID(imageID string) (response VulnContainerAssessmentResponse, err error)
- func (svc *ContainerVulnerabilityService) ListAssessments() (VulnContainerAssessmentsResponse, error)
- func (svc *ContainerVulnerabilityService) ListAssessmentsDateRange(start, end time.Time) (response VulnContainerAssessmentsResponse, err error)
- func (svc *ContainerVulnerabilityService) Scan(registry, repository, tagOrHash string) (response vulnContainerScanResponse, err error)
- func (svc *ContainerVulnerabilityService) ScanStatus(requestID string) (response vulnContainerScanStatusResponse, err error)
- type Event
- type EventAPIEntity
- type EventApplicationEntity
- type EventCTUserEntity
- type EventContainerEntity
- type EventCustomRuleEntity
- type EventDetails
- type EventDetailsResponse
- type EventDnsNameEntity
- type EventEntityMap
- type EventFileDataHashEntity
- type EventFileExePathEntity
- type EventIpAddressEntity
- type EventMachineEntity
- type EventNewViolationEntity
- type EventProcessEntity
- type EventRecIDEntity
- type EventRegionEntity
- type EventResourceEntity
- type EventSourceIpAddressEntity
- type EventUserEntity
- type EventViolationReasonEntity
- type EventsCount
- type EventsResponse
- type EventsService
- func (svc *EventsService) Details(eventID string) (response EventDetailsResponse, err error)
- func (svc *EventsService) List() (EventsResponse, error)
- func (svc *EventsService) ListDateRange(start, end time.Time) (response EventsResponse, err error)
- func (svc *EventsService) ListRange(start, end time.Time) (EventsResponse, error)
- type GcpCredentials
- type GcpIntegration
- type GcpIntegrationData
- type GcpIntegrationsResponse
- type HostScanPackageVulnDetails
- type HostVulnCVE
- type HostVulnCounts
- type HostVulnCveSummary
- type HostVulnDetail
- type HostVulnHostAssessment
- type HostVulnPackage
- type HostVulnScanPkgManifestResponse
- type HostVulnSeverityCounts
- type HostVulnerabilityService
- func (svc *HostVulnerabilityService) GetHostAssessment(id string) (response hostVulnHostResponse, err error)
- func (svc *HostVulnerabilityService) ListCves() (response hostVulnListCvesResponse, err error)
- func (svc *HostVulnerabilityService) ListHostsWithCVE(id string) (response hostVulnListHostsResponse, err error)
- func (svc *HostVulnerabilityService) Scan(manifest string) (response HostVulnScanPkgManifestResponse, err error)
- type IntegrationState
- type IntegrationsService
- func (svc *IntegrationsService) CreateAws(integration AwsIntegration) (response AwsIntegrationsResponse, err error)
- func (svc *IntegrationsService) CreateAwsCloudWatchAlertChannel(integration AwsCloudWatchAlertChannel) (response AwsCloudWatchResponse, err error)
- func (svc *IntegrationsService) CreateAwsEcrRegistry(integration AwsEcrIntegration) (response AwsEcrResponse, err error)
- func (svc *IntegrationsService) CreateAzure(integration AzureIntegration) (response AzureIntegrationsResponse, err error)
- func (svc *IntegrationsService) CreateContainerRegistry(integration ContainerRegIntegration) (response ContainerRegIntResponse, err error)
- func (svc *IntegrationsService) CreateGcp(data GcpIntegration) (response GcpIntegrationsResponse, err error)
- func (svc *IntegrationsService) CreateJiraAlertChannel(integration JiraAlertChannel) (response JiraAlertChannelResponse, err error)
- func (svc *IntegrationsService) CreatePagerDutyAlertChannel(integration PagerDutyAlertChannel) (response PagerDutyAlertChannelResponse, err error)
- func (svc *IntegrationsService) CreateSlackAlertChannel(integration SlackAlertChannel) (response SlackAlertChannelResponse, err error)
- func (svc *IntegrationsService) Delete(guid string) (response RawIntegrationsResponse, err error)
- func (svc *IntegrationsService) DeleteAws(guid string) (response AwsIntegrationsResponse, err error)
- func (svc *IntegrationsService) DeleteAzure(guid string) (response AzureIntegrationsResponse, err error)
- func (svc *IntegrationsService) DeleteGcp(guid string) (response GcpIntegrationsResponse, err error)
- func (svc *IntegrationsService) Get(guid string) (response RawIntegrationsResponse, err error)
- func (svc *IntegrationsService) GetAws(guid string) (response AwsIntegrationsResponse, err error)
- func (svc *IntegrationsService) GetAwsCloudWatchAlertChannel(guid string) (response AwsCloudWatchResponse, err error)
- func (svc *IntegrationsService) GetAwsEcrRegistry(guid string) (response AwsEcrResponse, err error)
- func (svc *IntegrationsService) GetAzure(guid string) (response AzureIntegrationsResponse, err error)
- func (svc *IntegrationsService) GetContainerRegistry(guid string) (response ContainerRegIntResponse, err error)
- func (svc *IntegrationsService) GetGcp(guid string) (response GcpIntegrationsResponse, err error)
- func (svc *IntegrationsService) GetJiraAlertChannel(guid string) (response JiraAlertChannelResponse, err error)
- func (svc *IntegrationsService) GetPagerDutyAlertChannel(guid string) (response PagerDutyAlertChannelResponse, err error)
- func (svc *IntegrationsService) GetSchema(iType integrationType) (response map[string]interface{}, err error)
- func (svc *IntegrationsService) GetSlackAlertChannel(guid string) (response SlackAlertChannelResponse, err error)
- func (svc *IntegrationsService) List() (response RawIntegrationsResponse, err error)
- func (svc *IntegrationsService) ListAwsCfg() (response AwsIntegrationsResponse, err error)
- func (svc *IntegrationsService) ListAwsCloudTrail() (response AwsIntegrationsResponse, err error)
- func (svc *IntegrationsService) ListAwsCloudWatchAlertChannel() (response AwsCloudWatchResponse, err error)
- func (svc *IntegrationsService) ListAzureActivityLog() (response AzureIntegrationsResponse, err error)
- func (svc *IntegrationsService) ListAzureCfg() (response AzureIntegrationsResponse, err error)
- func (svc *IntegrationsService) ListByType(iType integrationType) (response RawIntegrationsResponse, err error)
- func (svc *IntegrationsService) ListGcpAuditLog() (response GcpIntegrationsResponse, err error)
- func (svc *IntegrationsService) ListGcpCfg() (response GcpIntegrationsResponse, err error)
- func (svc *IntegrationsService) ListJiraAlertChannel() (response JiraAlertChannelResponse, err error)
- func (svc *IntegrationsService) ListPagerDutyAlertChannel() (response PagerDutyAlertChannelResponse, err error)
- func (svc *IntegrationsService) ListSlackAlertChannel() (response SlackAlertChannelResponse, err error)
- func (svc *IntegrationsService) UpdateAws(data AwsIntegration) (response AwsIntegrationsResponse, err error)
- func (svc *IntegrationsService) UpdateAwsCloudWatchAlertChannel(data AwsCloudWatchAlertChannel) (response AwsCloudWatchResponse, err error)
- func (svc *IntegrationsService) UpdateAwsEcrRegistry(integration AwsEcrIntegration) (response AwsEcrResponse, err error)
- func (svc *IntegrationsService) UpdateAzure(data AzureIntegration) (response AzureIntegrationsResponse, err error)
- func (svc *IntegrationsService) UpdateContainerRegistry(integration ContainerRegIntegration) (response ContainerRegIntResponse, err error)
- func (svc *IntegrationsService) UpdateGcp(data GcpIntegration) (response GcpIntegrationsResponse, err error)
- func (svc *IntegrationsService) UpdateJiraAlertChannel(data JiraAlertChannel) (response JiraAlertChannelResponse, err error)
- func (svc *IntegrationsService) UpdatePagerDutyAlertChannel(data PagerDutyAlertChannel) (response PagerDutyAlertChannelResponse, err error)
- func (svc *IntegrationsService) UpdateSlackAlertChannel(data SlackAlertChannel) (response SlackAlertChannelResponse, err error)
- type JiraAlertChannel
- type JiraAlertChannelData
- type JiraAlertChannelResponse
- type Json16DigitTime
- type LQLService
- type NanoTime
- type Option
- func WithApiKeys(id, secret string) Option
- func WithApiV2() Option
- func WithExpirationTime(t int) Option
- func WithHeader(header, value string) Option
- func WithLogFile(filename string) Option
- func WithLogLevel(level string) Option
- func WithLogLevelAndFile(level, filename string) Option
- func WithLogLevelAndWriter(level string, w io.Writer) Option
- func WithLogWriter(w io.Writer) Option
- func WithToken(token string) Option
- func WithTokenFromKeys(id, secret string) Option
- func WithURL(baseURL string) Option
- type PagerDutyAlertChannel
- type PagerDutyAlertChannelResponse
- type PagerDutyData
- type RawIntegration
- type RawIntegrationsResponse
- type SlackAlertChannel
- type SlackAlertChannelResponse
- type SlackChannelData
- type TokenResponse
- type VulnContainerAssessment
- type VulnContainerAssessmentResponse
- type VulnContainerAssessmentSummary
- type VulnContainerAssessmentsResponse
- type VulnContainerImage
- type VulnerabilitiesService
Constants ¶
const ( JiraCloudAlertType = "JIRA_CLOUD" JiraServerAlertType = "JIRA_SERVER" )
const ( // type that defines a non-existing integration NoneIntegration integrationType = iota // AWS Config integration type AwsCfgIntegration // AWS CloudTrail integration type AwsCloudTrailIntegration // GCP Config integration type GcpCfgIntegration // GCP Audit Log integration type GcpAuditLogIntegration // Azure Config integration type AzureCfgIntegration // Azure Activity Log integration type AzureActivityLogIntegration // Container registry integration type ContainerRegistryIntegration // Slack channel integration type SlackChannelIntegration // AWS CloudWatch integration type AwsCloudWatchIntegration // Pager Duty integration type PagerDutyIntegration // Jira integration type JiraIntegration )
const ( // type that defines a non-existing registry NoneRegistry registryType = iota DockerHubRegistry DockerV2Registry EcrRegistry GcrRegistry )
const ( // Project level integration with GCP GcpProjectIntegration gcpResourceLevel = iota // Organization level integration with GCP GcpOrganizationIntegration )
const DefaultTokenExpiryTime = 3600
const Version = "0.2.7"
Version is the semver coming from the VERSION file
Variables ¶
var AlertLevels = map[AlertLevel]string{ CriticalAlertLevel: "Critical", HighAlertLevel: "High", MediumAlertLevel: "Medium", LowAlertLevel: "Low", AllAlertLevel: "All", }
AlertLevels is the list of available alert levels
var IntegrationTypes = map[integrationType]string{ NoneIntegration: "NONE", AwsCfgIntegration: "AWS_CFG", AwsCloudTrailIntegration: "AWS_CT_SQS", GcpCfgIntegration: "GCP_CFG", GcpAuditLogIntegration: "GCP_AT_SES", AzureCfgIntegration: "AZURE_CFG", AzureActivityLogIntegration: "AZURE_AL_SEQ", ContainerRegistryIntegration: "CONT_VULN_CFG", SlackChannelIntegration: "SLACK_CHANNEL", AwsCloudWatchIntegration: "CLOUDWATCH_EB", PagerDutyIntegration: "PAGER_DUTY_API", JiraIntegration: "JIRA", }
IntegrationTypes is the list of available integration types
var RegistryTypes = map[registryType]string{ NoneRegistry: "NONE", DockerHubRegistry: "DOCKERHUB", DockerV2Registry: "V2_REGISTRY", EcrRegistry: "AWS_ECR", GcrRegistry: "GCP_GCR", }
RegistryTypes is the list of available registry types
var ValidEventSeverities = []string{"critical", "high", "medium", "low", "info"}
ValidEventSeverities is a list of all valid event severities
var ValidVulnSeverities = []string{"critical", "high", "medium", "low", "info"}
ValidVulnSeverities is a list of all valid severities in a vulnerability report
Functions ¶
func FindIntegrationType ¶
FindIntegrationType looks up inside the list of available integration types the matching type from the provided string, if none, returns NoneIntegration
Types ¶
type AlertLevel ¶ added in v0.1.22
type AlertLevel int
Enum for Alert Severity Levels
const ( CriticalAlertLevel AlertLevel = 1 // Critical only HighAlertLevel AlertLevel = 2 // High and above MediumAlertLevel AlertLevel = 3 // Medium and above LowAlertLevel AlertLevel = 4 // Low and above AllAlertLevel AlertLevel = 5 // Info and above (which is All of them) )
func (AlertLevel) Int ¶ added in v0.1.22
func (i AlertLevel) Int() int
Int returns the int representation of an alert level
func (AlertLevel) String ¶ added in v0.1.22
func (i AlertLevel) String() string
String returns the string representation of an alert level
func (AlertLevel) Valid ¶ added in v0.1.22
func (i AlertLevel) Valid() bool
Valid returns whether the AlertLevel is valid or not
type AwsCloudWatchAlertChannel ¶ added in v0.1.22
type AwsCloudWatchAlertChannel struct { Data AwsCloudWatchData `json:"DATA"` // contains filtered or unexported fields }
func NewAwsCloudWatchAlertChannel ¶ added in v0.1.22
func NewAwsCloudWatchAlertChannel(name string, data AwsCloudWatchData) AwsCloudWatchAlertChannel
NewAwsCloudWatchAlertChannel returns an instance of AwsCloudWatchAlertChannel with the provided name and data.
Basic usage: Initialize a new AwsCloudWatchAlertChannel struct, then
use the new instance to do CRUD operations client, err := api.NewClient("account") if err != nil { return err } awsCloudWatch := api.NewAwsCloudWatchAlertChannel("foo", api.AwsCloudWatchData{ EventBusArn: "arn:aws:events:us-west-2:1234567890:event-bus/default", }, ) client.Integrations.CreateAwsCloudWatchAlertChannel(awsCloudWatch)
func (AwsCloudWatchAlertChannel) StateString ¶ added in v0.1.22
func (c AwsCloudWatchAlertChannel) StateString() string
type AwsCloudWatchData ¶ added in v0.1.22
type AwsCloudWatchResponse ¶ added in v0.1.22
type AwsCloudWatchResponse struct { Data []AwsCloudWatchAlertChannel `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type AwsEcrCreds ¶ added in v0.2.1
type AwsEcrData ¶ added in v0.2.1
type AwsEcrData struct { Credentials AwsEcrCreds `json:"ACCESS_KEY_CREDENTIALS" mapstructure:"ACCESS_KEY_CREDENTIALS"` RegistryType string `json:"REGISTRY_TYPE" mapstructure:"REGISTRY_TYPE"` RegistryDomain string `json:"REGISTRY_DOMAIN" mapstructure:"REGISTRY_DOMAIN"` LimitByTag string `json:"LIMIT_BY_TAG" mapstructure:"LIMIT_BY_TAG"` LimitByLabel string `json:"LIMIT_BY_LABEL" mapstructure:"LIMIT_BY_LABEL"` LimitByRep string `json:"LIMIT_BY_REP,omitempty" mapstructure:"LIMIT_BY_REP"` LimitNumImg int `json:"LIMIT_NUM_IMG,omitempty" mapstructure:"LIMIT_NUM_IMG"` }
type AwsEcrIntegration ¶ added in v0.2.1
type AwsEcrIntegration struct { Data AwsEcrData `json:"DATA"` // contains filtered or unexported fields }
For AWS_ECR registry
func NewAwsEcrRegistryIntegration ¶ added in v0.2.1
func NewAwsEcrRegistryIntegration(name string, data AwsEcrData) AwsEcrIntegration
func (AwsEcrIntegration) StateString ¶ added in v0.2.1
func (c AwsEcrIntegration) StateString() string
type AwsEcrResponse ¶ added in v0.2.1
type AwsEcrResponse struct { Data []AwsEcrIntegration `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type AwsIntegration ¶
type AwsIntegration struct { Data AwsIntegrationData `json:"DATA"` // contains filtered or unexported fields }
func NewAwsCfgIntegration ¶
func NewAwsCfgIntegration(name string, data AwsIntegrationData) AwsIntegration
NewAwsCfgIntegration returns an instance of AwsIntegration of type AWS_CFG
func NewAwsCloudTrailIntegration ¶
func NewAwsCloudTrailIntegration(name string, data AwsIntegrationData) AwsIntegration
NewAwsCloudTrailIntegration returns an instance of AwsIntegration of type AWS_CT_SQS
func NewAwsIntegration ¶
func NewAwsIntegration(name string, iType integrationType, data AwsIntegrationData) AwsIntegration
NewAwsIntegration returns an instance of AwsIntegration with the provided integration type, name and data. The type can only be AwsCfgIntegration or AwsCloudTrailIntegration
Basic usage: Initialize a new AwsIntegration struct, then
use the new instance to do CRUD operations client, err := api.NewClient("account") if err != nil { return err } aws := api.NewAwsIntegration("foo", api.AwsCfgIntegration, api.AwsIntegrationData{ Credentials: api.AwsIntegrationCreds { RoleArn: "arn:aws:XYZ", ExternalID: "1", }, }, ) client.Integrations.CreateAws(aws)
func (AwsIntegration) StateString ¶ added in v0.1.7
func (c AwsIntegration) StateString() string
type AwsIntegrationCreds ¶
type AwsIntegrationData ¶
type AwsIntegrationData struct { Credentials AwsIntegrationCreds `json:"CROSS_ACCOUNT_CREDENTIALS" mapstructure:"CROSS_ACCOUNT_CREDENTIALS"` // QueueUrl is a field that exists and is required for the AWS_CT_SQS integration, // though, it doesn't exist for AWS_CFG integrations, that's why we omit it if empty QueueUrl string `json:"QUEUE_URL,omitempty" mapstructure:"QUEUE_URL"` }
type AwsIntegrationsResponse ¶
type AwsIntegrationsResponse struct { Data []AwsIntegration `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type AzureIntegration ¶
type AzureIntegration struct { Data AzureIntegrationData `json:"DATA"` // contains filtered or unexported fields }
func NewAzureActivityLogIntegration ¶
func NewAzureActivityLogIntegration(name string, data AzureIntegrationData) AzureIntegration
NewAzureActivityLogIntegration returns an instance of AzureIntegration of type AZURE_AL_SEQ
func NewAzureCfgIntegration ¶
func NewAzureCfgIntegration(name string, data AzureIntegrationData) AzureIntegration
NewAzureCfgIntegration returns an instance of AzureIntegration of type AZURE_CFG
func NewAzureIntegration ¶
func NewAzureIntegration(name string, iType integrationType, data AzureIntegrationData) AzureIntegration
NewAzureIntegration returns an instance of AzureIntegration with the provided integration type, name and data. The type can only be AzureCfgIntegration or AzureActivityLogIntegration
Basic usage: Initialize a new AzureIntegration struct, then
use the new instance to do CRUD operations client, err := api.NewClient("account") if err != nil { return err } azure := api.NewAzureIntegration("bar", api.AzureActivityLogIntegration, api.AzureIntegrationData{ TenantID: "tenant_id", QueueUrl: "https://abc.queue.core.windows.net/123", Credentials: api.AzureIntegrationCreds{ ClientID: "client_id", ClientSecret: "secret", }, }, ) if err != nil { return err } client.Integrations.CreateAzure(azure)
func (AzureIntegration) StateString ¶ added in v0.1.7
func (c AzureIntegration) StateString() string
type AzureIntegrationCreds ¶
type AzureIntegrationData ¶
type AzureIntegrationData struct { Credentials AzureIntegrationCreds `json:"CREDENTIALS" mapstructure:"CREDENTIALS"` TenantID string `json:"TENANT_ID" mapstructure:"TENANT_ID"` // QueueUrl is a field that exists and is required for the AWS_CT_SQS integration, // though, it doesn't exist for AZURE_CFG integrations, that's why we omit it if empty QueueUrl string `json:"QUEUE_URL,omitempty" mapstructure:"QUEUE_URL"` }
type AzureIntegrationsResponse ¶
type AzureIntegrationsResponse struct { Data []AzureIntegration `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type Client ¶
type Client struct { LQL *LQLService Events *EventsService Compliance *ComplianceService Integrations *IntegrationsService Vulnerabilities *VulnerabilitiesService // contains filtered or unexported fields }
func NewClient ¶
New generates a new Lacework API client
Example of basic usage
lacework, err := api.NewClient("demo") if err == nil { lacework.Integrations.List() }
func (*Client) ApiVersion ¶
ApiVersion returns the API client version
func (*Client) DoDecoder ¶
DoDecoder is used to execute (aka Do) the http request and decode it into the provided interface, all at once
func (*Client) GenerateToken ¶
func (c *Client) GenerateToken() (response TokenResponse, err error)
GenerateToken generates a new access token
func (*Client) GenerateTokenWithKeys ¶
func (c *Client) GenerateTokenWithKeys(keyID, secretKey string) (TokenResponse, error)
GenerateTokenWithKeys generates a new access token with the provided keys
func (*Client) NewRequest ¶
NewRequest generates a new http request
func (*Client) RequestDecoder ¶
RequestDecoder performs an http request on an endpoint, and decodes the response into the provided interface, all at once
func (*Client) RequestEncoderDecoder ¶ added in v0.1.3
RequestEncoderDecoder leverages RequestDecoder and performs an http request that first encodes the provider 'data' as a JSON Reader and passes it as the body to the request
type CompAzureSubscriptions ¶ added in v0.1.12
type CompGcpProjects ¶ added in v0.1.12
type ComplianceAwsReport ¶ added in v0.1.12
type ComplianceAwsReport struct { ReportTitle string `json:"reportTitle"` ReportType string `json:"reportType"` ReportTime time.Time `json:"reportTime"` AccountID string `json:"accountId"` AccountAlias string `json:"accountAlias"` Summary []ComplianceSummary `json:"summary"` Recommendations []ComplianceRecommendation `json:"recommendations"` }
type ComplianceAwsReportConfig ¶ added in v0.1.12
type ComplianceAzureReport ¶ added in v0.1.12
type ComplianceAzureReport struct { ReportTitle string `json:"reportTitle"` ReportType string `json:"reportType"` ReportTime time.Time `json:"reportTime"` TenantID string `json:"tenantId"` TenantName string `json:"tenantName"` SubscriptionID string `json:"subscriptionId"` SubscriptionName string `json:"subscriptionName"` Summary []ComplianceSummary `json:"summary"` Recommendations []ComplianceRecommendation `json:"recommendations"` }
type ComplianceAzureReportConfig ¶ added in v0.1.12
type ComplianceGcpReport ¶ added in v0.1.12
type ComplianceGcpReport struct { ReportTitle string `json:"reportTitle"` ReportType string `json:"reportType"` ReportTime time.Time `json:"reportTime"` OrganizationID string `json:"organizationId"` OrganizationName string `json:"organizationName"` ProjectID string `json:"projectId"` ProjectName string `json:"projectName"` Summary []ComplianceSummary `json:"summary"` Recommendations []ComplianceRecommendation `json:"recommendations"` }
type ComplianceGcpReportConfig ¶ added in v0.1.12
type ComplianceRecommendation ¶ added in v0.1.12
type ComplianceRecommendation struct { RecID string `json:"rec_id"` AssessedResourceCount int `json:"assessed_resource_count"` ResourceCount int `json:"resource_count"` Category string `json:"category"` InfoLink string `json:"info_link"` Service string `json:"service"` Severity int `json:"severity"` Status string `json:"status"` Suppressions []string `json:"suppressions"` Title string `json:"title"` Violations []ComplianceViolation `json:"violations"` }
func (*ComplianceRecommendation) SeverityString ¶ added in v0.1.12
func (r *ComplianceRecommendation) SeverityString() string
type ComplianceService ¶ added in v0.1.12
type ComplianceService struct {
// contains filtered or unexported fields
}
ComplianceService is a service that interacts with the compliance endpoints from the Lacework Server
func (*ComplianceService) DownloadAwsReportPDF ¶ added in v0.1.12
func (svc *ComplianceService) DownloadAwsReportPDF(filepath string, config ComplianceAwsReportConfig) error
func (*ComplianceService) DownloadAzureReportPDF ¶ added in v0.1.12
func (svc *ComplianceService) DownloadAzureReportPDF(filepath string, config ComplianceAzureReportConfig) error
func (*ComplianceService) DownloadGcpReportPDF ¶ added in v0.1.12
func (svc *ComplianceService) DownloadGcpReportPDF(filepath string, config ComplianceGcpReportConfig) error
func (*ComplianceService) GetAwsReport ¶ added in v0.1.12
func (svc *ComplianceService) GetAwsReport(config ComplianceAwsReportConfig) ( response complianceAwsReportResponse, err error, )
func (*ComplianceService) GetAzureReport ¶ added in v0.1.12
func (svc *ComplianceService) GetAzureReport(config ComplianceAzureReportConfig) ( response complianceAzureReportResponse, err error, )
func (*ComplianceService) GetGcpReport ¶ added in v0.1.12
func (svc *ComplianceService) GetGcpReport(config ComplianceGcpReportConfig) ( response complianceGcpReportResponse, err error, )
func (*ComplianceService) ListAzureSubscriptions ¶ added in v0.1.12
func (svc *ComplianceService) ListAzureSubscriptions(tenantID string) ( response compAzureSubsResponse, err error, )
func (*ComplianceService) ListGcpProjects ¶ added in v0.1.12
func (svc *ComplianceService) ListGcpProjects(orgID string) ( response compGcpProjectsResponse, err error, )
func (*ComplianceService) RunAwsReport ¶ added in v0.1.12
func (svc *ComplianceService) RunAwsReport(accountID string) ( response map[string]interface{}, err error, )
func (*ComplianceService) RunAzureReport ¶ added in v0.1.12
func (svc *ComplianceService) RunAzureReport(tenantID string) ( response complianceRunAzureReportResponse, err error, )
func (*ComplianceService) RunGcpReport ¶ added in v0.1.12
func (svc *ComplianceService) RunGcpReport(projectID string) ( response complianceRunGcpReportResponse, err error, )
func (*ComplianceService) RunIntegrationReport ¶ added in v0.2.6
func (svc *ComplianceService) RunIntegrationReport(intgGuid string) ( response map[string]interface{}, err error, )
type ComplianceSummary ¶ added in v0.1.12
type ComplianceSummary struct { AssessedResourceCount int `json:"assessed_resource_count"` NumCompliant int `json:"num_compliant"` NumNotCompliant int `json:"num_not_compliant"` NumRecommendations int `json:"num_recommendations"` NumSeverity1NonCompliance int `json:"num_severity_1_non_compliance"` NumSeverity2NonCompliance int `json:"num_severity_2_non_compliance"` NumSeverity3NonCompliance int `json:"num_severity_3_non_compliance"` NumSeverity4NonCompliance int `json:"num_severity_4_non_compliance"` NumSeverity5NonCompliance int `json:"num_severity_5_non_compliance"` NumSuppressed int `json:"num_suppressed"` SuppressedResourceCount int `json:"suppressed_resource_count"` ViolatedResourceCount int `json:"violated_resource_count"` }
type ComplianceViolation ¶ added in v0.1.12
type ContainerRegCreds ¶ added in v0.1.9
type ContainerRegCreds struct { // for docker hub registry (DOCKERHUB) Username string `json:"USERNAME,omitempty" mapstructure:"USERNAME"` Password string `json:"PASSWORD,omitempty" mapstructure:"PASSWORD"` // for docker V2 registry (V2_REGISTRY) SSL bool `json:"SSL,omitempty" mapstructure:"SSL"` // for GCR registry (GCP_GCR) ClientEmail string `json:"CLIENT_EMAIL,omitempty" mapstructure:"CLIENT_EMAIL"` ClientID string `json:"CLIENT_ID,omitempty" mapstructure:"CLIENT_ID"` PrivateKey string `json:"PRIVATE_KEY,omitempty" mapstructure:"PRIVATE_KEY"` PrivateKeyID string `json:"PRIVATE_KEY_ID,omitempty" mapstructure:"PRIVATE_KEY_ID"` }
type ContainerRegData ¶ added in v0.1.9
type ContainerRegData struct { // @afiune the container registry schema contains a few different DATA types, // and because of that we are adding ALL fields that we could possibly have // for ALL container registry types (look at the variable RegistryTypes) with // the exception of AWS_ECR, this integration has a different credentials field // and because of that we have to define it separately Credentials ContainerRegCreds `json:"CREDENTIALS" mapstructure:"CREDENTIALS"` RegistryType string `json:"REGISTRY_TYPE" mapstructure:"REGISTRY_TYPE"` // for GCP_GCR integrations, the registry domain has to be one of: // => [ "gcr.io", "us.gcr.io", "eu.gcr.io", "asia.gcr.io" ] RegistryDomain string `json:"REGISTRY_DOMAIN" mapstructure:"REGISTRY_DOMAIN"` LimitByTag string `json:"LIMIT_BY_TAG" mapstructure:"LIMIT_BY_TAG"` LimitByLabel string `json:"LIMIT_BY_LABEL" mapstructure:"LIMIT_BY_LABEL"` LimitByRep string `json:"LIMIT_BY_REP,omitempty" mapstructure:"LIMIT_BY_REP"` LimitNumImg int `json:"LIMIT_NUM_IMG,omitempty" mapstructure:"LIMIT_NUM_IMG"` }
type ContainerRegIntResponse ¶ added in v0.1.9
type ContainerRegIntResponse struct { Data []ContainerRegIntegration `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type ContainerRegIntegration ¶ added in v0.1.9
type ContainerRegIntegration struct { Data ContainerRegData `json:"DATA"` // contains filtered or unexported fields }
func NewContainerRegIntegration ¶ added in v0.1.9
func NewContainerRegIntegration(name string, data ContainerRegData) ContainerRegIntegration
NewContainerRegIntegration returns an instance of ContainerRegIntegration with the provided name and data.
Basic usage: Create a Docker Hub integration
client, err := api.NewClient("account") if err != nil { return err } docker := api.NewContainerRegIntegration("foo", api.ContainerRegData{ Credentials: api.ContainerRegCreds { Username: "techally", Password: "secret", }, RegistryType: api.DockerHubRegistry.String(), RegistryDomain: "index.docker.io", LimitByTag: "*", LimitByLabel: "*", LimitNumImg: "5", }, ) client.Integrations.CreateContainerRegistry(docker)
func NewDockerHubRegistryIntegration ¶ added in v0.2.1
func NewDockerHubRegistryIntegration(name string, data ContainerRegData) ContainerRegIntegration
func NewDockerV2RegistryIntegration ¶ added in v0.2.1
func NewDockerV2RegistryIntegration(name string, data ContainerRegData) ContainerRegIntegration
func NewGcrRegistryIntegration ¶ added in v0.2.1
func NewGcrRegistryIntegration(name string, data ContainerRegData) ContainerRegIntegration
func (ContainerRegIntegration) StateString ¶ added in v0.1.9
func (c ContainerRegIntegration) StateString() string
type ContainerVulnerabilityService ¶ added in v0.2.0
type ContainerVulnerabilityService struct {
// contains filtered or unexported fields
}
ContainerVulnerabilityService is a service that interacts with the vulnerabilities endpoints for the container space from the Lacework Server
func (*ContainerVulnerabilityService) AssessmentFromImageDigest ¶ added in v0.2.0
func (svc *ContainerVulnerabilityService) AssessmentFromImageDigest(imageDigest string) ( response VulnContainerAssessmentResponse, err error, )
ListAssessments leverages ListAssessmentsDateRange and returns a list of assessments from the last 7 days
func (*ContainerVulnerabilityService) AssessmentFromImageID ¶ added in v0.2.0
func (svc *ContainerVulnerabilityService) AssessmentFromImageID(imageID string) ( response VulnContainerAssessmentResponse, err error, )
func (*ContainerVulnerabilityService) ListAssessments ¶ added in v0.2.0
func (svc *ContainerVulnerabilityService) ListAssessments() (VulnContainerAssessmentsResponse, error)
ListAssessments leverages ListAssessmentsDateRange and returns a list of assessments from the last 7 days
func (*ContainerVulnerabilityService) ListAssessmentsDateRange ¶ added in v0.2.0
func (svc *ContainerVulnerabilityService) ListAssessmentsDateRange(start, end time.Time) ( response VulnContainerAssessmentsResponse, err error, )
ListAssessmentsDateRange returns a list of container assessments during the specified date range
func (*ContainerVulnerabilityService) Scan ¶ added in v0.2.0
func (svc *ContainerVulnerabilityService) Scan(registry, repository, tagOrHash string) ( response vulnContainerScanResponse, err error, )
Scan triggers a container vulnerability scan to the provider registry, repository, and tag provided. This function calls the underlaying API endpoint that assumes that the container repository has been already integrated with the platform.
func (*ContainerVulnerabilityService) ScanStatus ¶ added in v0.2.0
func (svc *ContainerVulnerabilityService) ScanStatus(requestID string) ( response vulnContainerScanStatusResponse, err error, )
type Event ¶ added in v0.1.6
type Event struct { EventID string `json:"event_id"` EventType string `json:"event_type"` Severity string `json:"severity"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` }
func (*Event) SeverityString ¶ added in v0.1.6
type EventAPIEntity ¶ added in v0.1.11
type EventApplicationEntity ¶ added in v0.1.11
type EventCTUserEntity ¶ added in v0.1.11
type EventContainerEntity ¶ added in v0.1.11
type EventContainerEntity struct { ImageRepo string `json:"image_repo"` ImageTag string `json:"image_tag"` HasExternalConns int32 `json:"has_external_conns"` IsClient int32 `json:"is_client"` IsServer int32 `json:"is_server"` FirstSeenTime time.Time `json:"first_seen_time"` PodNamespace string `json:"pod_namespace"` PodIpAddr string `json:"pod_ip_addr"` }
type EventCustomRuleEntity ¶ added in v0.1.11
type EventDetails ¶ added in v0.1.6
type EventDetailsResponse ¶ added in v0.1.6
type EventDetailsResponse struct {
Events []EventDetails `json:"data"`
}
type EventDnsNameEntity ¶ added in v0.1.11
type EventEntityMap ¶ added in v0.1.6
type EventEntityMap struct { User []EventUserEntity `json:"user,omitempty"` Application []EventApplicationEntity `json:"application,omitempty"` Machine []EventMachineEntity `json:"machine,omitempty"` Container []EventContainerEntity `json:"container,omitempty"` DnsName []EventDnsNameEntity `json:"DnsName,omitempty"` // @afiune not in standard IpAddress []EventIpAddressEntity `json:"IpAddress,omitempty"` // @afiune not in standard Process []EventProcessEntity `json:"process,omitempty"` FileDataHash []EventFileDataHashEntity `json:"FileDataHash,omitempty"` // @afiune not in standard FileExePath []EventFileExePathEntity `json:"FileExePath,omitempty"` // @afiune not in standard SourceIpAddress []EventSourceIpAddressEntity `json:"SourceIpAddress,omitempty"` // @afiune not in standard API []EventAPIEntity `json:"api,omitempty"` Region []EventRegionEntity `json:"region,omitempty"` CTUser []EventCTUserEntity `json:"ct_user,omitempty"` Resource []EventResourceEntity `json:"resource,omitempty"` RecID []EventRecIDEntity `json:"RecId,omitempty"` // @afiune not in standard CustomRule []EventCustomRuleEntity `json:"CustomRule,omitempty"` // @afiune not in standard NewViolation []EventNewViolationEntity `json:"NewViolation,omitempty"` // @afiune not in standard ViolationReason []EventViolationReasonEntity `json:"ViolationReason,omitempty"` // @afiune not in standard }
type EventFileDataHashEntity ¶ added in v0.1.11
type EventFileExePathEntity ¶ added in v0.1.11
type EventFileExePathEntity struct { ExePath string `json:"exe_path"` FirstSeenTime time.Time `json:"first_seen_time"` LastFiledataHash string `json:"last_filedata_hash"` LastPackageName string `json:"last_package_name"` LastVersion string `json:"last_version"` LastFileOwner string `json:"last_file_owner"` }
type EventIpAddressEntity ¶ added in v0.1.11
type EventIpAddressEntity struct { IpAddress string `json:"ip_address"` TotalInBytes float32 `json:"total_in_bytes"` TotalOutBytes float32 `json:"total_out_bytes"` ThreatTags string `json:"threat_tags"` ThreatSource []interface{} `json:"threat_source"` // @afiune this field could be anything... Country string `json:"country"` Region string `json:"region"` PortList []int32 `json:"port_list"` FirstSeenTime time.Time `json:"first_seen_time"` }
type EventMachineEntity ¶ added in v0.1.11
type EventNewViolationEntity ¶ added in v0.1.11
type EventProcessEntity ¶ added in v0.1.11
type EventRecIDEntity ¶ added in v0.1.11
type EventRegionEntity ¶ added in v0.1.11
type EventResourceEntity ¶ added in v0.1.11
type EventResourceEntity struct { Name string `json:"name"` // @afiune the API documentation says this field is a string, but there are // many events that has this field as a number, boolean, etc. :sadpanda: Value interface{} `json:"value"` }
type EventSourceIpAddressEntity ¶ added in v0.1.11
type EventUserEntity ¶ added in v0.1.11
type EventViolationReasonEntity ¶ added in v0.1.11
type EventsCount ¶ added in v0.1.6
type EventsResponse ¶ added in v0.1.6
type EventsResponse struct {
Events []Event `json:"data"`
}
func (*EventsResponse) GetEventsCount ¶ added in v0.1.6
func (er *EventsResponse) GetEventsCount() EventsCount
type EventsService ¶ added in v0.1.6
type EventsService struct {
// contains filtered or unexported fields
}
EventsService is a service that interacts with the Events endpoints from the Lacework Server
func (*EventsService) Details ¶ added in v0.1.6
func (svc *EventsService) Details(eventID string) (response EventDetailsResponse, err error)
Details returns details about the specified event_id
func (*EventsService) List ¶ added in v0.1.6
func (svc *EventsService) List() (EventsResponse, error)
List leverages ListDateRange and returns a list of events from the last 7 days
func (*EventsService) ListDateRange ¶ added in v0.1.21
func (svc *EventsService) ListDateRange(start, end time.Time) ( response EventsResponse, err error, )
ListDateRange returns a list of Lacework events during the specified date range
Requirements and specifications: * The dates format should be: yyyy-MM-ddTHH:mm:ssZ (example 2019-07-11T21:11:00Z) * The START_TIME and END_TIME must be specified in UTC * The difference between the START_TIME and END_TIME must not be greater than 7 days * The START_TIME must be less than or equal to three months from current date * The number of records produced is limited to 5000
func (*EventsService) ListRange ¶ added in v0.1.6
func (svc *EventsService) ListRange(start, end time.Time) (EventsResponse, error)
TODO @afiune (to-be-deprecated) https://github.com/lacework/go-sdk/issues/161
type GcpCredentials ¶
type GcpIntegration ¶
type GcpIntegration struct { Data GcpIntegrationData `json:"DATA"` // contains filtered or unexported fields }
func NewGcpAuditLogIntegration ¶
func NewGcpAuditLogIntegration(name string, data GcpIntegrationData) GcpIntegration
NewGcpAuditLogIntegration returns an instance of GcpIntegration of type GCP_AT_SES
func NewGcpCfgIntegration ¶
func NewGcpCfgIntegration(name string, data GcpIntegrationData) GcpIntegration
NewGcpCfgIntegration returns an instance of GcpIntegration of type GCP_CFG
func NewGcpIntegration ¶
func NewGcpIntegration(name string, iType integrationType, data GcpIntegrationData) GcpIntegration
NewGcpIntegration returns an instance of GcpIntegration with the provided integration type, name and data. The type can only be GcpCfgIntegration or GcpAuditLogIntegration
Basic usage: Initialize a new GcpIntegration struct, then
use the new instance to do CRUD operations client, err := api.NewClient("account") if err != nil { return err } gcp := api.NewGcpIntegration("abc", api.GcpCfgIntegration, api.GcpIntegrationData{ ID: "1234", IDType: api.GcpProjectIntegration.String(), Credentials: api.GcpCredentials{ ClientID: "id", ClientEmail: "email", PrivateKeyID: "key_id", PrivateKey: "key", }, }, ) client.Integrations.CreateGcp(gcp)
func (GcpIntegration) StateString ¶ added in v0.1.7
func (c GcpIntegration) StateString() string
type GcpIntegrationData ¶
type GcpIntegrationData struct { ID string `json:"ID"` IDType string `json:"ID_TYPE" mapstructure:"ID_TYPE"` Credentials GcpCredentials `json:"CREDENTIALS" mapstructure:"CREDENTIALS"` // SubscriptionName is a field that exists and is required for the GCP_AT_SES // integration, though, it doesn't exist for GCP_CFG integrations, that's why // we omit it if empty SubscriptionName string `json:"SUBSCRIPTION_NAME,omitempty" mapstructure:"SUBSCRIPTION_NAME"` }
type GcpIntegrationsResponse ¶
type GcpIntegrationsResponse struct { Data []GcpIntegration `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type HostScanPackageVulnDetails ¶ added in v0.2.2
type HostScanPackageVulnDetails struct { CVEProps struct { CveBatchID string `json:"cve_batch_id"` Description string `json:"description"` Link string `json:"link"` Metadata struct { NVD struct { CVSSv2 struct { PublishedDateTime string `json:"PublishedDateTime"` Score float64 `json:"Score"` Vectors string `json:"Vectors"` } `json:"CVSSv2"` CVSSv3 struct { ExploitabilityScore float64 `json:"ExploitabilityScore"` ImpactScore float64 `json:"ImpactScore"` Score float64 `json:"Score"` Vectors string `json:"Vectors"` } `json:"CVSSv3"` } `json:"NVD"` } `json:"metadata"` } `json:"CVE_PROPS"` FeatureKey struct { Name string `json:"name"` Namespace string `json:"namespace"` } `json:"FEATURE_KEY"` FixInfo struct { CompareResult int `json:"compare_result"` EvalStatus string `json:"eval_status"` FixAvailable int `json:"fix_available"` FixedVersion string `json:"fixed_version"` FixedVersionComparisonInfos []struct { CurrFixVer string `json:"curr_fix_ver"` IsCurrFixVerGreaterThanOtherFixVer string `json:"is_curr_fix_ver_greater_than_other_fix_ver"` OtherFixVer string `json:"other_fix_ver"` } `json:"fixed_version_comparison_infos"` FixedVersionComparisonScore int `json:"fixed_version_comparison_score"` MaxPrefixMatchingLenScore int `json:"max_prefix_matching_len_score"` VersionInstalled string `json:"version_installed"` } `json:"FIX_INFO"` OsPkgInfo struct { Namespace string `json:"namespace"` Os string `json:"os"` OsVer string `json:"os_ver"` Pkg string `json:"pkg"` PkgVer string `json:"pkg_ver"` VersionFormat string `json:"version_format"` } `json:"OS_PKG_INFO"` Props struct { EvalAlgo string `json:"eval_algo"` } `json:"PROPS"` Severity string `json:"SEVERITY"` Summary struct { EvalCreatedTime string `json:"eval_created_time"` EvalStatus string `json:"eval_status"` NumFixableVuln int `json:"num_fixable_vuln"` NumFixableVulnBySeverity struct { Num1 int `json:"1"` Num2 int `json:"2"` Num3 int `json:"3"` Num4 int `json:"4"` Num5 int `json:"5"` } `json:"num_fixable_vuln_by_severity"` NumTotal int `json:"num_total"` NumVuln int `json:"num_vuln"` NumVulnBySeverity struct { Num1 int `json:"1"` Num2 int `json:"2"` Num3 int `json:"3"` Num4 int `json:"4"` Num5 int `json:"5"` } `json:"num_vuln_by_severity"` } `json:"SUMMARY"` VulnID string `json:"VULN_ID"` }
func (*HostScanPackageVulnDetails) ScoreString ¶ added in v0.2.2
func (scanPkg *HostScanPackageVulnDetails) ScoreString() string
type HostVulnCVE ¶ added in v0.2.0
type HostVulnCVE struct { ID string `json:"cve_id"` Packages []HostVulnPackage `json:"packages"` Summary HostVulnCveSummary `json:"summary"` }
type HostVulnCounts ¶ added in v0.2.0
type HostVulnCveSummary ¶ added in v0.2.0
type HostVulnCveSummary struct { Severity HostVulnSeverityCounts `json:"severity"` TotalVulnerabilities int `json:"total_vulnerabilities"` LastEvaluationTime Json16DigitTime `json:"last_evaluation_time"` }
type HostVulnDetail ¶ added in v0.2.0
type HostVulnDetail struct { Details hostVulnHostDetail `json:"host"` Packages []HostVulnPackage `json:"packages"` Summary HostVulnCveSummary `json:"summary"` }
type HostVulnHostAssessment ¶ added in v0.2.0
type HostVulnHostAssessment struct { Host hostVulnHostDetail `json:"host"` CVEs []HostVulnCVE `json:"vulnerabilities"` }
func (*HostVulnHostAssessment) VulnerabilityCounts ¶ added in v0.2.0
func (assessment *HostVulnHostAssessment) VulnerabilityCounts() HostVulnCounts
type HostVulnPackage ¶ added in v0.2.0
type HostVulnPackage struct { Name string `json:"name"` Namespace string `json:"namespace"` Severity string `json:"severity"` Status string `json:"status,omitempty"` VulnerabilityStatus string `json:"vulnerabiliy_status,omitempty"` // @afiune typo Version string `json:"version"` HostCount string `json:"host_count"` PackageStatus string `json:"package_status"` CveLink string `json:"cve_link"` CvssScore string `json:"cvss_score"` CvssV2Score string `json:"cvss_v_2_score"` CvssV3Score string `json:"cvss_v_3_score"` //FirstSeenTime time.Time `json:"first_seen_time"` FixAvailable string `json:"fix_available"` FixedVersion string `json:"fixed_version"` }
type HostVulnScanPkgManifestResponse ¶ added in v0.2.3
type HostVulnScanPkgManifestResponse struct { Vulns []HostScanPackageVulnDetails `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
func (*HostVulnScanPkgManifestResponse) VulnerabilityCounts ¶ added in v0.2.3
func (scanPkgManifest *HostVulnScanPkgManifestResponse) VulnerabilityCounts() HostVulnCounts
type HostVulnSeverityCounts ¶ added in v0.2.0
type HostVulnSeverityCounts struct { Critical *hostVulnSeverityCountsDetails `json:"Critical"` High *hostVulnSeverityCountsDetails `json:"High"` Medium *hostVulnSeverityCountsDetails `json:"Medium"` Low *hostVulnSeverityCountsDetails `json:"Low"` Negligible *hostVulnSeverityCountsDetails `json:"Negligible"` }
func (*HostVulnSeverityCounts) VulnerabilityCounts ¶ added in v0.2.0
func (counts *HostVulnSeverityCounts) VulnerabilityCounts() HostVulnCounts
type HostVulnerabilityService ¶ added in v0.2.0
type HostVulnerabilityService struct {
// contains filtered or unexported fields
}
HostVulnerabilityService is a service that interacts with the vulnerabilities endpoints for the host space from the Lacework Server
func (*HostVulnerabilityService) GetHostAssessment ¶ added in v0.2.0
func (svc *HostVulnerabilityService) GetHostAssessment(id string) ( response hostVulnHostResponse, err error, )
func (*HostVulnerabilityService) ListCves ¶ added in v0.2.0
func (svc *HostVulnerabilityService) ListCves() ( response hostVulnListCvesResponse, err error, )
func (*HostVulnerabilityService) ListHostsWithCVE ¶ added in v0.2.0
func (svc *HostVulnerabilityService) ListHostsWithCVE(id string) ( response hostVulnListHostsResponse, err error, )
func (*HostVulnerabilityService) Scan ¶ added in v0.2.0
func (svc *HostVulnerabilityService) Scan(manifest string) ( response HostVulnScanPkgManifestResponse, err error, )
Scan requests an on-demand vulnerability assessment of your software packages to determine if the packages contain any common vulnerabilities and exposures
NOTE: Only packages managed by a package manager for supported OS's are reported
type IntegrationState ¶ added in v0.1.6
type IntegrationsService ¶
type IntegrationsService struct {
// contains filtered or unexported fields
}
IntegrationsService is a service that interacts with the integrations endpoints from the Lacework Server
func (*IntegrationsService) CreateAws ¶
func (svc *IntegrationsService) CreateAws(integration AwsIntegration) ( response AwsIntegrationsResponse, err error, )
CreateAws creates a single AWS integration on the Lacework Server
func (*IntegrationsService) CreateAwsCloudWatchAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) CreateAwsCloudWatchAlertChannel(integration AwsCloudWatchAlertChannel) ( response AwsCloudWatchResponse, err error, )
CreateAwsCloudWatchAlertChannel creates a AWS CloudWatch alert channel on the Lacework Server
func (*IntegrationsService) CreateAwsEcrRegistry ¶ added in v0.2.1
func (svc *IntegrationsService) CreateAwsEcrRegistry(integration AwsEcrIntegration) ( response AwsEcrResponse, err error, )
CreateAwsEcrRegistry creates an AWS_ECR integration on the Lacework Server
func (*IntegrationsService) CreateAzure ¶
func (svc *IntegrationsService) CreateAzure(integration AzureIntegration) ( response AzureIntegrationsResponse, err error, )
CreateAzure creates a single Azure integration on the Lacework Server
func (*IntegrationsService) CreateContainerRegistry ¶ added in v0.1.9
func (svc *IntegrationsService) CreateContainerRegistry(integration ContainerRegIntegration) ( response ContainerRegIntResponse, err error, )
CreateContainerRegistry creates a container registry integration on the Lacework Server
func (*IntegrationsService) CreateGcp ¶
func (svc *IntegrationsService) CreateGcp(data GcpIntegration) ( response GcpIntegrationsResponse, err error, )
CreateGcp creates a single Gcp integration on the Lacework Server
func (*IntegrationsService) CreateJiraAlertChannel ¶ added in v0.1.24
func (svc *IntegrationsService) CreateJiraAlertChannel(integration JiraAlertChannel) ( response JiraAlertChannelResponse, err error, )
CreateJiraAlertChannel creates a jira alert channel integration on the Lacework Server
func (*IntegrationsService) CreatePagerDutyAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) CreatePagerDutyAlertChannel(integration PagerDutyAlertChannel) ( response PagerDutyAlertChannelResponse, err error, )
CreatePagerDutyAlertChannel creates a pager duty alert channel integration on the Lacework Server
func (*IntegrationsService) CreateSlackAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) CreateSlackAlertChannel(integration SlackAlertChannel) ( response SlackAlertChannelResponse, err error, )
CreateSlackAlertChannel creates a slack alert channel integration on the Lacework Server
func (*IntegrationsService) Delete ¶
func (svc *IntegrationsService) Delete(guid string) ( response RawIntegrationsResponse, err error, )
Delete deletes a single integration matching the integration guid on the Lacework Server the returned integration contains the 'Data' field raw (map of interfaces)
func (*IntegrationsService) DeleteAws ¶
func (svc *IntegrationsService) DeleteAws(guid string) ( response AwsIntegrationsResponse, err error, )
DeleteAws deletes a single AWS integration matching the integration guid on the Lacework Server
func (*IntegrationsService) DeleteAzure ¶
func (svc *IntegrationsService) DeleteAzure(guid string) ( response AzureIntegrationsResponse, err error, )
DeleteAzure deletes a single Azure integration matching the integration on the Lacework Server
func (*IntegrationsService) DeleteGcp ¶
func (svc *IntegrationsService) DeleteGcp(guid string) ( response GcpIntegrationsResponse, err error, )
DeleteGcp deletes a single Gcp integration matching the integration guid on the Lacework Server
func (*IntegrationsService) Get ¶
func (svc *IntegrationsService) Get(guid string) ( response RawIntegrationsResponse, err error, )
Get gets a single integration matching the integration guid on the Lacework Server, the returned integration contains the 'Data' field raw (map of interfaces)
func (*IntegrationsService) GetAws ¶
func (svc *IntegrationsService) GetAws(guid string) ( response AwsIntegrationsResponse, err error, )
GetAws gets a single AWS integration matching the integration guid on the Lacework Server
func (*IntegrationsService) GetAwsCloudWatchAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) GetAwsCloudWatchAlertChannel(guid string) ( response AwsCloudWatchResponse, err error, )
GetAwsCloudWatchAlertChannel gets a AWS CloudWatch alert channel that matches with the provided integration guid on the Lacework Server
func (*IntegrationsService) GetAwsEcrRegistry ¶ added in v0.2.1
func (svc *IntegrationsService) GetAwsEcrRegistry(guid string) ( response AwsEcrResponse, err error, )
GetAwsEcrRegistry gets an AWS_ECR integration that matches with the provided integration guid on the Lacework Server
func (*IntegrationsService) GetAzure ¶
func (svc *IntegrationsService) GetAzure(guid string) ( response AzureIntegrationsResponse, err error, )
GetAzure gets a single Azure integration matching the integration guid on the Lacework Server
func (*IntegrationsService) GetContainerRegistry ¶ added in v0.1.22
func (svc *IntegrationsService) GetContainerRegistry(guid string) ( response ContainerRegIntResponse, err error, )
GetContainerRegistry gets a container registry integration that matches with the provided integration guid on the Lacework Server
func (*IntegrationsService) GetGcp ¶
func (svc *IntegrationsService) GetGcp(guid string) ( response GcpIntegrationsResponse, err error, )
GetGcp gets a single Gcp integration matching the integration guid on the Lacework Server
func (*IntegrationsService) GetJiraAlertChannel ¶ added in v0.1.24
func (svc *IntegrationsService) GetJiraAlertChannel(guid string) ( response JiraAlertChannelResponse, err error, )
GetJiraAlertChannel gets a jira alert channel integration that matches with the provided integration guid on the Lacework Server
func (*IntegrationsService) GetPagerDutyAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) GetPagerDutyAlertChannel(guid string) ( response PagerDutyAlertChannelResponse, err error, )
GetPagerDutyAlertChannel gets a pager duty alert channel integration that matches with the provided integration guid on the Lacework Server
func (*IntegrationsService) GetSchema ¶
func (svc *IntegrationsService) GetSchema(iType integrationType) ( response map[string]interface{}, err error, )
GetSchema get the integration schema for the provided integration type
func (*IntegrationsService) GetSlackAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) GetSlackAlertChannel(guid string) ( response SlackAlertChannelResponse, err error, )
GetSlackAlertChannel gets a slack alert channel integration that matches with the provided integration guid on the Lacework Server
func (*IntegrationsService) List ¶
func (svc *IntegrationsService) List() (response RawIntegrationsResponse, err error)
List lists the external integrations available on the Lacework Server
func (*IntegrationsService) ListAwsCfg ¶
func (svc *IntegrationsService) ListAwsCfg() (response AwsIntegrationsResponse, err error)
ListAwsCfg lists the AWS_CFG external integrations available on the Lacework Server
func (*IntegrationsService) ListAwsCloudTrail ¶
func (svc *IntegrationsService) ListAwsCloudTrail() (response AwsIntegrationsResponse, err error)
ListAwsCloudTrail lists the AWS_CT_SQS external integrations available on the Lacework Server
func (*IntegrationsService) ListAwsCloudWatchAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) ListAwsCloudWatchAlertChannel() (response AwsCloudWatchResponse, err error)
ListAwsCloudWatchAlertChannel lists the CLOUDWATCH_EB external integrations available on the Lacework Server
func (*IntegrationsService) ListAzureActivityLog ¶
func (svc *IntegrationsService) ListAzureActivityLog() ( response AzureIntegrationsResponse, err error, )
ListAzureActivityLog lists the AZURE_AL_SEQ external integrations available on the Lacework Server
func (*IntegrationsService) ListAzureCfg ¶
func (svc *IntegrationsService) ListAzureCfg() ( response AzureIntegrationsResponse, err error, )
ListAzureCfg lists the AZURE_CFG external integrations available on the Lacework Server
func (*IntegrationsService) ListByType ¶
func (svc *IntegrationsService) ListByType(iType integrationType) (response RawIntegrationsResponse, err error)
ListByType lists the external integrations from the provided type that are available on the Lacework Server
func (*IntegrationsService) ListGcpAuditLog ¶
func (svc *IntegrationsService) ListGcpAuditLog() (response GcpIntegrationsResponse, err error)
ListGcpAuditLog lists the GCP_AT_SES external integrations available on the Lacework Server
func (*IntegrationsService) ListGcpCfg ¶
func (svc *IntegrationsService) ListGcpCfg() (response GcpIntegrationsResponse, err error)
ListGcpCfg lists the GCP_CFG external integrations available on the Lacework Server
func (*IntegrationsService) ListJiraAlertChannel ¶ added in v0.1.24
func (svc *IntegrationsService) ListJiraAlertChannel() (response JiraAlertChannelResponse, err error)
ListJiraAlertChannel lists the JIRA external integrations available on the Lacework Server
func (*IntegrationsService) ListPagerDutyAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) ListPagerDutyAlertChannel() (response PagerDutyAlertChannelResponse, err error)
ListPagerDutyAlertChannel lists the PAGER_DUTY_API external integrations available on the Lacework Server
func (*IntegrationsService) ListSlackAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) ListSlackAlertChannel() (response SlackAlertChannelResponse, err error)
ListSlackAlertChannel lists the SLACK_CHANNEL external integrations available on the Lacework Server
func (*IntegrationsService) UpdateAws ¶
func (svc *IntegrationsService) UpdateAws(data AwsIntegration) ( response AwsIntegrationsResponse, err error, )
UpdateAws updates a single AWS integration on the Lacework Server
func (*IntegrationsService) UpdateAwsCloudWatchAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) UpdateAwsCloudWatchAlertChannel(data AwsCloudWatchAlertChannel) ( response AwsCloudWatchResponse, err error, )
UpdateAwsCloudWatchAlertChannel updates a single AWS CloudWatch alert channel
func (*IntegrationsService) UpdateAwsEcrRegistry ¶ added in v0.2.1
func (svc *IntegrationsService) UpdateAwsEcrRegistry(integration AwsEcrIntegration) ( response AwsEcrResponse, err error, )
UpdateAwsEcrRegistry updates a single AWS_ECR integration
func (*IntegrationsService) UpdateAzure ¶
func (svc *IntegrationsService) UpdateAzure(data AzureIntegration) ( response AzureIntegrationsResponse, err error, )
UpdateAzure updates a single Azure integration on the Lacework Server
func (*IntegrationsService) UpdateContainerRegistry ¶ added in v0.1.22
func (svc *IntegrationsService) UpdateContainerRegistry(integration ContainerRegIntegration) ( response ContainerRegIntResponse, err error, )
UpdateContainerRegistry updates a single container registry integration
func (*IntegrationsService) UpdateGcp ¶
func (svc *IntegrationsService) UpdateGcp(data GcpIntegration) ( response GcpIntegrationsResponse, err error, )
UpdateGcp updates a single Gcp integration on the Lacework Server
func (*IntegrationsService) UpdateJiraAlertChannel ¶ added in v0.1.24
func (svc *IntegrationsService) UpdateJiraAlertChannel(data JiraAlertChannel) ( response JiraAlertChannelResponse, err error, )
UpdateJiraAlertChannel updates a single jira alert channel integration
func (*IntegrationsService) UpdatePagerDutyAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) UpdatePagerDutyAlertChannel(data PagerDutyAlertChannel) ( response PagerDutyAlertChannelResponse, err error, )
UpdatePagerDutyAlertChannel updates a single pager duty alert channel integration
func (*IntegrationsService) UpdateSlackAlertChannel ¶ added in v0.1.22
func (svc *IntegrationsService) UpdateSlackAlertChannel(data SlackAlertChannel) ( response SlackAlertChannelResponse, err error, )
UpdateSlackAlertChannel updates a single slack alert channel integration
type JiraAlertChannel ¶ added in v0.1.24
type JiraAlertChannel struct { Data JiraAlertChannelData `json:"DATA"` // contains filtered or unexported fields }
func NewJiraAlertChannel ¶ added in v0.1.24
func NewJiraAlertChannel(name string, data JiraAlertChannelData) JiraAlertChannel
NewJiraAlertChannel returns an instance of JiraAlertChannel with the provided name and data.
Basic usage: Initialize a new JiraAlertChannel struct, then
use the new instance to do CRUD operations client, err := api.NewClient("account") if err != nil { return err } jiraAlert := api.NewJiraAlertChannel("foo", api.JiraAlertChannelData{ JiraType: api.JiraCloudAlertType, JiraUrl: "mycompany.atlassian.net", IssueType: "Bug", ProjectID: "EXAMPLE", Username: "me", ApiToken: "my-api-token", IssueGrouping: "Resources", }, ) client.Integrations.CreateJiraAlertChannel(jiraAlert)
func NewJiraCloudAlertChannel ¶ added in v0.1.24
func NewJiraCloudAlertChannel(name string, data JiraAlertChannelData) JiraAlertChannel
NewJiraCloudAlertChannel returns a JiraAlertChannel instance preconfigured as a JIRA_CLOUD type
func NewJiraServerAlertChannel ¶ added in v0.1.24
func NewJiraServerAlertChannel(name string, data JiraAlertChannelData) JiraAlertChannel
NewJiraServerAlertChannel returns a JiraAlertChannel instance preconfigured as a JIRA_SERVER type
func (JiraAlertChannel) StateString ¶ added in v0.1.24
func (c JiraAlertChannel) StateString() string
type JiraAlertChannelData ¶ added in v0.1.24
type JiraAlertChannelData struct { JiraType string `json:"JIRA_TYPE" mapstructure:"JIRA_TYPE"` JiraUrl string `json:"JIRA_URL" mapstructure:"JIRA_URL"` IssueType string `json:"ISSUE_TYPE" mapstructure:"ISSUE_TYPE"` ProjectID string `json:"PROJECT_ID" mapstructure:"PROJECT_ID"` Username string `json:"USERNAME" mapstructure:"USERNAME"` ApiToken string `json:"API_TOKEN,omitempty" mapstructure:"API_TOKEN"` // Jira Cloud Password string `json:"PASSWORD,omitempty" mapstructure:"PASSWORD"` // Jira Server IssueGrouping string `json:"ISSUE_GROUPING,omitempty" mapstructure:"ISSUE_GROUPING"` // This field must be a base64 encode with the following format: // // "data:application/json;name=i.json;base64,[ENCODING]" // // [ENCODING] is the the base64 encode, use EncodeCustomTemplateFile() to encode a JSON template CustomTemplateFile string `json:"CUSTOM_TEMPLATE_FILE,omitempty" mapstructure:"CUSTOM_TEMPLATE_FILE"` }
func (*JiraAlertChannelData) DecodeCustomTemplateFile ¶ added in v0.2.1
func (jira *JiraAlertChannelData) DecodeCustomTemplateFile() (string, error)
func (*JiraAlertChannelData) EncodeCustomTemplateFile ¶ added in v0.2.1
func (jira *JiraAlertChannelData) EncodeCustomTemplateFile(template string)
type JiraAlertChannelResponse ¶ added in v0.1.24
type JiraAlertChannelResponse struct { Data []JiraAlertChannel `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type Json16DigitTime ¶ added in v0.1.21
time type to parse the returned 16 digit time in milliseconds
func (Json16DigitTime) Format ¶ added in v0.1.21
func (self Json16DigitTime) Format(s string) string
func (Json16DigitTime) MarshalJSON ¶ added in v0.1.21
func (self Json16DigitTime) MarshalJSON() ([]byte, error)
func (Json16DigitTime) ToTime ¶ added in v0.1.21
func (self Json16DigitTime) ToTime() time.Time
A few format functions for printing and manipulating the custom date
func (Json16DigitTime) UTC ¶ added in v0.1.21
func (self Json16DigitTime) UTC() time.Time
func (*Json16DigitTime) UnmarshalJSON ¶ added in v0.1.21
func (self *Json16DigitTime) UnmarshalJSON(b []byte) error
imeplement Marshal and Unmarshal interfaces
type LQLService ¶ added in v0.1.24
type LQLService struct {
// contains filtered or unexported fields
}
LQLService is a service that interacts with the LQL endpoints from the Lacework Server
type NanoTime ¶ added in v0.2.0
time type to parse the returned time with nano format
Example:
"START_TIME":"2020-08-20T01:00:00+0000"
func (NanoTime) MarshalJSON ¶ added in v0.2.0
func (NanoTime) ToTime ¶ added in v0.2.0
A few format functions for printing and manipulating the custom date
func (*NanoTime) UnmarshalJSON ¶ added in v0.2.0
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithApiKeys ¶
WithApiKeys sets the key_id and secret used to generate API access tokens
func WithApiV2 ¶
func WithApiV2() Option
WithApiV2 configures the client to use the API version 2 (/api/v2)
func WithExpirationTime ¶
WithExpirationTime configures the token expiration time
func WithHeader ¶ added in v0.1.19
WithHeader configures a HTTP Header to pass to every request
func WithLogFile ¶ added in v0.1.2
WithLogFile configures the client to write messages to the provided file
func WithLogLevel ¶ added in v0.1.1
WithLogLevel sets the log level of the client, available: info or debug
func WithLogLevelAndFile ¶ added in v0.1.2
WithLogLevelAndFile sets the log level of the client and writes the log messages to the provided file
func WithLogLevelAndWriter ¶ added in v0.1.2
WithLogLevelAndWriter sets the log level of the client and writes the log messages to the provided io.Writer
func WithLogWriter ¶ added in v0.1.2
WithLogWriter configures the client to log messages to the provided io.Writer
func WithTokenFromKeys ¶
WithTokenFromKeys sets the API access keys and triggers a new token generation NOTE: Order matters when using this option, use it at the end of a NewClient() func
type PagerDutyAlertChannel ¶ added in v0.1.22
type PagerDutyAlertChannel struct { Data PagerDutyData `json:"DATA"` // contains filtered or unexported fields }
func NewPagerDutyAlertChannel ¶ added in v0.1.22
func NewPagerDutyAlertChannel(name string, data PagerDutyData) PagerDutyAlertChannel
NewPagerDutyAlertChannel returns an instance of PagerDutyAlertChannel with the provided name and data.
Basic usage: Initialize a new PagerDutyAlertChannel struct, then
use the new instance to do CRUD operations client, err := api.NewClient("account") if err != nil { return err } pagerduty := api.NewPagerDutyAlertChannel("foo", api.PagerDutyData{ IntegrationKey: "1234abc8901abc567abc123abc78e012", }, ) client.Integrations.CreatePagerDutyAlertChannel(pagerduty)
func (PagerDutyAlertChannel) StateString ¶ added in v0.1.22
func (c PagerDutyAlertChannel) StateString() string
type PagerDutyAlertChannelResponse ¶ added in v0.1.22
type PagerDutyAlertChannelResponse struct { Data []PagerDutyAlertChannel `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type PagerDutyData ¶ added in v0.1.22
type RawIntegration ¶
type RawIntegration struct { Data map[string]interface{} `json:"DATA"` // contains filtered or unexported fields }
func (RawIntegration) StateString ¶ added in v0.1.7
func (c RawIntegration) StateString() string
type RawIntegrationsResponse ¶
type RawIntegrationsResponse struct { Data []RawIntegration `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type SlackAlertChannel ¶ added in v0.1.22
type SlackAlertChannel struct { Data SlackChannelData `json:"DATA"` // contains filtered or unexported fields }
func NewSlackAlertChannel ¶ added in v0.1.22
func NewSlackAlertChannel(name string, data SlackChannelData) SlackAlertChannel
NewSlackAlertChannel returns an instance of SlackAlertChannel with the provided name and data.
Basic usage: Initialize a new SlackAlertChannel struct, then
use the new instance to do CRUD operations client, err := api.NewClient("account") if err != nil { return err } slackChannel := api.NewSlackAlertChannel("foo", api.SlackChannelData{ SlackUrl: "https://hooks.slack.com/services/ABCD/12345/abcd1234", }, ) client.Integrations.CreateSlackAlertChannel(slackChannel)
func (SlackAlertChannel) StateString ¶ added in v0.1.22
func (c SlackAlertChannel) StateString() string
type SlackAlertChannelResponse ¶ added in v0.1.22
type SlackAlertChannelResponse struct { Data []SlackAlertChannel `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type SlackChannelData ¶ added in v0.1.21
type TokenResponse ¶ added in v0.1.24
type TokenResponse struct { Data []tokenData `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
func (TokenResponse) Token ¶ added in v0.1.24
func (tr TokenResponse) Token() string
type VulnContainerAssessment ¶ added in v0.2.0
type VulnContainerAssessment struct { TotalVulnerabilities int32 `json:"total_vulnerabilities"` CriticalVulnerabilities int32 `json:"critical_vulnerabilities"` HighVulnerabilities int32 `json:"high_vulnerabilities"` MediumVulnerabilities int32 `json:"medium_vulnerabilities"` LowVulnerabilities int32 `json:"low_vulnerabilities"` InfoVulnerabilities int32 `json:"info_vulnerabilities"` FixableVulnerabilities int32 `json:"fixable_vulnerabilities"` LastEvaluationTime string `json:"last_evaluation_time,omitempty"` Image *VulnContainerImage `json:"image,omitempty"` // @afiune these two parameters, Status and Message will appear when // the vulnerability scan is still running. ugh. why? Status string `json:"status,omitempty"` Message string `json:"message,omitempty"` // ScanStatus is a property that will appear when the vulnerability scan finished // running, this status indicates whether the scan finished successfully or not ScanStatus string `json:"scan_status,omitempty"` }
func (*VulnContainerAssessment) VulnFixableCount ¶ added in v0.2.0
func (report *VulnContainerAssessment) VulnFixableCount(severity string) int32
type VulnContainerAssessmentResponse ¶ added in v0.2.0
type VulnContainerAssessmentResponse struct { Data VulnContainerAssessment `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
func (*VulnContainerAssessmentResponse) CheckStatus ¶ added in v0.2.0
func (res *VulnContainerAssessmentResponse) CheckStatus() string
type VulnContainerAssessmentSummary ¶ added in v0.2.0
type VulnContainerAssessmentSummary struct { EvalGuid string `json:"eval_guid"` EvalStatus string `json:"eval_status"` EvalType string `json:"eval_type"` ImageCreatedTime Json16DigitTime `json:"image_created_time"` ImageDigest string `json:"image_digest"` ImageID string `json:"image_id"` ImageNamespace string `json:"image_namespace"` ImageRegistry string `json:"image_registry"` ImageRepo string `json:"image_repo"` ImageScanErrorMsg string `json:"image_scan_error_msg"` ImageScanStatus string `json:"image_scan_status"` ImageScanTime Json16DigitTime `json:"image_scan_time"` ImageSize string `json:"image_size"` ImageTags []string `json:"image_tags"` NdvContainers string `json:"ndv_containers"` NumFixes string `json:"num_fixes"` NumVulnerabilitiesSeverity1 string `json:"num_vulnerabilities_severity_1"` NumVulnerabilitiesSeverity2 string `json:"num_vulnerabilities_severity_2"` NumVulnerabilitiesSeverity3 string `json:"num_vulnerabilities_severity_3"` NumVulnerabilitiesSeverity4 string `json:"num_vulnerabilities_severity_4"` NumVulnerabilitiesSeverity5 string `json:"num_vulnerabilities_severity_5"` StartTime NanoTime `json:"start_time"` }
type VulnContainerAssessmentsResponse ¶ added in v0.2.0
type VulnContainerAssessmentsResponse struct { Assessments []VulnContainerAssessmentSummary `json:"data"` Ok bool `json:"ok"` Message string `json:"message"` }
type VulnContainerImage ¶ added in v0.2.0
type VulnContainerImage struct { ImageInfo *vulnContainerImageInfo `json:"image_info,omitempty"` ImageLayers []vulnContainerImageLayer `json:"image_layers,omitempty"` }
type VulnerabilitiesService ¶ added in v0.1.3
type VulnerabilitiesService struct { Host *HostVulnerabilityService Container *ContainerVulnerabilityService // contains filtered or unexported fields }
VulnerabilitiesService is a service that interacts with the vulnerabilities endpoints from the Lacework Server
func NewVulnerabilityService ¶ added in v0.2.0
func NewVulnerabilityService(c *Client) *VulnerabilitiesService
Source Files ¶
- api.go
- auth.go
- client.go
- compliance.go
- compliance_aws.go
- compliance_azure.go
- compliance_gcp.go
- errors.go
- events.go
- http.go
- integration_alert_channels.go
- integration_alert_channels_aws_cloudwatch.go
- integration_alert_channels_jira.go
- integration_alert_channels_pagerduty.go
- integration_alert_channels_slack.go
- integrations.go
- integrations_aws.go
- integrations_azure.go
- integrations_ctr_reg.go
- integrations_ctr_reg_ecr.go
- integrations_gcp.go
- logging.go
- lql.go
- reader.go
- version.go
- vulnerabilities.go
- vulnerabilities_container.go
- vulnerabilities_host.go