model

package
v0.0.99 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckProductHealthyRequest

type CheckProductHealthyRequest struct {
	XLanguage *string `json:"X-Language,omitempty"`

	Body *ProductInfo `json:"body,omitempty"`
}

Request Object

func (CheckProductHealthyRequest) String

type CheckProductHealthyResponse

type CheckProductHealthyResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (CheckProductHealthyResponse) String

type Compliance

type Compliance struct {

	// 检查项(检查规则)编号
	CheckitemId string `json:"checkitem_id"`

	// 检查点(检查结果)编号,检查项对同一个资源的检查结果
	CheckpointId string `json:"checkpoint_id"`

	// 检查规范编号,默认选第一个
	SpecId string `json:"spec_id"`

	// 合规检查结果,取值定义:PASSED、WARNING、FAILED、NOT_AVAILABLE。 说明: PASSED - 接受评估的所有资源都已通过安全检查。 WARNING - 某些信息缺失或配置不支持此检查。 FAILED - 至少有一个接受评估的资源未能通过安全检查。 NOT_AVAILABLE - 由于服务中断或 API 错误,无法执行检查。
	Status string `json:"status"`

	// 属性信息
	Properties *string `json:"properties,omitempty"`
}

func (Compliance) String

func (o Compliance) String() string

type DataSource

type DataSource struct {

	// 数据源类型,取值范围如下: 1 - 华为产品 2 - 第三方产品 3 - 租户私有产品
	Type *int32 `json:"type,omitempty"`

	// 数据源产品所属管理账号的ID,最大36个字符。
	DomainId *string `json:"domain_id,omitempty"`

	// 数据源产品所属项目的ID,最大36个字符。
	ProjectId *string `json:"project_id,omitempty"`

	// 数据源产品所在区域,具体取值范围查看华为云地区和终端节点定义。
	RegionId *string `json:"region_id,omitempty"`

	// 数据源产品所属公司的名称。
	CompanyName string `json:"company_name"`

	// 数据源产品的名称。
	ProductName string `json:"product_name"`

	// 产品功能特性名称,用来指明检测到当前事件的产品的功能特性。
	ProductFeature *string `json:"product_feature,omitempty"`
}

func (DataSource) String

func (o DataSource) String() string

type Environment

type Environment struct {

	// 环境供应商,HWCP/HWC/AWS/Azure/GCP等。
	Type string `json:"type"`

	// 租户账号ID,用来标识事件所属租户。
	DomainId string `json:"domain_id"`

	// 租户项目ID,用来标识事件所属项目区域。
	ProjectId *string `json:"project_id,omitempty"`

	// 数据源产品所在区域,具体取值范围查看华为云地区和终端节点定义。
	RegionId *string `json:"region_id,omitempty"`
}

func (Environment) String

func (o Environment) String() string

type Event

type Event struct {

	// SA数据对象版本号,数据接入时需携带版本号。版本号由SA服务团队负责更新,数据源只可填写SA给定的版本号。目前版本为1.0.0。
	Version string `json:"version"`

	Environment *Environment `json:"environment"`

	DataSource *DataSource `json:"data_source"`

	// 首次发现时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。时区信息为事件发生时区,无法解析时区的时间,默认时区填东八区。
	FirstObservedTime string `json:"first_observed_time"`

	// 最新发现时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。时区信息为事件发生时区,无法解析时区的时间,默认时区填东八区。
	LastObservedTime *string `json:"last_observed_time,omitempty"`

	// 记录时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。时区信息为事件发生时区,无法解析时区的时间,默认时区填东八区。
	CreateTime string `json:"create_time"`

	// 数据接收时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。时区信息为事件发生时区,无法解析时区的时间,默认时区填东八区。  是指事件数据被SA侧接收的时间,由SA接收时填写,产品上报数据时不用填写。
	ArriveTime *string `json:"arrive_time,omitempty"`

	// 事件唯一标识,UUID格式。
	EventId string `json:"event_id"`

	// 事件标题,最大255字符。
	Title string `json:"title"`

	// 事件描述信息,最大1024个字符
	Description string `json:"description"`

	// 事件URL链接,指向数据源产品中有关当前事件说明的页面。
	SourceUrl *string `json:"source_url,omitempty"`

	// 事件发生次数,默认为1,必填。
	Count int32 `json:"count"`

	// 事件的置信度。置信度的定义旨在说明识别的行为或问题的可能性。 取值范围:0-100,0表示置信度为0%,100表示置信度为100%。
	Confidence *int32 `json:"confidence,omitempty"`

	Severity *Severity `json:"severity"`

	// 关键性,是指事件涉及的资源的重要性级别。 取值范围:0-100,0表示资源不关键,100表示最关键资源。
	Criticality *int32 `json:"criticality,omitempty"`

	Type *Type `json:"type"`

	Compliance *Compliance `json:"compliance,omitempty"`

	Network *Network `json:"network,omitempty"`

	VulnerabilityPatch *VulnerabilityPatch `json:"vulnerability_patch,omitempty"`

	Malware *Malware `json:"malware,omitempty"`

	ThreatIntel *ThreatIntel `json:"threat_intel,omitempty"`

	Resource *Resource `json:"resource"`

	Remediation *Remediation `json:"remediation,omitempty"`

	// 数据源自定义信息,最多支持50个key/value对,约束条件: 1、该对象不能包含冗余数据,并且不能与已定义的SSA事件格式字段冲突。 2、字段名称可以包含字母数字字符、空格和以下符号:_ . / = + \\ - @。 示例: \"data_source_fields\": {     \"key1\": \"value1\",     \"key2\", \"value2\",   }
	DataSourceFields *interface{} `json:"data_source_fields,omitempty"`

	// 事件验证状态,标识事件的准确性。 Unknown – 未知,默认 True_positive – 确认 False_positive – 误报。
	VerificationState *string `json:"verification_state,omitempty"`

	// 事件处理状态,New/Ignored/Resolved;默认New。
	HandleStatus string `json:"handle_status"`

	// 阶段:Prepartion|Detection and Analysis|Containm,Eradication& Recovery| Post-Incident-Activity。
	Phase *string `json:"phase,omitempty"`

	// 约束闭环时间:单位:天。
	Sla *int32 `json:"sla,omitempty"`
}

event

func (Event) String

func (o Event) String() string

type Events

type Events struct {

	// event 批量导入
	Events []Event `json:"events"`
}

func (Events) String

func (o Events) String() string

type Geo

type Geo struct {

	// 纬度。
	Latitude float32 `json:"latitude,omitempty"`

	// 经度。
	Longitude float32 `json:"longitude,omitempty"`

	// 城市编码。
	CityCode *string `json:"city_code,omitempty"`

	// 国家简码ISO 3166-1 alpha-2,例如:CN、US、DE、IT、SG。
	CountryCode *string `json:"country_code,omitempty"`
}

func (Geo) String

func (o Geo) String() string

type ImportEventsRequest

type ImportEventsRequest struct {
	XLanguage *string `json:"X-Language,omitempty"`

	Body *Events `json:"body,omitempty"`
}

Request Object

func (ImportEventsRequest) String

func (o ImportEventsRequest) String() string

type ImportEventsResponse

type ImportEventsResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (ImportEventsResponse) String

func (o ImportEventsResponse) String() string

type Malware

type Malware struct {

	// 恶意软件名称,最大64个字符。
	Name string `json:"name"`

	// 恶意软件sha256
	Sha256 *string `json:"sha256,omitempty"`

	// 恶意软件类型,遵循STIX规范: adware、backdoor、bot、bootkit、ddos、downloader、dropper、exploit-kit、keylogger、ransomware、remote-access-trojan、resource-exploitation、rogue-security-software、rootkit、screen-capture、spyware、trojan、unknown、virus、webshell、wiper、worm
	Type string `json:"type"`

	// 恶意软件在系统中的路径,最大512个字符。
	Path *string `json:"path,omitempty"`

	// 恶意软件状态,取值范围:OBSERVED、REMOVAL_FAILED、REMOVED。
	State *string `json:"state,omitempty"`

	Properties *MalwareProperties `json:"properties,omitempty"`
}

func (Malware) String

func (o Malware) String() string

type MalwareProperties

type MalwareProperties struct {

	// 进程ID。
	Pid *string `json:"pid,omitempty"`

	// 系统角色(例如:root,service)。
	User *string `json:"user,omitempty"`

	// 系统权限(例如:777,755)。
	Mod *string `json:"mod,omitempty"`

	// 进程启动时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。
	StartTime *string `json:"start_time,omitempty"`
}

func (MalwareProperties) String

func (o MalwareProperties) String() string

type Network

type Network struct {

	// 方向,取值范围:IN、OUT。
	Direction *string `json:"direction,omitempty"`

	// 协议。
	Protocol *string `json:"protocol,omitempty"`

	// 源IP地址。
	SrcIp *string `json:"src_ip,omitempty"`

	// 源端口,0–65535。
	SrcPort *int32 `json:"src_port,omitempty"`

	// 源域名,最大128个字符。
	SrcDomain *string `json:"src_domain,omitempty"`

	SrcGeo *Geo `json:"src_geo,omitempty"`

	// 目标IP地址。
	DestcIp *string `json:"destc_ip,omitempty"`

	// 目标端口,0–65535。
	DestPort *int32 `json:"dest_port,omitempty"`

	// 目标域名,最大128个字符。
	DestDomain *string `json:"dest_domain,omitempty"`

	DestGeo *Geo `json:"dest_geo,omitempty"`
}

func (Network) String

func (o Network) String() string

type ProductInfo

type ProductInfo struct {

	// 数据源产品所属账号的ID。
	DomainId string `json:"domain_id"`

	// 数据源产品所属项目的ID。
	ProjectId string `json:"project_id"`

	// 数据源产品所在区域。
	Region string `json:"region"`

	// 数据源产品所属公司的名称。
	CompanyName string `json:"company_name"`

	// 数据源产品的名称。
	ProductName string `json:"product_name"`
}

func (ProductInfo) String

func (o ProductInfo) String() string

type Remediation

type Remediation struct {

	// 处理建议,最长512个字符。
	Recommendation string `json:"recommendation"`

	// 链接,指向该事件的一般修复信息。该URL必须可以从公网访问,不需要提供凭证。
	Url *string `json:"url,omitempty"`
}

func (Remediation) String

func (o Remediation) String() string

type Resource

type Resource struct {

	// 资源ID。
	Id string `json:"id"`

	// 资源名称;最大长度255个字符。
	Name string `json:"name"`

	// 资源类型。
	Type string `json:"type"`

	// 云服务名称。
	Provider string `json:"provider"`

	// 区域。
	RegionId *string `json:"region_id,omitempty"`

	// 资源所属租户账号ID。
	DomainId string `json:"domain_id"`

	// 资源所属项目ID。
	ProjectId *string `json:"project_id,omitempty"`

	// 企业项目ID。
	EpId *string `json:"ep_id,omitempty"`

	// 企业项目名称。
	EpName *string `json:"ep_name,omitempty"`

	// 资源标签 1、最多50个key/values对。 2、values:最大255字符。 3、取值范围:字母数字、空格、“+”、“-”、“=”、“.”、“_”、“:”、“/”、“@”。
	Tags *interface{} `json:"tags,omitempty"`
}

func (Resource) String

func (o Resource) String() string

type Severity

type Severity struct {

	// 严重性等级取值范围:TIPS、LOW、MEDIUM、HIGH、FATAL。 TIPS:未发现任何问题。 LOW:无需针对问题执行任何操作。 MEDIUM:问题需要处理,但不紧急。 HIGH:问题必须优先处理。 FATAL:问题必须立即处理,以防止产生进一步的损害。
	Label string `json:"label"`

	// 严重性评分取值范围:0-100; 与严重性等级的对应关系: TIPS 0; LOW 1-39; MEDIUM 40-69; HIGH 70-89; FATAL 90-100。
	NormalizeScore *int32 `json:"normalize_score,omitempty"`

	// 严重性原始评分,指在数据源产品中的评分。
	OriginalScore *int32 `json:"original_score,omitempty"`
}

func (Severity) String

func (o Severity) String() string

type ThreatIntel

type ThreatIntel struct {

	// 情报Id。
	Id string `json:"id"`

	// 威胁情报类型,Domain、Email_Address、Hash_MD5、Hash_SHA1、Hash_SHA256、 Hash_SHA512、IPv4_Address、IPv6_Address、URL。
	IndicatorType *string `json:"indicator_type,omitempty"`

	// 标签,如'矿池','外联'等,\"Directory Scan|Directory Traversal\"。
	Labels *string `json:"labels,omitempty"`

	// 置信度,不同来源目前置信度分值定义不一样(分数)。
	Confidence *int32 `json:"confidence,omitempty"`

	// 威胁情报源,最大64个字符。
	InformationSource string `json:"information_source"`

	// 严重程度,不同渠道定义值不一样(分数)。
	Severity *int32 `json:"severity,omitempty"`

	// 威胁情报描述。
	Description string `json:"description"`

	// 威胁情报的更新时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。时区信息为事件发生时区,无法解析时区的时间,默认时区填东八区。
	Modified *string `json:"modified,omitempty"`

	// 有效期开始(可读字符串)。
	ValidFrom *string `json:"valid_from,omitempty"`

	// 有效期结束(可读字符串)。
	ValidUntil *string `json:"valid_until,omitempty"`

	Properties *ThreatIntelProperties `json:"properties,omitempty"`
}

func (ThreatIntel) String

func (o ThreatIntel) String() string

type ThreatIntelProperties

type ThreatIntelProperties struct {

	// 恶意软件Md5。
	FileMd5 *string `json:"file_md5,omitempty"`

	// 恶意软件Sha1。
	FileSha1 *string `json:"file_sha1,omitempty"`

	// 恶意软件Sha256值。
	FileSha256 *string `json:"file_sha256,omitempty"`

	// 文件名称。
	FileName *string `json:"file_name,omitempty"`

	// 编译时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。时区信息为事件发生时区,无法解析时区的时间,默认时区填东八区。
	CreateTime *string `json:"create_time,omitempty"`

	// 文件类别,TEXT|XCODE。
	FileClass *string `json:"file_class,omitempty"`

	// 家族,例如:wannacry(勒索软件)。
	FileFamily *string `json:"file_family,omitempty"`

	// 类别,例如:trojan(特洛伊)。
	FileMaltype *string `json:"file_maltype,omitempty"`

	// mac地址。
	IpResolvesToRefs *string `json:"ip_resolves_to_refs,omitempty"`

	// IP AS 自治系统。
	BelongsToRefs *string `json:"belongs_to_refs,omitempty"`

	// 地区 格式:country/provice/city/lngwgs/latwgs。
	IpLocation *string `json:"ip_location,omitempty"`

	// 例如:banjori|iodine。
	DomainFamily *string `json:"domain_family,omitempty"`

	// 解析的IP地址。
	DomainResolvesToRefs *string `json:"domain_resolves_to_refs,omitempty"`

	// DNS类别。A|NS|CNAME|TXT。
	DomainDnsType *string `json:"domain_dns_type,omitempty"`

	// 例:3ms.huawei.com。
	UrlHost *string `json:"url_host,omitempty"`

	// IP地址。
	UrlResolvesToRefs *string `json:"url_resolves_to_refs,omitempty"`

	// 显示名称。
	DisplayName *string `json:"display_name,omitempty"`

	// 邮箱账户,@之前部分。
	UrlBelongsToRef *string `json:"url_belongs_to_ref,omitempty"`
}

func (ThreatIntelProperties) String

func (o ThreatIntelProperties) String() string

type Type

type Type struct {

	// 事件所属业务领域标签,可选类别如下: attack – 攻击 vulnerability – 漏洞 compliance check – 合规检查 risk - 风险 public opinion - 舆情 illegal&violation - 违法违规 security bulletin - 公告
	Business string `json:"business"`

	// 类别,推荐使用预定义的类型分类。
	Category *string `json:"category,omitempty"`

	// 分类器,推荐使用预定义的分类器。 如果指定了分类器,则必须指定类别。
	Classifier *string `json:"classifier,omitempty"`

	// 技术领域标签: OS:主机 APP:应用 NET:网络 OPS:运维 CS:云服务 CSP:平台云服务
	TechDomain *string `json:"tech_domain,omitempty"`

	Properties *TypeProperties `json:"properties,omitempty"`
}

func (Type) String

func (o Type) String() string

type TypeProperties

type TypeProperties struct {

	// Kill chain事件分类,仅当business为attack有效
	Killchain *string `json:"killchain,omitempty"`

	// Mitre Array 事件分类,仅当business为attack有效
	Ttps *string `json:"ttps,omitempty"`

	// 影响,适用全部类型
	Effects *string `json:"effects,omitempty"`
}

func (TypeProperties) String

func (o TypeProperties) String() string

type VulnerabilityPatch

type VulnerabilityPatch struct {

	// 补丁编号。
	PatchId string `json:"patch_id"`

	// 补丁名称。
	PatchName *string `json:"patch_name,omitempty"`

	// 补丁类型(0:linux,1:windows,2:web-cms)。
	Type *string `json:"type,omitempty"`

	// 重要等级。
	MajorLevel *string `json:"major_level,omitempty"`

	// 补丁状态。
	Status *string `json:"status,omitempty"`

	// 修复命令。
	RepairCmd *string `json:"repair_cmd,omitempty"`

	// 修复必要程度(1:需立刻修复,2:可延后修复,3:暂可以不修复)。
	RepairNecessity *string `json:"repair_necessity,omitempty"`

	// 发布时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。时区信息       为事件发生时区,无法解析时区的时间,默认时区填东八区。
	ReleaseTime *string `json:"release_time,omitempty"`

	// 参考链接。
	ReferenceUrl *string `json:"reference_url,omitempty"`

	// 漏洞报告提供者信息。
	VendorName *string `json:"vendor_name,omitempty"`

	// 受影响软件版本。
	VulnerablePackage *string `json:"vulnerable_package,omitempty"`
}

func (VulnerabilityPatch) String

func (o VulnerabilityPatch) String() string

Jump to

Keyboard shortcuts

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