Documentation ¶
Index ¶
- Constants
- Variables
- func AddOneAlarm(c *gin.Context)
- func AddOneNoticeConfig(c *gin.Context)
- func AddTags(ctx *gin.Context)
- func AgentRisk(c *gin.Context)
- func AlertList(c *gin.Context)
- func AlertStatistics(c *gin.Context)
- func BaselineRisk(c *gin.Context)
- func ChangeOneNoticeRunConfig(c *gin.Context)
- func CheckNoticeMsgConfig(msg_type string, notice_type string, config *outputer.NoticeMsgConfig, ...) error
- func ChecklistWhiten(c *gin.Context)
- func ClusterDownload(c *gin.Context)
- func CombineRaspAlarmCondition(cond *RaspAlarmQueryFilter, isQueryWhite bool) bson.A
- func CompleteAlarmSummaryContent(raw *alarm.AlarmDbDataInfo, dst *AlarmSummaryContent) error
- func CompleteAssetHostInfo(raw *alarm.AlarmDbDataInfo, dst *AlarmAssetHost) error
- func CompleteAssetInfo(c *gin.Context, raw *alarm.AlarmDbDataInfo, dst *AlarmAssetInfo) error
- func ContainerDownload(c *gin.Context)
- func ControlAgent(c *gin.Context)
- func CreatFileScanTaskForVirus(c *gin.Context)
- func CreateComponent(c *gin.Context)
- func CreatePageResponse(c *gin.Context, code int, data interface{}, page common.PageResponse)
- func CreatePolicy(c *gin.Context)
- func CreateRebootAgentTask(c *gin.Context)
- func CreateResponse(c *gin.Context, code int, data interface{})
- func CreateSyncConfigTask(c *gin.Context)
- func DelClusterConfig(c *gin.Context)
- func DelOneNoticeConfig(c *gin.Context)
- func DelRaspConfig(c *gin.Context)
- func DelUserList(c *gin.Context)
- func DeletePolicy(c *gin.Context)
- func DeleteTags(ctx *gin.Context)
- func DescribeAgent(c *gin.Context)
- func DescribeAlerts(ctx *gin.Context)
- func DescribeApp(c *gin.Context)
- func DescribeAppGroup(c *gin.Context)
- func DescribeAsset(c *gin.Context)
- func DescribeComponent(c *gin.Context)
- func DescribeComponentCriteria(c *gin.Context)
- func DescribeComponentList(c *gin.Context)
- func DescribeComponentVersionCriteria(c *gin.Context)
- func DescribeComponentVersionList(c *gin.Context)
- func DescribeContainer(c *gin.Context)
- func DescribeContainerDetail(c *gin.Context)
- func DescribeContainerStateStatistics(c *gin.Context)
- func DescribeCron(c *gin.Context)
- func DescribeHostDetail(ctx *gin.Context)
- func DescribeHostStatistics(c *gin.Context)
- func DescribeHosts(ctx *gin.Context)
- func DescribeIDC(ctx *gin.Context)
- func DescribeIntegrity(c *gin.Context)
- func DescribeKernelVersion(ctx *gin.Context)
- func DescribeKmod(c *gin.Context)
- func DescribeNetInterface(c *gin.Context)
- func DescribePlatform(ctx *gin.Context)
- func DescribePolicyList(c *gin.Context)
- func DescribePort(c *gin.Context)
- func DescribeProcess(c *gin.Context)
- func DescribeRecommendComponentVersion(c *gin.Context)
- func DescribeRefreshStatus(c *gin.Context)
- func DescribeService(c *gin.Context)
- func DescribeSoftware(c *gin.Context)
- func DescribeStatistics(c *gin.Context)
- func DescribeTags(ctx *gin.Context)
- func DescribeTop5(c *gin.Context)
- func DescribeUser(c *gin.Context)
- func DescribeVolume(c *gin.Context)
- func Detect(c *gin.Context)
- func DetectProgressDetail(c *gin.Context)
- func Download(ctx *gin.Context)
- func DownloadVulnData(c *gin.Context)
- func DownloadVulnList(c *gin.Context)
- func EditRaspConfig(c *gin.Context)
- func ExportAlarmListData(c *gin.Context, alarmType string, headers common.MongoDBDefs, file_name string)
- func ExportAlarmListDataForHids(c *gin.Context)
- func ExportAlarmListDataForVirus(c *gin.Context)
- func ExportAlerts(c *gin.Context)
- func ExportData(c *gin.Context)
- func ExportHosts(ctx *gin.Context)
- func ExportKubeAlarmListData(c *gin.Context)
- func ExportRaspAlarmListData(c *gin.Context)
- func FlushPkgInfo()
- func GetAgentContainerInfo(c *gin.Context, data_type string, aid string, pns string, ...) error
- func GetAgentDetail(c *gin.Context, aid string, dst *AlarmDetailDataBaseAgent) error
- func GetAgentPkgList(c *gin.Context)
- func GetAlarmFilterByWhite(c *gin.Context, alarmType string)
- func GetAlarmFilterByWhiteForHids(c *gin.Context)
- func GetAlarmFilterByWhiteForKube(c *gin.Context)
- func GetAlarmFilterByWhiteForRasp(c *gin.Context)
- func GetAlarmFilterByWhiteForVirus(c *gin.Context)
- func GetAlarmList(c *gin.Context, alarmType string)
- func GetAlarmListForHids(c *gin.Context)
- func GetAlarmListForRasp(c *gin.Context)
- func GetAlarmListForVirus(c *gin.Context)
- func GetAlarmStat(c *gin.Context, alarmType string)
- func GetAlarmStatForHids(c *gin.Context)
- func GetAlarmStatForKube(c *gin.Context)
- func GetAlarmStatForVirus(c *gin.Context)
- func GetAlarmSummaryInfo(c *gin.Context, alarmType string)
- func GetAlarmSummaryInfoForHids(c *gin.Context)
- func GetAlarmSummaryInfoForKube(c *gin.Context)
- func GetAlarmSummaryInfoForRasp(c *gin.Context)
- func GetAlarmSummaryInfoForVirus(c *gin.Context)
- func GetBaselineCheckList(c *gin.Context)
- func GetBaselineDetailList(c *gin.Context)
- func GetBaselineDownload(c *gin.Context)
- func GetBaselineList(c *gin.Context)
- func GetBaselineStatistics(c *gin.Context)
- func GetCheckHostList(c *gin.Context)
- func GetCheckResList(c *gin.Context)
- func GetChecklistDetail(c *gin.Context)
- func GetClusterConfigList(c *gin.Context)
- func GetClusterInfo(c *gin.Context)
- func GetClusterList(c *gin.Context)
- func GetClusterNameFromId(c *gin.Context)
- func GetComponentInstances(c *gin.Context)
- func GetContainerList(c *gin.Context)
- func GetErrorHostNum(c *gin.Context)
- func GetGroupList(c *gin.Context)
- func GetHostVulnInfo(c *gin.Context)
- func GetNodeList(c *gin.Context)
- func GetNoticeAbstract(msgType string, config *outputer.NoticeMsgConfig) string
- func GetNoticeDesc(noticeType string) string
- func GetNoticeList(c *gin.Context)
- func GetNoticePluginNameList(c *gin.Context)
- func GetOneNoticeConfig(c *gin.Context)
- func GetOverviewAlarmStat(c *gin.Context)
- func GetPodList(c *gin.Context)
- func GetRaspAlarmStat(c *gin.Context)
- func GetRaspConfigList(c *gin.Context)
- func GetRaspMethodMap(c *gin.Context)
- func GetRaspProcessDetail(c *gin.Context)
- func GetRaspProcessList(c *gin.Context)
- func GetRaspStatistics(c *gin.Context)
- func GetRaspVulnList(c *gin.Context)
- func GetRaspVulnStatistics(c *gin.Context)
- func GetSubTaskList(c *gin.Context)
- func GetSubTaskListForVirus(c *gin.Context)
- func GetTaskByID(c *gin.Context)
- func GetTaskHostListForVirus(c *gin.Context)
- func GetTaskList(c *gin.Context)
- func GetTaskListForVirus(c *gin.Context)
- func GetTaskStatisticsForVirus(c *gin.Context)
- func GetUserList(c *gin.Context)
- func GetUserOTPStatus(c *gin.Context)
- func GetVirusTaskByID(c *gin.Context)
- func GetVulnInfo(c *gin.Context)
- func GetVulnList(c *gin.Context)
- func GetVulnStatistics(c *gin.Context)
- func GetWhiteHostNum(c *gin.Context)
- func GetWhiteListWithCombine(c *gin.Context, whitelistType string)
- func GetWhiteListWithCombineForHids(c *gin.Context)
- func GetWhiteListWithCombineForKube(c *gin.Context)
- func GetWhiteListWithCombineForRasp(c *gin.Context)
- func GetWhiteListWithCombineForVirus(c *gin.Context)
- func GetWorkerList(c *gin.Context)
- func GridFSUpload(filePath string, fileName string) error
- func GroupCheckStatus(c *gin.Context)
- func GroupStatistics(c *gin.Context)
- func IgnoreAlerts(c *gin.Context)
- func InitComponent()
- func InsertAlert(c *gin.Context)
- func KubeAddOneAlarm(c *gin.Context)
- func KubeCombineAlarmFilter(filter *KubeAlarmFilter, isQueryWhite bool) bson.A
- func KubeCreateShDownload(c *gin.Context)
- func KubeInnerClusterList(c *gin.Context)
- func KubeInnerTestNewCert(c *gin.Context)
- func KubeListAlarm(c *gin.Context)
- func LicenseDetail(c *gin.Context)
- func LicenseOverview(c *gin.Context)
- func MetricsForAgentCpu() func(c *gin.Context)
- func MetricsForAgentDisk() func(c *gin.Context)
- func MetricsForAgentDiskUsage() func(c *gin.Context)
- func MetricsForAgentMemory() func(c *gin.Context)
- func MetricsForAgentNetwork() func(c *gin.Context)
- func ModifyOneNoticeConfig(c *gin.Context)
- func MonitorDescribeHosts(c *gin.Context)
- func MonitorExportHost(c *gin.Context)
- func MonitorExportService(c *gin.Context)
- func MonitorHostAllMetrics(c *gin.Context)
- func MonitorHostAvgMetrics(c *gin.Context)
- func MonitorHostStatistics(c *gin.Context)
- func MonitorServiceList(c *gin.Context)
- func MonitorServiceStatistics(c *gin.Context)
- func MonitorServiceStatus(c *gin.Context)
- func MultiAddWhiteListWithCombineForHids(c *gin.Context)
- func MultiAddWhiteListWithCombineForKube(c *gin.Context)
- func MultiAddWhiteListWithCombineForRasp(c *gin.Context)
- func MultiAddWhiteListWithCombineForVirus(c *gin.Context)
- func MultiDelWhiteListForHids(c *gin.Context)
- func MultiDelWhiteListForKube(c *gin.Context)
- func MultiDelWhiteListForRasp(c *gin.Context)
- func MultiDelWhiteListForVirus(c *gin.Context)
- func MultiUpdateRaspAlarmStatus(c *gin.Context)
- func NewClusterConfig(c *gin.Context)
- func NewRaspConfig(c *gin.Context)
- func NodeDownload(c *gin.Context)
- func NoticePushMsgToCustomByHub(msg *NoticeMsgData, notice_type string, config *outputer.NoticeMsgConfigCustom) error
- func NoticePushMsgToDingdingByHub(msg *NoticeMsgData, notice_type string, ...) error
- func NoticePushMsgToEWechatByHub(msg *NoticeMsgData, notice_type string, ...) error
- func NoticePushMsgToEmailByHub(msg *NoticeMsgData, notice_type string, config *outputer.NoticeMsgConfigEmail) error
- func NoticePushMsgToFeishuByHub(msg *NoticeMsgData, notice_type string, config *outputer.NoticeMsgConfigFeishu) error
- func OneIpVulnControl(c *gin.Context)
- func PodDownload(c *gin.Context)
- func PolicyDownload(c *gin.Context)
- func PublishComponentVersion(c *gin.Context)
- func QueryRequestUserName(c *gin.Context) (string, error)
- func RaspAddOneAlarm(c *gin.Context)
- func RaspVulnProcessList(c *gin.Context)
- func RefreshData(c *gin.Context)
- func RenameClusterConfig(c *gin.Context)
- func ResetAlerts(c *gin.Context)
- func SecondaryTreatmentAlarmContent(content *AlarmSummaryContent)
- func SendAgentDriverKoMissedMsg(c *gin.Context)
- func SendBaselineData(c *gin.Context)
- func SendWeakPassData(c *gin.Context)
- func SplitAlarmExtendInfoProcMatchKeyFromPidTree(agent_id string, pid_tree string) []string
- func TestNoticePushMsgToCustomByHub(config *outputer.NoticeMsgConfigCustom, notice_type string, need_test bool) error
- func TestNoticePushMsgToDingdingByHub(config *outputer.NoticeMsgConfigDingding, notice_type string, need_test bool) error
- func TestNoticePushMsgToEWechatByHub(config *outputer.NoticeMsgConfigEnterpriseWechat, notice_type string, ...) error
- func TestNoticePushMsgToEmailByHub(config *outputer.NoticeMsgConfigEmail, notice_type string, need_test bool) error
- func TestNoticePushMsgToEs(config *outputer.NoticeMsgConfigEs, need_test bool) error
- func TestNoticePushMsgToFeishuByHub(config *outputer.NoticeMsgConfigFeishu, notice_type string, need_test bool) error
- func TestNoticePushMsgToKafka(config *outputer.NoticeMsgConfigKafka, need_test bool) error
- func TestNoticePushMsgToSysLog(config *outputer.NoticeMsgConfigSyslog, need_test bool) error
- func TransAlarmListReqToAlarmFilter(req *AlarmListRequest) *alarm.AlarmQueryFilter
- func TransVirusTaskStatusToWebTaskStatus(status string) string
- func UpdateAlarmStatusMany(c *gin.Context, alarmType string)
- func UpdateAlarmStatusManyForHids(c *gin.Context)
- func UpdateAlarmStatusManyForKube(c *gin.Context)
- func UpdateAlarmStatusManyForVirus(c *gin.Context)
- func UpdateTags(ctx *gin.Context)
- func Upload(c *gin.Context)
- func VulnCheckStatus(c *gin.Context)
- func VulnControl(c *gin.Context)
- func VulnControlNew(c *gin.Context)
- func VulnDetect(c *gin.Context)
- func VulnDetectProgressDetail(c *gin.Context)
- func VulnHostList(c *gin.Context)
- func VulnInit()
- func VulnIpControl(c *gin.Context)
- func VulnRisk(c *gin.Context)
- func WebhookDownload(c *gin.Context)
- func WhiteListAddMultiWithCombine(c *gin.Context, whitelistType string)
- func WhiteListDelMulti(c *gin.Context, whitelistType string)
- func WhiteListUpdateOne(c *gin.Context, whitelistType string)
- func WhiteListUpdateOneForHids(c *gin.Context)
- func WhiteListUpdateOneForKube(c *gin.Context)
- func WhiteListUpdateOneForRasp(c *gin.Context)
- func WhiteListUpdateOneForVirus(c *gin.Context)
- func WorkerDownload(c *gin.Context)
- type AgentBaseline
- type AgentContainerInfo
- type AgentHbInfo
- type AgentStatisticsRequest
- type AgentStatisticsResponse
- type AlarmAssetHost
- type AlarmAssetInfo
- type AlarmAttribution
- type AlarmDataContainerInfo
- type AlarmDataType101
- type AlarmDataType2439
- type AlarmDataType3004
- type AlarmDataType356
- type AlarmDataType4000
- type AlarmDataType42
- type AlarmDataType49
- type AlarmDataType5003
- type AlarmDataType59
- type AlarmDataType6001
- type AlarmDataType6002
- type AlarmDataType6003
- type AlarmDataType601
- type AlarmDataType602
- type AlarmDataType603
- type AlarmDataType604
- type AlarmDataType700
- type AlarmDataType701
- type AlarmDataType702
- type AlarmDataType703
- type AlarmDataType82
- type AlarmDataType86
- type AlarmDbBaseData
- type AlarmDbData
- type AlarmDbHandleData
- type AlarmDetailData
- type AlarmDetailDataBaseAgent
- type AlarmDetailDataBaseAlarm
- type AlarmDetailDataCommAlarm
- type AlarmExportDataRequest
- type AlarmExtendInfo
- type AlarmExtendInfoProcMatchKey
- type AlarmExtendListenPortInfo
- type AlarmExtendVulInfo
- type AlarmFilterByWhiteData
- type AlarmHostInfo
- type AlarmKillChain
- type AlarmLangeHeader
- type AlarmListItem
- type AlarmListRequest
- type AlarmNewStatus
- type AlarmNodeDbData
- type AlarmNodeDetailData
- type AlarmOneHandleFileOpt
- type AlarmOverviewResponse
- type AlarmPrevAndNextRequest
- type AlarmPrevAndNextResponse
- type AlarmRawData
- type AlarmStatusUpdateInfo
- type AlarmStatusUpdateRequest
- type AlarmSummaryContent
- type AlarmSummaryInfoResponse
- type BaselineCheckInfo
- type BasicFingerprintInfo
- type BasicHostInfo
- type BasicHostQuery
- type ClusterConfigApi
- type Component
- type ComponentFile
- type ComponentInstance
- type ComponentVersion
- type ContextInfo
- type CreateComponentReqBody
- type CreateFileScanTaskRequest
- type CreatePolicyReqBody
- type CreateRebootAgentTaskReqBody
- type CreateSyncConfigTaskReqBody
- type CreateTask
- type CreateTaskResponse
- type Criteria
- type DeletePolicyReqBody
- type DescribeAppGroupRespItem
- type DescribeAppReq
- type DescribeAppRespItem
- type DescribeComponentVersionCriteriaReqQuery
- type DescribeComponentVersionListReqBody
- type DescribeContainerDetailResp
- type DescribeContainerReq
- type DescribeContainerRespItem
- type DescribeContainerStateStatisticsResp
- type DescribeCronReqBody
- type DescribeCronRespItem
- type DescribeHostDetailResp
- type DescribeHostDetailRespPluginItem
- type DescribeHostsRespItem
- type DescribeIntegrityReqBody
- type DescribeIntegrityRespItem
- type DescribeKmodItem
- type DescribeKmodReq
- type DescribeNetInterfaceItem
- type DescribeNetInterfaceReq
- type DescribePolicyListReqBody
- type DescribePortReqBody
- type DescribePortRespItem
- type DescribeProcessReqBody
- type DescribeProcessRespItem
- type DescribeServiceReqBody
- type DescribeServiceRespItem
- type DescribeSoftwareReqBody
- type DescribeSoftwareRespItem
- type DescribeStatisticsResp
- type DescribeUserReqBody
- type DescribeUserRespItem
- type DescribeVolumeReq
- type DescribeVolumeRespItem
- type DownloadReq
- type ExportDataReqBody
- type FPStatus
- type FPTaskItem
- type GeneralHostCond
- type GeneralHostReq
- type HostStatistics
- type HubAlarmInfo
- type HubAlarmRuleInfo
- type HubFeishuMsgFormat
- type HubKillChainGraph
- type KillChainNodeDbData
- type KubeAbnormalBehaviorFilter
- type KubeAbnormalBehaviorListRequest
- type KubeAbnormalBehaviorListResponseItem
- type KubeAlarmBaseInfo
- type KubeAlarmClusterInfo
- type KubeAlarmDbData
- type KubeAlarmExportDataRequest
- type KubeAlarmFilter
- type KubeAlarmListRequest
- type KubeAlarmListResponseItem
- type KubeAlarmSimpleInfoItem
- type KubeAlarmSummaryResponse
- type KubeAuditLogDataPlus9004
- type KubeAuditLogDataPlus9005
- type KubeAuditLogDataPlus9006
- type KubeAuditLogDataPlus9007
- type KubeAuditLogDataPlus9008
- type KubeAuditLogDataPlus9009
- type KubeAuditLogDataPlus9010
- type KubeAuditLogDbBaseData
- type KubeAuditLogDbRiskData
- type KubeAuditLogListFilterComm
- type KubeClientInfo
- type KubeClusterBaseInfo
- type KubeResourceInfo
- type KubeThreatAnalysisListBaseItem
- type KubeThreatPreviewResponse
- type KubeThreatResourceCreatFilter
- type KubeThreatResourceCreatListRequest
- type KubeThreatResourceCreatListResponseItem
- type LicenseDetailInfo
- type LicenseDetailInfoItem
- type LicenseDetailResp
- type LicenseOverviewInfo
- type LicenseOverviewResp
- type NoticeAddOneRequest
- type NoticeCommResponse
- type NoticeConnectTestResult
- type NoticeDelOneRequest
- type NoticeModifyOneRequest
- type NoticeMsgData
- type NoticeOneChangeRunConfigRequest
- type NoticeReminderMsgContent
- type NoticeWriteRequestComm
- type PageResponseStruct
- type PkgInfo
- type Policy
- type PolicyRule
- type PublishComponentVersionReqBody
- type RaspAlarmAbstractData
- type RaspAlarmDataBaseInfo
- type RaspAlarmDbBaseData
- type RaspAlarmDbData
- type RaspAlarmExportDataRequest
- type RaspAlarmListItem
- type RaspAlarmListRequest
- type RaspAlarmQueryFilter
- type RaspAlarmRawDataItem
- type RaspAlarmStatistics
- type RaspAlarmStatisticsRequest
- type RaspAlarmStatusUpdateItem
- type RaspAlarmStatusUpdateRequest
- type RefreshDataReqBody
- type ResponseStuct
- type TagsReq
- type TaskDetail
- type UploadRuleInfo
- type UserInfo
- type VirusAlarmListRequest
- type VirusHostInfo
- type VirusScanAlarmListItem
- type VirusScanTaskHostListRequest
- type VirusScanTaskListFilter
- type VirusScanTaskListRequest
- type VirusScanTaskOptRequest
- type VirusSubTaskAndAgentJoinResult
- type VirusSubTaskDetail
- type VirusSubTaskDetailWithResult
- type VirusSubTaskInfo
- type VirusSubTaskListItem
- type VirusSubTaskListRequest
- type VirusSubTaskName
- type VirusSubTaskResult
- type VirusSubTaskWithResultAndAgentJoin
- type VirusTaskDetail
- type VirusTaskRunConfig
- type VirusTaskRunningInfo
- type WhiteListDelReq
- type WhiteListDelRspItem
- type WhiteListUpdateReq
Constants ¶
const ( ALARM_STAT_AGGREGATE_GROUP_ID string = "_id" ALARM_STAT_AGGREGATE_GROUP_COUNT string = "count" )
############################### Variable ###############################
const ( AlarmSupportLanguageCn = "CN" AlarmSupportLangageEn = "EN" )
const ( RadfnAlarmStatus = "__alarm_status" RadfnAlarmHitWhite = "__hit_wl" RadfnAlarmWhiteCheck = "__checked" RadfnEventName = "event_name" RadfnAgentId = "agent_id" RadfnHostname = "hostname" RadfnHostInIpv4 = "in_ipv4_list" RadfnHostOutIpv4 = "ex_ipv4_list" RadfnHostInIpv6 = "in_ipv6_list" RadfnHostOutIpv6 = "ex_ipv6_list" RadfnInsertTime = "__insert_time" RadfnRuleName = "rule_name" RadfnLevel = "HarmLevel" RadfnAlertType = "alert_type_us" RadfnReasonHash = "stack_trace_hash" )
const ( HeaderLang = "Accept-Language" LangCN = "zh-CN" LangEN = "en-US" )
const FlushVulnPkgInfoLock = "FlushVulnPkgInfoLock"
定时清空agent软件包信息
const KubeDefFilterItemNum int = 50
const (
MaxComponentSize = 512 * 1024 * 1024
)
const (
RedisKoVersionKey = "mutex_ko_%s"
)
Variables ¶
var AlarmSupportLangage = map[string]string{ "en-US": AlarmSupportLangageEn, "zh-CN": AlarmSupportLanguageCn, }
var AlarmTypeCnToEn = map[string]string{
"暴力破解": "bruteforce",
"提权攻击": "privilege_escalation",
"后门驻留": "persistent",
"变形木马": "evasion",
"恶意破坏": "purpose",
"静态检测": "static_scan",
"杀伤链": "killchain",
}
############################### Data Struct ###############################
var AlarmTypeEnToCn = map[string]string{
"bruteforce": "暴力破解",
"privilege_escalation": "提权攻击",
"persistent": "后门驻留",
"evasion": "变形木马",
"purpose": "恶意破坏",
"static_scan": "静态检测",
"killchain": "杀伤链",
"initial_access": "试探入侵",
"execution": "代码执行",
"credential_access": "账密盗用",
"discovery": "资产探测",
"collection": "信息收集",
"lateral_movement": "横向移动",
"command_control": "隐蔽隧道",
"exfiltration": "信息外渗",
"custom": "用户自定义",
"Code Execution": "代码执行",
"Abnormal File Read/Write": "异常文件读写",
"Abnormal Network Connect": "异常网络",
"Path Traversal": "目录遍历",
"Abnormal Behavior Sequence": "异常行为序列",
"Abnormal Runtime Behavior": "异常行为",
"SQL Injection": "SQL注入",
}
var FPType = map[string]int32{"port": 5051, "process": 5050, "user": 5052, "cron": 5053, "service": 5054, "software": 5055, "container": 5056, "integrity": 5057, "app": 5060, "kmod": 5062}
var UTC_OFFSET = "+0800"
var VirusDetectionDataTypeList = []string{"6000", "6001", "6002", "6003", "6005", "6010"}
Functions ¶
func AddOneAlarm ¶
func AddOneNoticeConfig ¶
func AlertStatistics ¶
func CheckNoticeMsgConfig ¶
func CheckNoticeMsgConfig(msg_type string, notice_type string, config *outputer.NoticeMsgConfig, needTest bool) error
********************************* function *********************************
func CombineRaspAlarmCondition ¶
func CombineRaspAlarmCondition(cond *RaspAlarmQueryFilter, isQueryWhite bool) bson.A
func CompleteAlarmSummaryContent ¶
func CompleteAlarmSummaryContent(raw *alarm.AlarmDbDataInfo, dst *AlarmSummaryContent) error
func CompleteAssetHostInfo ¶
func CompleteAssetHostInfo(raw *alarm.AlarmDbDataInfo, dst *AlarmAssetHost) error
func CompleteAssetInfo ¶
func CompleteAssetInfo(c *gin.Context, raw *alarm.AlarmDbDataInfo, dst *AlarmAssetInfo) error
func CreatFileScanTaskForVirus ¶
********************************* scan task *********************************
func CreateComponent ¶
func CreatePageResponse ¶
func CreatePageResponse(c *gin.Context, code int, data interface{}, page common.PageResponse)
CreatePageResponse 创建分页返回数据
func CreatePolicy ¶
func CreateRebootAgentTask ¶
func CreateResponse ¶
CreateResponse 创建返回数据
func CreateSyncConfigTask ¶
func DelOneNoticeConfig ¶
func DeletePolicy ¶
func DeleteTags ¶
func DescribeAgent ¶
func DescribeAlerts ¶
func DescribeApp ¶
func DescribeAppGroup ¶
func DescribeAsset ¶
func DescribeComponent ¶
func DescribeComponentList ¶
func DescribeContainer ¶
func DescribeContainerDetail ¶
func DescribeCron ¶
func DescribeHostDetail ¶
func DescribeHostStatistics ¶
func DescribeHosts ¶
func DescribeIDC ¶
func DescribeIntegrity ¶
func DescribeKernelVersion ¶
func DescribeKmod ¶
func DescribeNetInterface ¶
func DescribePlatform ¶
func DescribePolicyList ¶
func DescribePort ¶
func DescribeProcess ¶
func DescribeRefreshStatus ¶
func DescribeService ¶
func DescribeSoftware ¶
func DescribeStatistics ¶
func DescribeTags ¶
func DescribeTop5 ¶
func DescribeUser ¶
func DescribeVolume ¶
func ExportAlarmListData ¶
func ExportAlarmListDataForVirus ¶
********************************* alarm export *********************************
func ExportAlerts ¶
func ExportData ¶
func ExportHosts ¶
func ExportKubeAlarmListData ¶
********************************* export *********************************
func ExportRaspAlarmListData ¶
func FlushPkgInfo ¶
func FlushPkgInfo()
func GetAgentContainerInfo ¶
func GetAgentDetail ¶
func GetAgentDetail(c *gin.Context, aid string, dst *AlarmDetailDataBaseAgent) error
func GetAgentPkgList ¶
func GetAlarmFilterByWhite ¶
func GetAlarmFilterByWhiteForVirus ¶
********************************* filter by white *********************************
func GetAlarmList ¶
func GetAlarmListForHids ¶
############################### Function ###############################
func GetAlarmListForRasp ¶
func GetAlarmListForVirus ¶
********************************* alarm list *********************************
func GetAlarmStat ¶
func GetAlarmStatForHids ¶
func GetAlarmStatForKube ¶
********************************* Statistics *********************************
func GetAlarmStatForVirus ¶
********************************* Alarm stat *********************************
func GetAlarmSummaryInfo ¶
func GetAlarmSummaryInfoForVirus ¶
********************************* Summary *********************************
func GetClusterConfigList ¶
func GetComponentInstances ¶
func GetNoticeAbstract ¶
func GetNoticeAbstract(msgType string, config *outputer.NoticeMsgConfig) string
func GetNoticeDesc ¶
func GetNoticeList ¶
func GetNoticePluginNameList ¶
func GetOneNoticeConfig ¶
func GetOverviewAlarmStat ¶
############################### Function ###############################
func GetRaspAlarmStat ¶
func GetSubTaskListForVirus ¶
func GetTaskHostListForVirus ¶
func GetTaskListForVirus ¶
func GetUserList ¶
GetUserList 获取用户列表
admin: 管理员 0 advancedUser: 高级用户(Agent读写权限) 1/2 ordinaryUser: 普通用户(Agent只读权限) 3
func GetUserOTPStatus ¶
func GetVirusTaskByID ¶
func GetWhiteListWithCombine ¶
############################### Function ###############################
func GetWhiteListWithCombineForVirus ¶
********************************* whitelist *********************************
func GridFSUpload ¶
func IgnoreAlerts ¶
func InitComponent ¶
func InitComponent()
func InsertAlert ¶
func KubeAddOneAlarm ¶
func KubeCombineAlarmFilter ¶
func KubeCombineAlarmFilter(filter *KubeAlarmFilter, isQueryWhite bool) bson.A
filter
func KubeCreateShDownload ¶
func KubeInnerClusterList ¶
func LicenseDetail ¶
func LicenseOverview ¶
func MetricsForAgentCpu ¶
func MetricsForAgentDisk ¶
func MetricsForAgentMemory ¶
func MetricsForAgentNetwork ¶
func ModifyOneNoticeConfig ¶
func MonitorDescribeHosts ¶
func MonitorExportHost ¶
func MonitorExportService ¶
func MonitorHostAllMetrics ¶
func MonitorHostAvgMetrics ¶
func MonitorHostStatistics ¶
func MonitorServiceList ¶
func MonitorServiceStatus ¶
func MultiDelWhiteListForHids ¶
############################### Function ###############################
func MultiDelWhiteListForKube ¶
********************************* whitelist *********************************
func NoticePushMsgToCustomByHub ¶
func NoticePushMsgToCustomByHub(msg *NoticeMsgData, notice_type string, config *outputer.NoticeMsgConfigCustom) error
func NoticePushMsgToDingdingByHub ¶
func NoticePushMsgToDingdingByHub(msg *NoticeMsgData, notice_type string, config *outputer.NoticeMsgConfigDingding) error
func NoticePushMsgToEWechatByHub ¶
func NoticePushMsgToEWechatByHub(msg *NoticeMsgData, notice_type string, config *outputer.NoticeMsgConfigEnterpriseWechat) error
func NoticePushMsgToEmailByHub ¶
func NoticePushMsgToEmailByHub(msg *NoticeMsgData, notice_type string, config *outputer.NoticeMsgConfigEmail) error
func NoticePushMsgToFeishuByHub ¶
func NoticePushMsgToFeishuByHub(msg *NoticeMsgData, notice_type string, config *outputer.NoticeMsgConfigFeishu) error
********************************* push msg function *********************************
func PolicyDownload ¶
func PublishComponentVersion ¶
func RaspAddOneAlarm ¶
func RefreshData ¶
func ResetAlerts ¶
func SecondaryTreatmentAlarmContent ¶
func SecondaryTreatmentAlarmContent(content *AlarmSummaryContent)
func TestNoticePushMsgToCustomByHub ¶
func TestNoticePushMsgToCustomByHub(config *outputer.NoticeMsgConfigCustom, notice_type string, need_test bool) error
func TestNoticePushMsgToDingdingByHub ¶
func TestNoticePushMsgToDingdingByHub(config *outputer.NoticeMsgConfigDingding, notice_type string, need_test bool) error
func TestNoticePushMsgToEWechatByHub ¶
func TestNoticePushMsgToEWechatByHub(config *outputer.NoticeMsgConfigEnterpriseWechat, notice_type string, need_test bool) error
func TestNoticePushMsgToEmailByHub ¶
func TestNoticePushMsgToEmailByHub(config *outputer.NoticeMsgConfigEmail, notice_type string, need_test bool) error
func TestNoticePushMsgToEs ¶
func TestNoticePushMsgToEs(config *outputer.NoticeMsgConfigEs, need_test bool) error
func TestNoticePushMsgToFeishuByHub ¶
func TestNoticePushMsgToFeishuByHub(config *outputer.NoticeMsgConfigFeishu, notice_type string, need_test bool) error
********************************* test function *********************************
func TestNoticePushMsgToKafka ¶
func TestNoticePushMsgToKafka(config *outputer.NoticeMsgConfigKafka, need_test bool) error
func TestNoticePushMsgToSysLog ¶
func TestNoticePushMsgToSysLog(config *outputer.NoticeMsgConfigSyslog, need_test bool) error
func TransAlarmListReqToAlarmFilter ¶
func TransAlarmListReqToAlarmFilter(req *AlarmListRequest) *alarm.AlarmQueryFilter
func UpdateAlarmStatusMany ¶
func UpdateAlarmStatusManyForKube ¶
********************************* status update *********************************
func UpdateAlarmStatusManyForVirus ¶
********************************* update alarm status *********************************
func UpdateTags ¶
func WebhookDownload ¶
func WhiteListDelMulti ¶
func WhiteListUpdateOne ¶
Types ¶
type AgentBaseline ¶
type AgentBaseline struct { AgentId string `json:"agent_id" bson:"agent_id"` Data baseline.BaselineInfo `json:"data" bson:"data"` DataType string `json:"data_type" bson:"data_type"` }
type AgentContainerInfo ¶
type AgentHbInfo ¶
type AgentHbInfo struct { HostName string `json:"hostname" bson:"hostname"` Platform string `json:"platform" bson:"platform"` PlatformFamily string `json:"platform_family" bson:"platform_family"` PlatformVersion string `json:"platform_version" bson:"platform_version"` InnerIPv4 []string `json:"intranet_ipv4" bson:"intranet_ipv4"` OuterIPv4 []string `json:"extranet_ipv4" bson:"extranet_ipv4"` }
type AgentStatisticsRequest ¶
type AgentStatisticsResponse ¶
type AgentStatisticsResponse struct {
alarm.AlarmOverviewInfo `json:",inline"`
}
type AlarmAssetHost ¶
type AlarmAssetHost struct { HostName string `json:"hostname,omitempty"` InnerIPs []string `json:"in_ip_list,omitempty"` OuterIPs []string `json:"out_ip_list,omitempty"` AgentId string `json:"agent_id,omitempty"` Os string `json:"os,omitempty"` OsPlatform string `json:"os_platform,omitempty"` ContainerName *string `json:"container_name,omitempty"` ContainerImage *string `json:"container_image,omitempty"` Tags []string `json:"tag_list,omitempty"` }
type AlarmAssetInfo ¶
type AlarmAssetInfo struct { Host *AlarmAssetHost `json:"host_info,omitempty"` Cluster *alarm.AlarmAssetKubeCluter `json:"cluster_info,omitempty"` }
type AlarmAttribution ¶
type AlarmDataContainerInfo ¶
type AlarmDataType101 ¶
type AlarmDataType2439 ¶
type AlarmDataType3004 ¶
type AlarmDataType3004 struct {
Path string `json:"path"`
}
type AlarmDataType356 ¶
type AlarmDataType4000 ¶
type AlarmDataType42 ¶
type AlarmDataType49 ¶
type AlarmDataType5003 ¶
type AlarmDataType59 ¶
type AlarmDataType59 struct { PidTree string `json:"pid_tree"` SocketPid string `json:"socket_pid"` SocketArgv string `json:"socket_argv"` SshInfo string `json:"ssh_info"` Ssh string `json:"ssh"` Uid string `json:"uid"` LdPreload string `json:"ld_preload"` RunPath string `json:"run_path"` Comm string `json:"comm"` Stdin string `json:"stdin"` Stdout string `json:"stdout"` }
type AlarmDataType6001 ¶
type AlarmDataType6002 ¶
type AlarmDataType6002 struct { Argv string `json:"argv"` Pid string `json:"pid"` StaticFile string `json:"static_file"` FileHash string `json:"file_hash"` Ppid string `json:"ppid"` Pgid string `json:"pgid"` Uid string `json:"uid"` Class string `json:"class"` Types string `json:"types"` Name string `json:"name"` CreateTime string `json:"create_at"` ModifyTime string `json:"modify_at"` TimeStamp string `json:"timestamp"` }
type AlarmDataType6003 ¶
type AlarmDataType601 ¶
type AlarmDataType602 ¶
type AlarmDataType603 ¶
type AlarmDataType603 struct {
KoFile string `json:"ko_file"`
}
type AlarmDataType604 ¶
type AlarmDataType700 ¶
type AlarmDataType700 struct {
ModuleName string `json:"module_name"`
}
type AlarmDataType701 ¶
type AlarmDataType702 ¶
type AlarmDataType702 struct {
ModuleName string `json:"module_name"`
}
type AlarmDataType703 ¶
type AlarmDataType82 ¶
type AlarmDataType86 ¶
type AlarmDbBaseData ¶
type AlarmDbBaseData struct { AgentId string `json:"agent_id" bson:"agent_id"` HostName string `json:"hostname" bson:"hostname"` DataType string `json:"data_type" bson:"data_type"` InIpv4List string `json:"in_ipv4_list" bson:"in_ipv4_list"` ExIpv4List string `json:"ex_ipv4_list" bson:"ex_ipv4_list"` Pid string `json:"pid" bson:"pid"` Exec string `json:"exe" bson:"exe"` Argv string `json:"argv" bson:"argv"` Ppid string `json:"ppid" bson:"ppid"` PpidArgv string `json:"ppid_argv" bson:"ppid_argv"` Pgid string `json:"pgid" bson:"pgid"` PgidArgv string `json:"pgid_argv" bson:"pgid_argv"` UserName string `json:"username" bson:"username"` PidTree string `json:"pid_tree" bson:"pid_tree"` SocketPid string `json:"socket_pid" bson:"socket_pid"` SocketArgv string `json:"socket_argv" bson:"socket_argv"` SshInfo string `json:"ssh_info" bson:"ssh_info"` Ssh string `json:"ssh" bson:"ssh"` Uid string `json:"uid" bson:"uid"` Dip string `json:"dip" bson:"dip"` Dport string `json:"dport" bson:"dport"` Sip string `json:"sip" bson:"sip"` Sport string `json:"sport" bson:"sport"` TargeId string `json:"target_pid" bson:"target_pid"` PtraceRequest string `json:"ptrace_request" bson:"ptrace_request"` Query string `json:"query" bson:"query"` FilePath string `json:"file_path" bson:"file_path"` ModInfo string `json:"mod_info" bson:"mod_info"` KoFile string `json:"ko_file" bson:"ko_file"` ModuleName string `json:"module_name" bson:"module_name"` SyscallNumber string `json:"syscall_number" bson:"syscall_number"` InterruptNumber string `json:"interrupt_number" bson:"interrupt_number"` Path string `json:"path" bson:"path"` Types string `json:"types" bson:"types"` User string `json:"user" bson:"user"` OldUid string `json:"old_uid,omitempty" bson:"old_uid,omitempty"` OldUserName string `json:"old_username,omitempty" bson:"old_username,omitempty"` TopChain string `json:"top_chain,omitempty" bson:"top_chain,omitempty"` TopRuleChain string `json:"top_rule_chain,omitempty" bson:"top_rule_chain,omitempty"` TopRuleChainUs string `json:"top_rule_chain_us,omitempty" bson:"top_rule_chain_us,omitempty"` AlertType string `json:"alert_type,omitempty" bson:"alert_type,omitempty"` AlertTypeUs string `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"` Suggestion string `json:"suggestion,omitempty" bson:"suggestion,omitempty"` ExtConns string `json:"external_conns,omitempty" bson:"external_conns,omitempty"` InDocker string `json:"docker,omitempty" bson:"docker,omitempty"` TimeStamp string `json:"timestamp,omitempty" bson:"timestamp,omitempty"` ExeHash string `json:"exe_hash,omitempty" bson:"exe_hash,omitempty"` CreateTime string `json:"create_at,omitempty" bson:"create_at,omitempty"` ModifyTime string `json:"modify_at,omitempty" bson:"modify_at,omitempty"` PidSet string `json:"pid_set,omitempty" bson:"pid_set,omitempty"` ConnInfo string `json:"connect_info,omitempty" bson:"connect_info,omitempty"` Md5Hash string `json:"md5_hash,omitempty" bson:"md5_hash,omitempty"` FileType string `json:"class,omitempty" bson:"class,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` AttackId string `json:"attack_id,omitempty" bson:"attack_id,omitempty"` KcAttackIdList string `json:"attack_id_list,omitempty" bson:"attack_id_list,omitempty"` TraceId string `json:"trace_id,omitempty" bson:"trace_id,omitempty"` ProcessNs string `json:"pns,omitempty" bson:"pns,omitempty"` BfSrcList string `json:"src_list,omitempty" bson:"src_list,omitempty"` BfDstList string `json:"dst_list,omitempty" bson:"dst_list,omitempty"` EventId string `json:"event_id,omitempty" bson:"event_id,omitempty"` EventName string `json:"event_name,omitempty" bson:"event_name,omitempty"` ReasonSid string `json:"reason_sid,omitempty" bson:"reason_sid,omitempty"` ReasonIp string `json:"reason_ip,omitempty" bson:"reason_ip,omitempty"` ReasonFile string `json:"reason_file,omitempty" bson:"reason_file,omitempty"` ReasonSidList string `json:"reason_sid_list,omitempty" bson:"reason_sid_list,omitempty"` ReasonIpList string `json:"reason_ip_list,omitempty" bson:"reason_ip_list,omitempty"` ReasonFileList string `json:"reason_file_list,omitempty" bson:"reason_file_list,omitempty"` InIpv6List string `json:"in_ipv6_list,omitempty" bson:"in_ipv6_list,omitempty"` ExIpv6List string `json:"ex_ipv6_list,omitempty" bson:"ex_ipv6_list,omitempty"` LdPreload string `json:"ld_preload,omitempty" bson:"ld_preload,omitempty"` RunPath string `json:"run_path,omitempty" bson:"run_path"` Comm string `json:"comm,omitempty" bson:"comm,omitempty"` Stdin string `json:"stdin,omitempty" bson:"stdin,omitempty"` Stdout string `json:"stdout,omitempty" bson:"stdout,omitempty"` StaticFile string `json:"static_file,omitempty" bson:"static_file,omitempty"` OldName string `json:"old_name,omitempty" bson:"old_name,omitempty"` NewName string `json:"new_name,omitempty" bson:"new_name,omitempty"` FdName string `json:"fd_name,omitempty" bson:"fd_name,omitempty"` Flags string `json:"flags,omitempty" bson:"flags,omitempty"` TargetArgv string `json:"target_argv,omitempty" bson:"target_argv,omitempty"` DataTypeStr string `json:"data_type_str,omitempty" bson:"data_type_str,omitempty"` AlarmId string `json:"alarm_id,omitempty" bson:"alarm_id,omitempty"` }
type AlarmDbData ¶
type AlarmDbData struct { Id string `json:"_id" bson:"_id"` Info HubAlarmInfo `json:"SMITH_ALERT_DATA" bson:"SMITH_ALERT_DATA"` AlarmDbBaseData `json:",inline" bson:",inline"` AlarmDbHandleData `json:",inline" bson:",inline"` }
type AlarmDbHandleData ¶
type AlarmDbHandleData struct { Status int `json:"__alarm_status" bson:"__alarm_status"` UpdateTime int64 `json:"__update_time" bson:"__update_time"` InsertTime int64 `json:"__insert_time" bson:"__insert_time"` HandlerUser string `json:"__handler_user" bson:"__handler_user"` ErrorReason string `json:"__error_reason" bson:"__error_reason"` }
type AlarmDetailData ¶
type AlarmDetailData struct { DataType string `json:"data_type"` DataTypeStr string `json:"data_type_str"` BaseAgent AlarmDetailDataBaseAgent `json:"base_info"` BaseAlarm AlarmDetailDataBaseAlarm `json:"base_alarm_info"` CommAlarm AlarmDetailDataCommAlarm `json:"comm_alarm_info"` ContainerInfo AlarmDataContainerInfo `json:"container_info"` PlusKC *AlarmKillChain `json:"plus_kill_chain,omitempty"` Plus42 *AlarmDataType42 `json:"plus_alarm_info_42,omitempty"` Plus49 *AlarmDataType49 `json:"plus_alarm_info_49,omitempty"` Plus59 *AlarmDataType59 `json:"plus_alarm_info_59,omitempty"` Plus82 *AlarmDataType82 `json:"plus_alarm_info_82,omitempty"` Plus86 *AlarmDataType86 `json:"plus_alarm_info_86,omitempty"` Plus101 *AlarmDataType101 `json:"plus_alarm_info_101,omitempty"` Plus356 *AlarmDataType356 `json:"plus_alarm_info_356,omitempty"` Plus601 *AlarmDataType601 `json:"plus_alarm_info_601,omitempty"` Plus602 *AlarmDataType602 `json:"plus_alarm_info_602,omitempty"` Plus603 *AlarmDataType603 `json:"plus_alarm_info_603,omitempty"` Plus604 *AlarmDataType604 `json:"plus_alarm_info_604,omitempty"` Plus700 *AlarmDataType700 `json:"plus_alarm_info_700,omitempty"` Plus701 *AlarmDataType701 `json:"plus_alarm_info_701,omitempty"` Plus702 *AlarmDataType702 `json:"plus_alarm_info_702,omitempty"` Plus703 *AlarmDataType703 `json:"plus_alarm_info_703,omitempty"` Plus3004 *AlarmDataType3004 `json:"plus_alarm_info_3004,omitempty"` Plus4000 *AlarmDataType4000 `json:"plus_alarm_info_4000,omitempty"` Plus6001 *AlarmDataType6001 `json:"plus_alarm_info_6001,omitempty"` Plus6002 *AlarmDataType6002 `json:"plus_alarm_info_6002,omitempty"` Plus6003 *AlarmDataType6003 `json:"plus_alarm_info_6003,omitempty"` Endpoint string `json:"endpoint,omitempty"` }
type AlarmDetailDataBaseAlarm ¶
type AlarmDetailDataBaseAlarm struct { AlarmType string `json:"alarm_type"` AlarmLevel string `json:"level"` Status int `json:"status"` UpdateTime int64 `json:"update_time"` Desc string `json:"desc"` Suggest string `json:"suggest"` Docker string `json:"docker"` CreateTime int64 `json:"create_time"` HandlerUser string `json:"handle_user,omitempty"` HandlerTime int64 `json:"handle_time,omitempty"` AttackIdList []string `json:"attack_id_list"` TraceId string `json:"trace_id,omitempty"` Name string `json:"name"` }
type AlarmExportDataRequest ¶
type AlarmExportDataRequest struct { AlarmIdList *[]string `json:"alarm_id_list"` Conditions *alarm.AlarmQueryFilter `json:"conditions"` }
type AlarmExtendInfo ¶
type AlarmExtendInfo struct { ListenAddrInfo []AlarmExtendListenPortInfo `json:"listen_ports,omitempty" bson:"listen_ports,omitempty"` VulInfo []AlarmExtendVulInfo `json:"vul_info,omitempty" bson:"vul_info,omitempty"` }
type AlarmExtendInfoProcMatchKey ¶
type AlarmExtendInfoProcMatchKey struct { AgentId string `json:"agent_id"` Pid string `json:"pid"` }
****************************** Alarm summary data struct ******************************
type AlarmExtendVulInfo ¶
type AlarmFilterByWhiteData ¶
type AlarmFilterByWhiteData struct {
Total int64 `json:"total"`
}
type AlarmHostInfo ¶
type AlarmHostInfo struct { HostName string `json:"hostname" bson:"hostname"` InnerIpList []string `json:"inner_ip_list" bson:"inner_ip_list"` OuterIpList []string `json:"outer_ip_list" bson:"outer_ip_list"` AgentId string `json:"agent_id" bson:"agent_id"` }
func GetAlarmHostInfoFromAlarm ¶
func GetAlarmHostInfoFromAlarm(from alarm.AlarmDbDataInfo) *AlarmHostInfo
type AlarmKillChain ¶
type AlarmLangeHeader ¶
type AlarmLangeHeader struct {
Langage string `header:"Accept-Language"`
}
type AlarmListItem ¶
type AlarmListItem struct { AlarmId string `json:"alarm_id"` Status int `json:"status"` Type string `json:"type"` Name string `json:"name"` Level string `json:"level"` AlarmTime int64 `json:"alarm_time"` TraceId string `json:"trace_id"` EventId string `json:"event_id"` EventName string `json:"event_name"` Attribution []AlarmAttribution `json:"attribution_list"` DataType string `json:"data_type"` AgentId string `json:"agent_id,omitempty"` HostName string `json:"alarm_hostname,omitempty"` Host *AlarmHostInfo `json:"host,omitempty"` Cluster *KubeAlarmClusterInfo `json:"cluster,omitempty"` FilePath string `json:"file_path"` FileHash string `json:"file_hash"` ErrReason string `json:"error_reason,omitempty"` }
type AlarmListRequest ¶
type AlarmListRequest struct { Name string `json:"name,omitempty"` Status []int `json:"status,omitempty"` LevelList []string `json:"level,omitempty"` TypeList []string `json:"type,omitempty"` DataType string `json:"data_type,omitempty"` TimeStart int64 `json:"time_start,omitempty"` TimeEnd int64 `json:"time_end,omitempty"` AgentId string `json:"agent_id,omitempty"` EventId string `json:"event_id,omitempty"` EventName string `json:"event_name,omitempty"` EventReason string `json:"event_reason,omitempty"` Hostname string `json:"hostname,omitempty"` Ip string `json:"ip,omitempty"` ClusterId string `json:"cluster_id,omitempty"` ClusterRegion string `json:"cluster_region,omitempty"` ClusterName string `json:"cluster_name,omitempty"` FilePath string `json:"file_path,omitempty"` FileHash string `json:"file_hash,omitempty"` TaskID string `json:"task_id,omitempty"` }
type AlarmNewStatus ¶
type AlarmNodeDbData ¶
type AlarmNodeDbData struct { AgentId string `json:"agent_id" bson:"agent_id"` DataType string `json:"data_type" bson:"data_type"` Pid string `json:"pid" bson:"pid"` Exec string `json:"exe" bson:"exe"` Argv string `json:"argv" bson:"argv"` Ppid string `json:"ppid" bson:"ppid"` PpidArgv string `json:"ppid_argv" bson:"ppid_argv"` Pgid string `json:"pgid" bson:"pgid"` PgidArgv string `json:"pgid_argv" bson:"pgid_argv"` UserName string `json:"username" bson:"username"` PidTree string `json:"pid_tree" bson:"pid_tree"` SocketPid string `json:"socket_pid" bson:"socket_pid"` SocketArgv string `json:"socket_argv" bson:"socket_argv"` SshInfo string `json:"ssh_info" bson:"ssh_info"` Ssh string `json:"ssh" bson:"ssh"` Uid string `json:"uid" bson:"uid"` Dip string `json:"dip" bson:"dip"` Dport string `json:"dport" bson:"dport"` Sip string `json:"sip" bson:"sip"` Sport string `json:"sport" bson:"sport"` TargeId string `json:"target_pid" bson:"target_pid"` PtraceRequest string `json:"ptrace_request" bson:"ptrace_request"` Query string `json:"query" bson:"query"` FilePath string `json:"file_path" bson:"file_path"` ModInfo string `json:"mod_info" bson:"mod_info"` ModuleName string `json:"module_name" bson:"module_name"` SyscallNumber string `json:"syscall_number" bson:"syscall_number"` InterruptNumber string `json:"interrupt_number" bson:"interrupt_number"` Path string `json:"path" bson:"path"` Types string `json:"types" bson:"types"` User string `json:"user" bson:"user"` OldUid string `json:"old_uid,omitempty" bson:"old_uid,omitempty"` OldUserName string `json:"old_username,omitempty" bson:"old_username,omitempty"` InDocker string `json:"docker,omitempty" bson:"docker,omitempty"` TimeStamp string `json:"timestamp,omitempty" bson:"timestamp,omitempty"` ExeHash string `json:"exe_hash,omitempty" bson:"exe_hash,omitempty"` CreateTime string `json:"create_at,omitempty" bson:"create_at,omitempty"` ModifyTime string `json:"modify_at,omitempty" bson:"modify_at,omitempty"` PidSet string `json:"pid_set,omitempty" bson:"pid_set,omitempty"` ConnInfo string `json:"connect_info,omitempty" bson:"connect_info,omitempty"` Md5Hash string `json:"md5_hash,omitempty" bson:"md5_hash,omitempty"` FileType string `json:"class,omitempty" bson:"class,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` ProcessNs string `json:"pns,omitempty" bson:"pns,omitempty"` StaticFile string `json:"static_file,omitempty" bson:"static_file,omitempty"` }
type AlarmNodeDetailData ¶
type AlarmNodeDetailData struct { DataType string `json:"data_type"` CommAlarm AlarmDetailDataCommAlarm `json:"comm_alarm_info"` ContainerInfo AlarmDataContainerInfo `json:"container_info"` Plus42 *AlarmDataType42 `json:"plus_alarm_info_42,omitempty"` Plus49 *AlarmDataType49 `json:"plus_alarm_info_49,omitempty"` Plus59 *AlarmDataType59 `json:"plus_alarm_info_59,omitempty"` Plus101 *AlarmDataType101 `json:"plus_alarm_info_101,omitempty"` Plus601 *AlarmDataType601 `json:"plus_alarm_info_601,omitempty"` Plus602 *AlarmDataType602 `json:"plus_alarm_info_602,omitempty"` Plus603 *AlarmDataType603 `json:"plus_alarm_info_603,omitempty"` Plus604 *AlarmDataType604 `json:"plus_alarm_info_604,omitempty"` Plus700 *AlarmDataType700 `json:"plus_alarm_info_700,omitempty"` Plus701 *AlarmDataType701 `json:"plus_alarm_info_701,omitempty"` Plus702 *AlarmDataType702 `json:"plus_alarm_info_702,omitempty"` Plus703 *AlarmDataType703 `json:"plus_alarm_info_703,omitempty"` Plus3004 *AlarmDataType3004 `json:"plus_alarm_info_3004,omitempty"` Plus4000 *AlarmDataType4000 `json:"plus_alarm_info_4000,omitempty"` Plus6001 *AlarmDataType6001 `json:"plus_alarm_info_6001,omitempty"` Plus6002 *AlarmDataType6002 `json:"plus_alarm_info_6002,omitempty"` Plus6003 *AlarmDataType6003 `json:"plus_alarm_info_6003,omitempty"` }
type AlarmOneHandleFileOpt ¶
type AlarmOverviewResponse ¶
type AlarmOverviewResponse struct { TotalUnhandleAlarmNum int64 `json:"total_unhandle_alarm_num,omitempty"` HostAlarm alarm.AlarmOverviewStat `json:"host_alarm,omitempty"` RaspAlarm alarm.AlarmOverviewStat `json:"rasp_alarm,omitempty"` KubeAlarm alarm.AlarmOverviewStat `json:"kube_alarm,omitempty"` SevenDayTrend []alarm.AlarmOverviewDayTrend `json:"seven_day_trend,omitempty"` }
############################### Data Struct ###############################
type AlarmPrevAndNextRequest ¶
type AlarmPrevAndNextRequest struct { AlarmId string `json:"alarm_id"` Conditions *alarm.AlarmQueryFilter `json:"conditions,omitempty"` }
type AlarmPrevAndNextResponse ¶
type AlarmPrevAndNextResponse struct { Prev *AlarmListItem `json:"prev,omitempty"` Next *AlarmListItem `json:"next,omitempty"` }
type AlarmRawData ¶
type AlarmRawData struct {
RawData map[string]interface{} `json:"rawdata"`
}
type AlarmStatusUpdateInfo ¶
type AlarmStatusUpdateRequest ¶
type AlarmStatusUpdateRequest struct {
Lists []AlarmNewStatus `json:"alarms"`
}
type AlarmSummaryContent ¶
type AlarmSummaryContent struct { AuditLogAlarm *alarm.AlarmKubeDataInfo `json:"audit_log_alarm,omitempty"` AlarmNode *alarm.AlarmHidsDataInfo `json:"alarm_node,omitempty"` KillChainNodeList []alarm.AlarmHidsDataInfo `json:"kill_chain_node_list,omitempty"` KillChainStepList []string `json:"kill_chain_step_list,omitempty"` ExtendInfo *AlarmExtendInfo `json:"extend_info,omitempty"` }
type AlarmSummaryInfoResponse ¶
type AlarmSummaryInfoResponse struct { AssetInfo AlarmAssetInfo `json:"asset_info,omitempty"` AlarmDesc alarm.AlarmDescription `json:"alarm_desc,omitempty"` Content AlarmSummaryContent `json:"alarm_content,omitempty"` RawData map[string]interface{} `json:"raw_data,omitempty"` }
type BaselineCheckInfo ¶
type BaselineCheckInfo struct { BaselineId int `json:"baseline_id" bson:"baseline_id"` CheckId int `json:"check_id" bson:"check_id"` BaselineCheck string `json:"baseline_check" bson:"baseline_check"` Type string `json:"type" bson:"type"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` Solution string `json:"solution" bson:"solution"` Security string `json:"security" bson:"security"` TitleCn string `json:"title_cn" bson:"title_cn"` TypeCn string `json:"type_cn" bson:"type_cn"` DescriptionCn string `json:"description_cn" bson:"description_cn"` SolutionCn string `json:"solution_cn" bson:"solution_cn"` UpdateTime int64 `json:"update_time" bson:"update_time"` PassRate int `json:"pass_rate" bson:"pass_rate"` Status string `json:"status" bson:"status"` }
基线检查项详情
type BasicFingerprintInfo ¶
type BasicHostInfo ¶
type BasicHostInfo struct { AgentID string `json:"agent_id" bson:"agent_id"` IntranetIpv4 []string `json:"intranet_ipv4" bson:"intranet_ipv4"` IntranetIpv6 []string `json:"intranet_ipv6" bson:"intranet_ipv6"` ExtranetIpv4 []string `json:"extranet_ipv4" bson:"extranet_ipv4"` ExtranetIpv6 []string `json:"extranet_ipv6" bson:"extranet_ipv6"` Hostname string `json:"hostname" bson:"hostname"` }
type BasicHostQuery ¶
type BasicHostQuery struct { AgentID string `json:"agent_id"` IP string `json:"ip"` Hostname string `json:"hostname"` }
func (*BasicHostQuery) MarshalToBson ¶
func (q *BasicHostQuery) MarshalToBson(m bson.M)
type ClusterConfigApi ¶
type ClusterConfigApi struct { ClusterId string `json:"cluster_id" bson:"cluster_id"` ClusterName string `json:"cluster_name" bson:"cluster_name"` ClusterRegion string `json:"cluster_region" bson:"cluster_region"` ClusterStatus string `json:"cluster_status" bson:"cluster_status"` CreateTime int64 `json:"create_time" bson:"create_time"` KubeConfig string `json:"kube_config" bson:"kube_config"` User string `json:"user" bson:"user"` ErrReason string `json:"err_reason" bson:"err_reason"` ModuleStatus struct { Threat container.ClusterModuleStatus `json:"threat" bson:"threat"` Application container.ClusterModuleStatus `json:"application" bson:"application"` Baseline container.ClusterModuleStatus `json:"baseline" bson:"baseline"` Exposure container.ClusterModuleStatus `json:"exposure" bson:"exposure"` } `json:"module_status" bson:"module_status"` }
查询cluster配置列表
type Component ¶
type Component struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` Name string `json:"name" bson:"name"` Type string `json:"type" bson:"type"` ArchRequirements []string `json:"arch_requirements" bson:"arch_requirements"` PlatformFamilyRequirements []string `json:"platform_family_requirements" bson:"platform_family_requirements"` Owner string `json:"owner" bson:"owner"` CreateTime int `json:"create_time" bson:"create_time"` LatestPublishTime int `json:"latest_publish_time" bson:",omitempty"` LatestPublishVersion string `json:"latest_publish_version" bson:",omitempty"` LatestPublisher string `json:"latest_publisher" bson:",omitempty"` }
type ComponentFile ¶
type ComponentInstance ¶
type ComponentInstance struct { Name string `json:"name" bson:"name"` Version string `json:"version" bson:"version"` SHA256 string `json:"sha256" bson:"sha256"` DownloadURL []string `json:"download_url" bson:"download_url"` Signature string `json:"signature" bson:"signature"` Type string `json:"type" bson:"type"` }
type ComponentVersion ¶
type ComponentVersion struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` Version string `json:"version" bson:"version"` Files []ComponentFile `json:"files" bson:"files"` Publisher string `json:"publisher" bson:"publisher"` PublishTime int `json:"publish_time" bson:"publish_time"` Component Component `json:"component" bson:"component"` }
type ContextInfo ¶
type CreateComponentReqBody ¶
type CreateComponentReqBody struct { Name string `json:"name" binding:"required_unless=Type agent"` Type string `json:"type" binding:"required,oneof=tar.gz exec agent"` ArchRequirements []string `json:"arch_requirements" bson:"arch_requirements" binding:"required,max=2,unique,dive,oneof=x86_64 aarch64"` PlatformFamilyRequirements []string `` /* 126-byte string literal not displayed */ }
type CreateFileScanTaskRequest ¶
type CreateFileScanTaskRequest struct { Action string `json:"action" bson:"action"` TaskName string `json:"task_name" bson:"task_name"` GeneralHostReq `json:",omitempty,inline" bson:",omitempty,inline"` FilePath string `json:"file_path,omitempty" bson:"file_path,omitempty"` CpuIdle string `json:"cpu_idle,omitempty" bson:"cpu_idle,omitempty"` Timeout string `json:"timeout,omitempty" bson:"timeout,omitempty"` }
type CreatePolicyReqBody ¶
type CreatePolicyReqBody struct { ComponentVersionID primitive.ObjectID `json:"component_version_id" bson:"component_version_id" binding:"required"` Rules []PolicyRule `json:"rules" bson:"rules" binding:"dive"` }
type CreateRebootAgentTaskReqBody ¶
type CreateRebootAgentTaskReqBody struct { TaskName string `json:"task_name" bson:"task_name" binding:"required"` GeneralHostReq `json:",omitempty,inline"` }
type CreateSyncConfigTaskReqBody ¶
type CreateSyncConfigTaskReqBody struct { TaskName string `json:"task_name" bson:"task_name" binding:"required"` GeneralHostReq `json:",omitempty,inline"` }
type CreateTask ¶
type CreateTask struct { Action string `json:"action" bson:"action"` TaskName string `json:"task_name" bson:"task_name"` ModuleId primitive.ObjectID `json:"module_id" bson:"_id"` GeneralHostReq `json:",omitempty,inline"` }
type CreateTaskResponse ¶
type DeletePolicyReqBody ¶
type DescribeAppReq ¶
type DescribeAppReq struct { BasicHostQuery Type string `json:"type" bson:"type"` Name string `json:"name" bson:"name"` }
func (*DescribeAppReq) MarshalToBson ¶
func (q *DescribeAppReq) MarshalToBson(m bson.M)
type DescribeAppRespItem ¶
type DescribeAppRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Name string `json:"name" bson:"name"` Version string `json:"version" bson:"sversion"` Type string `json:"type" bson:"type"` ContainerID string `json:"container_id" bson:"container_id"` ContainerName string `json:"container_name" bson:"container_name"` PID string `json:"pid" bson:"pid"` Exe string `json:"exe" bson:"exe"` Conf string `json:"conf" bson:"conf"` StartTime int64 `json:"start_time" bson:"start_time"` }
type DescribeComponentVersionCriteriaReqQuery ¶
type DescribeComponentVersionCriteriaReqQuery struct {
ComponentID string `form:"component_id" bson:"component_id" binding:"required"`
}
type DescribeContainerDetailResp ¶
type DescribeContainerDetailResp struct { Hostname string `json:"hostname"` Platform string `json:"platform"` IntranetIP string `json:"intranet_ip"` ExtranetIP string `json:"extranet_ip"` CreateTime int `json:"create_time" bson:"create_time"` State string `json:"state" bson:"state"` ID string `json:"id" bson:"id"` Name string `json:"name" bson:"name"` ImageID string `json:"image_id" bson:"image_id"` ImageName string `json:"image_name" bson:"image_name"` GroupName string `json:"group_name" bson:"group_name"` }
type DescribeContainerReq ¶
type DescribeContainerReq struct { BasicHostQuery State []string `json:"state"` ID string `json:"id"` Name string `json:"name"` ImageID string `json:"image_id"` ImageName string `json:"image_name"` CreateTimeStart *int `json:"create_time_start"` CreateTimeEnd *int `json:"create_time_end"` }
func (*DescribeContainerReq) MarshalToBson ¶
func (q *DescribeContainerReq) MarshalToBson(m bson.M)
type DescribeContainerRespItem ¶
type DescribeContainerRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` ContainerID string `json:"id" bson:"id"` Name string `json:"name" bson:"name"` State string `json:"state" bson:"state"` ImageID string `json:"image_id" bson:"image_id"` ImageName string `json:"image_name" bson:"image_name"` CreateTime int `json:"create_time" bson:"create_time"` }
type DescribeCronReqBody ¶
type DescribeCronReqBody struct { BasicHostQuery `bson:"inline"` Path string `json:"path" bson:"path"` Username string `json:"username" bson:"username"` Command string `json:"command" bson:"command"` Checksum string `json:"checksum" bson:"checksum"` }
DescribeCron defs
func (*DescribeCronReqBody) MarshalToBson ¶
func (q *DescribeCronReqBody) MarshalToBson(m bson.M)
type DescribeCronRespItem ¶
type DescribeCronRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Path string `json:"path" bson:"path"` Username string `json:"username" bson:"username"` Command string `json:"command" bson:"command"` Checksum string `json:"checksum" bson:"checksum"` Schedule string `json:"schedule" bson:"schedule"` }
type DescribeHostDetailResp ¶
type DescribeHostDetailResp struct { AgentID string `json:"agent_id"` BootAt int64 `json:"boot_at"` ExtranetIPv4 []string `json:"extranet_ipv4"` ExtranetIPv6 []string `json:"extranet_ipv6"` FirstHeartbeatTime int64 `json:"first_heartbeat_time"` Hostname string `json:"hostname"` Idc string `json:"idc"` IntranetIPv4 []string `json:"intranet_ipv4"` IntranetIPv6 []string `json:"intranet_ipv6"` KernelVersion string `json:"kernel_version"` LastHeartbeatTime int64 `json:"last_heartbeat_time"` Status string `json:"status"` NetMode string `json:"net_mode"` Pid int64 `json:"pid"` Platform string `json:"platform"` Plugins []DescribeHostDetailRespPluginItem `json:"plugins"` Alarm struct { Critical int64 `json:"critical"` High int64 `json:"high"` Medium int64 `json:"medium"` Low int64 `json:"low"` } `json:"alarm"` RaspAlarm struct { Critical int64 `json:"critical"` High int64 `json:"high"` Medium int64 `json:"medium"` Low int64 `json:"low"` } `json:"rasp_alarm"` Virus struct { Critical int64 `json:"critical"` High int64 `json:"high"` Medium int64 `json:"medium"` Low int64 `json:"low"` } `json:"virus"` Vuln struct { Critical int64 `json:"critical"` High int64 `json:"high"` Medium int64 `json:"medium"` Low int64 `json:"low"` } `json:"vuln"` Baseline struct { High int `json:"high"` Medium int `json:"medium"` Low int `json:"low"` Pass int `json:"pass"` } `json:"baseline"` Event struct { Critical int64 `json:"critical"` High int64 `json:"high"` Medium int64 `json:"medium"` Low int64 `json:"low"` } `json:"event"` RaspEvent struct { Critical int64 `json:"critical"` High int64 `json:"high"` Medium int64 `json:"medium"` Low int64 `json:"low"` } `json:"rasp_event"` StartedAt int64 `json:"started_at"` Tags []string `json:"tags"` Version string `json:"version"` PlatformVersion string `json:"platform_version"` Load1 float64 `json:"load_1"` Load5 float64 `json:"load_5"` Load15 float64 `json:"load_15"` CPUUsage float64 `json:"cpu_usage"` MemUsage float64 `json:"mem_usage"` TotalMem int64 `json:"total_mem"` Nproc int64 `json:"nproc"` HostSerial string `json:"host_serial"` HostID string `json:"host_id"` HostModel string `json:"host_model"` HostVendor string `json:"host_vendor"` CPUName string `json:"cpu_name"` DNS string `json:"dns"` Gateway string `json:"gateway"` StartTime int64 `json:"start_time"` BootTime int64 `json:"boot_time"` StateDetail string `json:"state_detail"` }
type DescribeHostDetailRespPluginItem ¶
type DescribeHostDetailRespPluginItem struct { LastHeartbeatTime int64 `json:"last_heartbeat_time"` Name string `json:"name"` Pversion string `json:"pversion"` Status string `json:"status"` StartedAt int64 `json:"started_at"` StartTime int64 `json:"start_time"` CPU float64 `json:"cpu"` Memory int64 `json:"memory"` }
type DescribeHostsRespItem ¶
type DescribeHostsRespItem struct { AgentID string `json:"agent_id"` ExtranetIPv4 []string `json:"extranet_ipv4"` ExtranetIPv6 []string `json:"extranet_ipv6"` IntranetIPv4 []string `json:"intranet_ipv4"` IntranetIPv6 []string `json:"intranet_ipv6"` Hostname string `json:"hostname"` IDC string `json:"idc"` LastHeartbeatTime int64 `json:"last_heartbeat_time"` FirstHeartbeatTime int64 `json:"first_heartbeat_time"` Platform string `json:"platform"` Tags []string `json:"tags"` Risk struct { Vuln int64 `json:"vuln"` Alarm int64 `json:"alarm"` Baseline int64 `json:"baseline"` Event int64 `json:"event"` RaspAlarm int64 `json:"rasp_alarm"` Virus int64 `json:"virus"` } `json:"risk"` Status string `json:"status"` CPU float64 `json:"cpu"` Memory int64 `json:"memory"` StateDetail string `json:"state_detail"` }
type DescribeIntegrityReqBody ¶
type DescribeIntegrityReqBody struct { BasicHostQuery Name string `json:"name"` Version string `json:"version"` OriginDigest string `json:"origin_digest"` Digest string `json:"digest"` Exe string `json:"exe"` ModifyTimeStart *int `json:"modify_time_start"` ModifyTimeEnd *int `json:"modify_time_end"` }
func (*DescribeIntegrityReqBody) MarshalToBson ¶
func (q *DescribeIntegrityReqBody) MarshalToBson(m bson.M)
type DescribeIntegrityRespItem ¶
type DescribeIntegrityRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Name string `json:"name" bson:"software_name"` Version string `json:"version" bson:"software_version"` OriginDigest string `json:"origin_digest" bson:"origin_digest"` Digest string `json:"digest" bson:"digest"` Exe string `json:"exe" bson:"exe"` ModifyTime int `json:"modify_time" bson:"modify_time"` }
type DescribeKmodItem ¶
type DescribeKmodItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Name string `json:"name" bson:"name"` Size string `json:"size" bson:"size"` Refcount string `json:"refcount" bson:"refcount"` UsedBy string `json:"used_by" bson:"used_by"` State string `json:"state" bson:"state"` Addr string `json:"addr" bson:"addr"` }
type DescribeKmodReq ¶
type DescribeKmodReq struct { BasicHostQuery State []string `json:"state" binding:"omitempty,dive,oneof=Live Loading Unloading"` Name string `json:"name"` }
func (*DescribeKmodReq) MarshalToBson ¶
func (q *DescribeKmodReq) MarshalToBson(m bson.M)
type DescribeNetInterfaceItem ¶
type DescribeNetInterfaceItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Name string `json:"name" bson:"name"` Index string `json:"index" bson:"index"` Addrs string `json:"addrs" bson:"addrs"` HardwareAddr string `json:"hardware_addr" bson:"hardware_addr"` MTU string `json:"mtu" bson:"mtu"` }
type DescribeNetInterfaceReq ¶
type DescribeNetInterfaceReq struct {
AgentID string `json:"agent_id" bson:"agent_id"`
}
type DescribePolicyListReqBody ¶
type DescribePolicyListReqBody struct{}
type DescribePortReqBody ¶
type DescribePortReqBody struct { BasicHostQuery Sip string `json:"sip" bson:"sip,omitempty"` Sport string `json:"sport" bson:"sport,omitempty"` Username string `json:"username" bson:"username,omitempty"` Exe string `json:"exe" bson:"exe,omitempty"` Cmdline string `json:"cmdline" bson:"cmdline,omitempty"` Comm string `json:"comm" bson:"comm,omitempty"` Type []int `json:"type" binding:"omitempty,dive,oneof=6 17" bson:"type,omitempty"` }
DescribePort defs
func (*DescribePortReqBody) MarshalToBson ¶
func (q *DescribePortReqBody) MarshalToBson(m bson.M)
type DescribePortRespItem ¶
type DescribePortRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Sip string `json:"sip" bson:"sip"` Sport string `json:"sport" bson:"sport"` Dip string `json:"dip" bson:"dip"` Dport string `json:"dport" bson:"dport"` Interface string `json:"interface" bson:"interface"` Family string `json:"family" bson:"family"` State string `json:"state" bson:"state"` Uid string `json:"uid" bson:"uid"` Username string `json:"username" bson:"username"` Inode string `json:"inode" bson:"inode"` Pid string `json:"pid" bson:"pid"` Exe string `json:"exe" bson:"exe"` Cmdline string `json:"cmdline" bson:"cmdline"` Comm string `json:"comm" bson:"comm"` Type int `json:"type" bson:"-"` ContainerID string `json:"container_id" bson:"container_id"` ContainerName string `json:"container_name" bson:"container_name"` }
type DescribeProcessReqBody ¶
type DescribeProcessReqBody struct { BasicHostQuery Comm string `json:"comm"` Cmdline string `json:"cmdline"` Exe string `json:"exe"` Checksum string `json:"checksum"` Username string `json:"username"` Integrity *bool `json:"integrity"` Common *bool `json:"common"` Container *bool `json:"container"` StartTimeStart *int `json:"start_time_start"` StartTimeEnd *int `json:"start_time_end"` }
DescribeProcess defs
func (*DescribeProcessReqBody) MarshalToBson ¶
func (q *DescribeProcessReqBody) MarshalToBson(m bson.M)
type DescribeProcessRespItem ¶
type DescribeProcessRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Pid string `json:"pid" bson:"pid"` Ppid string `json:"ppid" bson:"ppid"` Comm string `json:"comm" bson:"comm"` Cmdline string `json:"cmdline" bson:"cmdline"` Exe string `json:"exe" bson:"exe"` Checksum string `json:"checksum" bson:"checksum"` Uid string `json:"uid" bson:"ruid"` Username string `json:"username" bson:"rusername"` Euid string `json:"euid" bson:"euid"` Euername string `json:"eusername" bson:"eusername"` StartTime int `json:"start_time" bson:"start_time"` ContainerID string `json:"container_id" bson:"container_id"` ContainerName string `json:"container_name" bson:"container_name"` Integrity bool `json:"integrity" bson:"-"` Common bool `json:"common" bson:"common"` State string `json:"state" bson:"state"` }
type DescribeServiceReqBody ¶
type DescribeServiceReqBody struct { BasicHostQuery `bson:"inline"` Path string `json:"path" bson:"path"` Name string `json:"name"` Type []string `json:"type" binding:"omitempty,dive,oneof=simple exec forking oneshot dbus notify idle"` Command string `json:"command"` Restart string `json:"restart" binding:"omitempty,oneof=false true"` Checksum string `json:"checksum"` }
DescribeService defs
func (*DescribeServiceReqBody) MarshalToBson ¶
func (q *DescribeServiceReqBody) MarshalToBson(m bson.M)
type DescribeServiceRespItem ¶
type DescribeServiceRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Name string `json:"name" bson:"name"` Type string `json:"type" bson:"type"` Command string `json:"command" bson:"command"` Restart string `json:"restart" bson:"restart"` WorkingDirectory string `json:"working_directory" bson:"working_dir"` Checksum string `json:"checksum" bson:"checksum"` }
type DescribeSoftwareReqBody ¶
type DescribeSoftwareReqBody struct { BasicHostQuery `bson:"inline"` Name string `json:"name" bson:"name"` Type []string `json:"type" bson:"type" binding:"omitempty,dive,oneof=dpkg rpm pypi jar"` Version string `json:"version" bson:"sversion"` }
DescribeSoftwaredefs
func (*DescribeSoftwareReqBody) MarshalToBson ¶
func (q *DescribeSoftwareReqBody) MarshalToBson(m bson.M)
type DescribeSoftwareRespItem ¶
type DescribeSoftwareRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Name string `json:"name" bson:"name"` Type string `json:"type" bson:"type"` Version string `json:"version" bson:"sversion"` }
type DescribeStatisticsResp ¶
type DescribeStatisticsResp struct { Port int64 `json:"port"` Process int64 `json:"process"` User int64 `json:"user"` Cron int64 `json:"cron"` Service int64 `json:"service"` Software int64 `json:"software"` Container int64 `json:"container"` Integrity int64 `json:"integrity"` Kmod int64 `json:"kmod"` App int64 `json:"app"` }
type DescribeUserReqBody ¶
type DescribeUserReqBody struct { BasicHostQuery `bson:"inline"` LastLoginIP string `json:"last_login_ip"` Username string `json:"username"` GroupName string `json:"group_name"` LastLoginTimeStart *int64 `json:"last_login_time_start"` LastLoginTimeEnd *int64 `json:"last_login_time_end"` }
DescribeUser defs
func (*DescribeUserReqBody) MarshalToBson ¶
func (q *DescribeUserReqBody) MarshalToBson(m bson.M)
type DescribeUserRespItem ¶
type DescribeUserRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` LastLoginIP string `json:"last_login_ip" bson:"last_login_ip"` LastLoginTime int `json:"last_login_time" bson:"last_login_time"` Username string `json:"username" bson:"username"` Password string `json:"password" bson:"password"` Uid string `json:"uid" bson:"uid"` Gid string `json:"gid" bson:"gid"` Info string `json:"info" bson:"info"` HomeDir string `json:"home_dir" bson:"home"` GroupName string `json:"group_name" bson:"groupname"` Shell string `json:"shell" bson:"shell"` Sudoers string `json:"sudoers" bson:"sudoers"` }
type DescribeVolumeReq ¶
type DescribeVolumeReq struct {
AgentID string `json:"agent_id" bson:"agent_id"`
}
type DescribeVolumeRespItem ¶
type DescribeVolumeRespItem struct { BasicHostInfo `bson:",inline"` BasicFingerprintInfo `bson:",inline"` Name string `json:"name" bson:"name"` MountPoint string `json:"mount_point" bson:"mount_point"` Fstype string `json:"fstype" bson:"fstype"` Total string `json:"total" bson:"total"` Used string `json:"used" bson:"used"` Free string `json:"free" bson:"free"` Usage string `json:"usage" bson:"usage"` }
type DownloadReq ¶
type DownloadReq struct {
FileName string `form:"file_name" json:"file_name" bson:"file_name" binding:"required"`
}
type ExportDataReqBody ¶
type ExportDataReqBody struct { FingerprintType string `json:"fingerprint_type" binding:"oneof=process port user cron service software container integrity app kmod"` IdList []string `json:"id_list" binding:"required_without=Conditions"` Conditions json.RawMessage `json:"conditions" binding:"required_without=IdList"` }
type FPTaskItem ¶
type GeneralHostCond ¶
type GeneralHostCond struct { Hostname string `json:"hostname"` IP string `json:"ip"` Tags []string `json:"tags"` Idc []string `json:"idc"` Platform []string `json:"platform"` Status []string `json:"status" binding:"omitempty,dive,oneof=running offline abnormal uninstall"` AgentID string `json:"agent_id"` Version string `json:"version"` }
func (*GeneralHostCond) GenerateFilter ¶
func (r *GeneralHostCond) GenerateFilter() bson.M
type GeneralHostReq ¶
type GeneralHostReq struct { IdList []string `form:"id_list" json:"id_list" binding:"required_without=Conditions"` Conditions *GeneralHostCond `form:"conditions" json:"conditions" binding:"required_without=IdList"` }
func (*GeneralHostReq) GenerateFilter ¶
func (r *GeneralHostReq) GenerateFilter() bson.M
type HostStatistics ¶
type HostStatistics struct { Uninstalled int64 `json:"uninstalled" bson:"uninstalled"` Running int64 `json:"running" bson:"running"` Abnormal int64 `json:"abnormal" bson:"abnormal"` Offline int64 `json:"offline" bson:"offline"` Alerted int64 `json:"alerted" bson:"alerted"` Vulnerable int64 `json:"vulnerable" bson:"vulnerable"` Baseline int64 `json:"baseline" bson:"baseline"` Total int64 `json:"total" bson:"total"` }
type HubAlarmInfo ¶
type HubAlarmInfo struct {
RuleInfo HubAlarmRuleInfo `json:"RULE_INFO" bson:"RULE_INFO"`
}
type HubAlarmRuleInfo ¶
type HubFeishuMsgFormat ¶
type HubFeishuMsgFormat struct {
AppID string `json:"AppID"`
}
type HubKillChainGraph ¶
type HubKillChainGraph struct {
SmithKey string `json:"smith_key" bson:"smith_key"`
}
type KillChainNodeDbData ¶
type KillChainNodeDbData struct { Id string `json:"_id" bson:"_id"` AlertType string `json:"alert_type,omitempty" bson:"alert_type,omitempty"` AlertTypeUs string `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"` Suggestion string `json:"suggestion,omitempty" bson:"suggestion,omitempty"` Info HubAlarmInfo `json:"SMITH_ALERT_DATA" bson:"SMITH_ALERT_DATA"` NodeList []*AlarmDbBaseData `json:"node_list,omitempty" bson:"node_list,omitempty"` AlarmDbHandleData `json:",inline" bson:",inline"` }
type KubeAbnormalBehaviorFilter ¶
type KubeAbnormalBehaviorFilter struct { KubeAuditLogListFilterComm `json:",inline" bson:",inline"` ActionList []string `json:"action_list,omitempty"` }
AbnormalBehavior
type KubeAbnormalBehaviorListRequest ¶
type KubeAbnormalBehaviorListRequest struct {
Condision KubeAbnormalBehaviorFilter `json:"condition,omitempty"`
}
type KubeAbnormalBehaviorListResponseItem ¶
type KubeAbnormalBehaviorListResponseItem struct { KubeThreatAnalysisListBaseItem `json:",inline" bson:",inline"` Action string `json:"action,omitempty" bson:"verb,omitempty"` Id string `json:"abnormal_id,omitempty" bson:"_id,omitempty"` }
type KubeAlarmBaseInfo ¶
type KubeAlarmBaseInfo struct { AlarmType string `json:"alarm_type"` AlarmLevel string `json:"level"` Status int `json:"status"` UpdateTime int64 `json:"update_time"` AlertDesc string `json:"alert_desc"` Desc string `json:"desc"` Suggest string `json:"suggest"` Docker string `json:"docker"` CreateTime int64 `json:"create_time"` HandlerUser string `json:"handle_user,omitempty"` HandlerTime int64 `json:"handle_time,omitempty"` AttackIdList []string `json:"attack_id_list"` TraceId string `json:"trace_id,omitempty"` Name string `json:"name"` }
type KubeAlarmClusterInfo ¶
type KubeAlarmClusterInfo struct { ClusterId string `json:"cluster_id,omitempty"` ClusterName string `json:"cluster_name,omitempty"` ClusterArea string `json:"cluster_area,omitempty"` RuleTypeFirst string `json:"rule_type_1st,omitempty"` RuleTypeSecond string `json:"rule_type_2nd,omitempty"` }
************************************* ALARM SUMMARY *************************************
type KubeAlarmDbData ¶
type KubeAlarmDbData struct { AlarmId string `json:"alarm_id,omitempty" bson:"_id,omitempty"` KubeAuditLogDbBaseData `json:",inline" bson:",inline"` KubeAuditLogDbRiskData `json:",inline" bson:",inline"` DataType string `json:"data_type" bson:"data_type"` ExecComd string `json:"exec_command,omitempty" bson:"exec_command,omitempty"` ExecContainer string `json:"exec_container,omitempty" bson:"exec_container,omitempty"` ImageList []string `json:"images,omitempty" bson:"images,omitempty"` Asset *string `json:"workload_asset,omitempty" bson:"workload_asset,omitempty"` PrivCap []string `json:"privileged_capabilities,omitempty" bson:"privileged_capabilities,omitempty"` ReadWriteMountList []string `json:"read_write_mounts,omitempty" bson:"read_write_mounts,omitempty"` ReadOnlyMountList []string `json:"read_only_mounts,omitempty" bson:"read_only_mounts,omitempty"` BindRoleref string `json:"binding_roleref,omitempty" bson:"binding_roleref,omitempty"` BindSubject string `json:"binding_subject,omitempty" bson:"binding_subject,omitempty"` }
type KubeAlarmExportDataRequest ¶
type KubeAlarmExportDataRequest struct { AlarmIdList *[]string `json:"alarm_id_list"` Conditions *KubeAlarmFilter `json:"conditions"` }
type KubeAlarmFilter ¶
type KubeAlarmFilter struct { Name string `json:"name,omitempty" bson:"name,omitempty"` ClusterId string `json:"cluster_id,omitempty" bson:"cluster_id,omitempty"` ClusterRegion string `json:"cluster_region,omitempty" bson:"cluster_region,omitempty"` ClusterName string `json:"cluster_name,omitempty" bson:"cluster,omitempty"` StatusList []int `json:"status,omitempty" bson:"status,omitempty"` TypeList []string `json:"type,omitempty" bson:"type,omitempty"` LevelList []string `json:"level,omitempty" bson:"level,omitempty"` StartTime int64 `json:"time_start,omitempty" bson:"time_start,omitempty"` EndTime int64 `json:"time_end,omitempty" bson:"time_end,omitempty"` EventName string `json:"event_name,omitempty" bson:"event_name,omitempty"` EventId string `json:"event_id,omitempty" bson:"event_id,omitempty"` EventReason string `json:"event_reason,omitempty" bson:"event_reason,omitempty"` }
type KubeAlarmListRequest ¶
type KubeAlarmListRequest struct { Name string `json:"name,omitempty"` ClusterId string `json:"cluster_id,omitempty"` ClusterRegion string `json:"cluster_region,omitempty"` ClusterName string `json:"cluster_name,omitempty"` Status []int `json:"status,omitempty"` TypeList []string `json:"type,omitempty"` LevelList []string `json:"level,omitempty"` StartTime int64 `json:"time_start,omitempty"` EndTime int64 `json:"time_end,omitempty"` EventName string `json:"event_name,omitempty"` EventId string `json:"event_id,omitempty"` EventReason string `json:"event_reason,omitempty"` }
type KubeAlarmListResponseItem ¶
type KubeAlarmListResponseItem struct { AlarmId string `json:"alarm_id"` ClusterId string `json:"cluster_id"` Status int `json:"status"` Type string `json:"type"` Name string `json:"name"` Level string `json:"level"` AlarmTime int64 `json:"alarm_time"` EventId string `json:"event_id"` EventName string `json:"event_name"` Attribution []AlarmAttribution `json:"attribution_list"` Cluster KubeAlarmClusterInfo `json:"cluster"` DataType string `json:"data_type"` TraceId string `json:"trace_id"` }
type KubeAlarmSimpleInfoItem ¶
type KubeAlarmSimpleInfoItem struct { AlarmId string `json:"_id,omitempty" bson:"_id,omitempty"` ClusterId string `json:"cluster_id,omitempty" bson:"cluster_id,omitempty"` ClusterName string `json:"cluster_name,omitempty" bson:"cluster,omitempty"` ClusterArea string `json:"cluster_area,omitempty" bson:"cluster_area,omitempty"` RuleName string `json:"rule_name,omitempty" bson:"rule_name,omitempty"` AlertType string `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"` Level string `json:"level,omitempty" bson:"level,omitempty"` Status int `json:"__alarm_status,omitempty" bson:"__alarm_status,omitempty"` CreateTime int64 `json:"__insert_time,omitempty" bson:"__insert_time,omitempty"` }
type KubeAlarmSummaryResponse ¶
type KubeAlarmSummaryResponse struct { DataType string `json:"data_type"` BaseInfo KubeAlarmClusterInfo `json:"alarm_cluster_info,omitempty"` AlarmInfo KubeAlarmBaseInfo `json:"base_alarm_info,omitempty"` AuditLogInfo KubeAuditLogDbRiskData `json:"cluster_auditlog_info,omitempty"` Plus9004 *KubeAuditLogDataPlus9004 `json:"plus_alarm_info_9004,omitempty"` Plus9005 *KubeAuditLogDataPlus9005 `json:"plus_alarm_info_9005,omitempty"` Plus9006 *KubeAuditLogDataPlus9006 `json:"plus_alarm_info_9006,omitempty"` Plus9007 *KubeAuditLogDataPlus9007 `json:"plus_alarm_info_9007,omitempty"` Plus9008 *KubeAuditLogDataPlus9008 `json:"plus_alarm_info_9008,omitempty"` Plus9009 *KubeAuditLogDataPlus9009 `json:"plus_alarm_info_9009,omitempty"` Plus9010 *KubeAuditLogDataPlus9010 `json:"plus_alarm_info_9010,omitempty"` }
type KubeAuditLogDbBaseData ¶
type KubeAuditLogDbBaseData struct { ClusterId string `json:"cluster_id,omitempty" bson:"cluster_id,omitempty"` ClusterName string `json:"cluster_name,omitempty" bson:"cluster,omitempty"` ClusterArea string `json:"cluster_area,omitempty" bson:"cluster_area,omitempty"` RuleName string `json:"rule_name,omitempty" bson:"rule_name,omitempty"` AlertType string `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"` Level string `json:"level,omitempty" bson:"level,omitempty"` AlertDesc string `json:"alert_desc,omitempty" bson:"alert_desc,omitempty"` AttackIds string `json:"attack_id,omitempty" bson:"attack_id,omitempty"` RuleTypeFirst string `json:"rule_type_1st,omitempty" bson:"rule_type_1st,omitempty"` RuleTypeSecond string `json:"rule_type_2nd,omitempty" bson:"rule_type_2nd,omitempty"` RiskDesc string `json:"risk_desc,omitempty" bson:"risk_desc,omitempty"` Suggestion string `json:"suggestion,omitempty" bson:"suggestion,omitempty"` Status int `json:"__alarm_status,omitempty" bson:"__alarm_status,omitempty"` UpdateTime int64 `json:"__update_time,omitempty" bson:"__update_time,omitempty"` CreateTime int64 `json:"__insert_time,omitempty" bson:"__insert_time,omitempty"` HandlerUser string `json:"__handler_user,omitempty" bson:"__handler_user,omitempty"` DataType string `json:"data_type,omitempty" bson:"data_type,omitempty"` }
************************************* ALARM *************************************
type KubeAuditLogDbRiskData ¶
type KubeAuditLogDbRiskData struct { SourceIP string `json:"source_ip,omitempty" bson:"source_ip,omitempty"` SourceAsset string `json:"source_ip_asset,omitempty" bson:"source_ip_asset,omitempty"` UserAgent string `json:"user_agent,omitempty" bson:"user_agent,omitempty"` UserName string `json:"user_name,omitempty" bson:"user_name,omitempty"` UserGroup string `json:"user_groups,omitempty" bson:"user_groups,omitempty"` RealUserName string `json:"real_user_name,omitempty" bson:"real_user_name,omitempty"` RealUserGroup []string `json:"real_user_groups,omitempty" bson:"real_user_groups,omitempty"` ImpUserName string `json:"impersonated_user_name,omitempty" bson:"impersonated_user_name,omitempty"` ImpUserGroup string `json:"impersonated_user_groups,omitempty" bson:"impersonated_user_groups,omitempty"` Verb string `json:"verb,omitempty" bson:"verb,omitempty"` ResNamespace string `json:"resource_namespace,omitempty" bson:"resource_namespace,omitempty"` ResKind string `json:"resource_kind,omitempty" bson:"resource_kind,omitempty"` ResName string `json:"resource_name,omitempty" bson:"resource_name,omitempty"` RequestUri string `json:"request_uri,omitempty" bson:"request_uri,omitempty"` ResponseCode string `json:"response_code,omitempty" bson:"response_code,omitempty"` ResponseStatus string `json:"response_status,omitempty" bson:"response_status,omitempty"` ResponseReason string `json:"response_reason,omitempty" bson:"response_reason,omitempty"` }
type KubeAuditLogListFilterComm ¶
type KubeAuditLogListFilterComm struct { ClusterId string `json:"cluster_id,omitempty"` ClusterName string `json:"cluster_name,omitempty"` Region string `json:"region,omitempty"` RiskNameList []string `json:"risk_name_list,omitempty"` RiskLevelList []string `json:"risk_level_list,omitempty"` SourceIp string `json:"source_ip,omitempty"` SourcePsm string `json:"source_psm,omitempty"` UserAgent string `json:"user_agent,omitempty"` User string `json:"user,omitempty"` UserGroup string `json:"user_group,omitempty"` CreateTimeStart int `json:"create_time_start,omitempty"` CreateTimeEnd int `json:"create_time_end,omitempty"` ResKind string `json:"resource_kind,omitempty"` ResNamespace string `json:"resource_namespace,omitempty"` ResName string `json:"resource_name,omitempty"` }
************************************* THREAT *************************************
type KubeClientInfo ¶
type KubeClusterBaseInfo ¶
type KubeClusterBaseInfo struct { ClusterId string `bson:"cluster_id,omitempty"` ClusterName string `bson:"cluster_name,omitempty"` ClusterArea string `bson:"cluster_region,omitempty"` }
************************************* CLUSTER INFO *************************************
func KubeQueryClusterInfo ¶
func KubeQueryClusterInfo(ctx context.Context, cluster_id string) *KubeClusterBaseInfo
********************************* cluster info *********************************
type KubeResourceInfo ¶
type KubeThreatAnalysisListBaseItem ¶
type KubeThreatAnalysisListBaseItem struct { ClusterId string `json:"cluster_id,omitempty" bson:"cluster_id,omitempty"` ClusterName string `json:"cluster_name,omitempty" bson:"cluster,omitempty"` ClusterArea string `json:"region,omitempty" bson:"cluster_area,omitempty"` RuleName string `json:"risk_name,omitempty" bson:"rule_name,omitempty"` Level string `json:"risk_level,omitempty" bson:"level,omitempty"` UserAgent string `json:"user_agent,omitempty" bson:"user_agent,omitempty"` UserName string `json:"user,omitempty" bson:"real_user_name,omitempty"` UserGroup []string `json:"user_group_list,omitempty" bson:"real_user_groups,omitempty"` CreateTime int64 `json:"create_time,omitempty" bson:"__insert_time,omitempty"` ResNamespace *string `json:"resource_namespace,omitempty" bson:"resource_namespace,omitempty"` ResKind *string `json:"resource_kind,omitempty" bson:"resource_kind,omitempty"` ResName *string `json:"resource_name,omitempty" bson:"resource_name,omitempty"` SourceIP *string `json:"source_ip,omitempty" bson:"source_ip,omitempty"` SourceAsset *string `json:"source_ip_asset,omitempty" bson:"source_ip_asset,omitempty"` ResInfo KubeResourceInfo `json:"resource_info,omitempty" bson:"resource_info,omitempty"` Source KubeClientInfo `json:"source_info,omitempty" bson:"source_info,omitempty"` }
func (*KubeThreatAnalysisListBaseItem) KubeTransThreatRawBaseDataToRspBaseData ¶
func (t *KubeThreatAnalysisListBaseItem) KubeTransThreatRawBaseDataToRspBaseData()
type KubeThreatPreviewResponse ¶
type KubeThreatPreviewResponse struct {
kube.KubeThreatStatistics `json:",inline" bson:",inline"`
}
preview
type KubeThreatResourceCreatFilter ¶
type KubeThreatResourceCreatFilter struct { KubeAuditLogListFilterComm `json:",inline" bson:",inline"` ImageName string `json:"image_name,omitempty"` ReadonlyMount string `json:"read_only_mount,omitempty"` ReadwriteMount string `json:"read_write_mount,omitempty"` }
ThreatResourceCreat
type KubeThreatResourceCreatListRequest ¶
type KubeThreatResourceCreatListRequest struct {
Condision KubeThreatResourceCreatFilter `json:"condition,omitempty"`
}
type KubeThreatResourceCreatListResponseItem ¶
type KubeThreatResourceCreatListResponseItem struct { KubeThreatAnalysisListBaseItem `json:",inline" bson:",inline"` Id string `json:"threatres_id,omitempty" bson:"_id,omitempty"` ImageList []string `json:"image_list,omitempty" bson:"images,omitempty"` ReadOnlyMountList []string `json:"read_only_mount_list,omitempty" bson:"read_only_mounts,omitempty"` ReadWriteMountList []string `json:"read_write_mount_list,omitempty" bson:"read_write_mounts,omitempty"` }
type LicenseDetailInfo ¶
type LicenseDetailInfo struct { HUB LicenseDetailInfoItem `json:"hub"` Trace LicenseDetailInfoItem `json:"trace"` K8s LicenseDetailInfoItem `json:"k8s"` Rule LicenseDetailInfoItem `json:"rule"` Rasp LicenseDetailInfoItem `json:"rasp"` }
type LicenseDetailInfoItem ¶
type LicenseDetailResp ¶
type LicenseDetailResp struct { Company string `json:"company_name"` Status LicenseDetailInfo `json:"status"` }
type LicenseOverviewInfo ¶
type LicenseOverviewResp ¶
type LicenseOverviewResp struct { Company string `json:"company_name"` Status LicenseOverviewInfo `json:"status"` }
type NoticeAddOneRequest ¶
type NoticeAddOneRequest struct {
NoticeWriteRequestComm `json:",inline" bson:",inline"`
}
type NoticeCommResponse ¶
type NoticeCommResponse struct { NoticeId *string `json:"notice_id,omitempty" bson:"notice_id,omitempty"` TestResult *NoticeConnectTestResult `json:"test_result,omitempty" bson:"test_result,omitempty"` }
type NoticeConnectTestResult ¶
type NoticeConnectTestResult struct { Status int `json:"status" bson:"status"` ErrMsg string `json:"err_msg" bson:"err_msg"` }
********************************* struct *********************************
type NoticeDelOneRequest ¶
type NoticeDelOneRequest struct {
NoticeId string `json:"notice_id" bson:"notice_id"`
}
type NoticeModifyOneRequest ¶
type NoticeModifyOneRequest struct { NoticeId string `json:"notice_id" bson:"notice_id"` NoticeWriteRequestComm `json:",inline" bson:",inline"` }
type NoticeMsgData ¶
type NoticeMsgData struct { AlertType string `json:"alert_type_us,omitempty"` RuleName string `json:"rule_name,omitempty"` HostName string `json:"hostname,omitempty"` Timestamp string `json:"time,omitempty"` Service []NoticeReminderMsgContent `json:"service,omitempty"` }
type NoticeReminderMsgContent ¶
type NoticeReminderMsgContent struct { Name string `json:"name"` ExpireTime int64 `json:"expire_time"` }
********************************* struct *********************************
type NoticeWriteRequestComm ¶
type NoticeWriteRequestComm struct { Type string `json:"notice_type" bson:"notice_type"` LevelList []string `json:"notice_level_list" bson:"notice_level_list"` MsgType string `json:"notice_config_type" bson:"notice_config_type"` MsgConfig outputer.NoticeMsgConfig `json:"notice_config" bson:"notice_config"` TestOnly bool `json:"test_only,omitempty" bson:"test_only,omitempty"` }
type PageResponseStruct ¶
type PageResponseStruct struct { Code int `json:"code"` Message string `json:"msg"` Data interface{} `json:"data"` PageInfo common.PageResponse `json:"page_info"` }
PageResponseStruct PageResponse 带分页的返回
type PkgInfo ¶
type PkgInfo struct { AgentId string `json:"agent_id" bson:"agent_id"` PackageSeq string `json:"package_seq" bson:"package_seq"` Type string `json:"type" bson:"type"` Token string `json:"token" bson:"token"` Name string `json:"name" bson:"name"` Version string `json:"sversion" bson:"version"` Source string `json:"source" bson:"source"` Status string `json:"status" bson:"status"` Vendor string `json:"vendor" bson:"vendor"` Cmdline string `json:"cmdline" bson:"cmdline"` Pid string `json:"pid" bson:"pid"` Path string `json:"path" bson:"path"` ContainerName string `json:"container_name" bson:"container_name"` ContainerId string `json:"container_id" bson:"container_id"` }
type Policy ¶
type Policy struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` ComponentVersion `json:"component_version" bson:"component_version"` Type string `json:"type" bson:"type"` CreateTime int `json:"create_time" bson:"create_time"` Creator string `json:"creator" bson:"creator"` Rules []PolicyRule `json:"rules" bson:"rules"` }
func (*Policy) GetIntance ¶
func (p *Policy) GetIntance(info *ContextInfo) (*ComponentInstance, error)
type PolicyRule ¶
type PolicyRule struct { Key string `json:"key" bson:"key" binding:"oneof=agent_id tag kernel_version"` Operator string `json:"operator" bson:"operator" binding:"oneof=$in $regex"` Value string `json:"value" bson:"value" binding:"required"` }
func (*PolicyRule) Find ¶
func (r *PolicyRule) Find(value interface{}) (bool, error)
func (*PolicyRule) ToBson ¶
func (r *PolicyRule) ToBson() bson.M
type RaspAlarmAbstractData ¶
type RaspAlarmAbstractData struct { DataType string `json:"data_type"` BaseAgent AlarmDetailDataBaseAgent `json:"base_info"` BaseAlarm RaspAlarmDataBaseInfo `json:"base_alarm_info"` ContainerInfo AlarmDataContainerInfo `json:"container_info"` Plus2439 *AlarmDataType2439 `json:"plus_alarm_info_2439,omitempty"` }
type RaspAlarmDataBaseInfo ¶
type RaspAlarmDataBaseInfo struct { AlarmType string `json:"alarm_type"` AlarmLevel string `json:"level"` Status int `json:"status"` UpdateTime int64 `json:"update_time"` Desc string `json:"desc"` Suggest string `json:"suggest"` Docker string `json:"docker"` CreateTime int64 `json:"create_time"` HandlerUser string `json:"handle_user,omitempty"` HandlerTime int64 `json:"handle_time,omitempty"` AttackIdList []string `json:"attack_id_list"` TraceId string `json:"trace_id,omitempty"` Name string `json:"name"` }
type RaspAlarmDbBaseData ¶
type RaspAlarmDbBaseData struct { AgentId string `json:"agent_id" bson:"agent_id"` HostName string `json:"hostname" bson:"hostname"` DataType string `json:"data_type" bson:"data_type"` InIpv4List string `json:"in_ipv4_list" bson:"in_ipv4_list"` ExIpv4List string `json:"ex_ipv4_list" bson:"ex_ipv4_list"` InIpv6List string `json:"in_ipv6_list,omitempty" bson:"in_ipv6_list,omitempty"` ExIpv6List string `json:"ex_ipv6_list,omitempty" bson:"ex_ipv6_list,omitempty"` Suggestion string `json:"suggestion,omitempty" bson:"suggestion,omitempty"` AlertType string `json:"alert_type,omitempty" bson:"alert_type,omitempty"` AlertTypeUs string `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"` AttackId string `json:"attack_id,omitempty" bson:"attack_id,omitempty"` KcAttackIdList string `json:"attack_id_list,omitempty" bson:"attack_id_list,omitempty"` ArgsList []string `json:"args_array,omitempty" bson:"args_array,omitempty"` Pid string `json:"pid,omitempty" bson:"pid,omitempty"` NsPid string `json:"nspid,omitempty" bson:"nspid,omitempty"` Sid string `json:"sid,omitempty" bson:"sid,omitempty"` ProbeHook string `json:"probe_hook,omitempty" bson:"probe_hook,omitempty"` StackTraceFormat string `json:"stack_trace_format,omitempty" bson:"stack_trace_format,omitempty"` StackTraceHash string `json:"stack_trace_hash,omitempty" bson:"stack_trace_hash,omitempty"` TraceId string `json:"trace_id,omitempty" bson:"trace_id,omitempty"` EventId string `json:"event_id,omitempty" bson:"event_id,omitempty"` EventName string `json:"event_name,omitempty" bson:"event_name,omitempty"` InDocker string `json:"in_container,omitempty" bson:"in_container,omitempty"` }
type RaspAlarmDbData ¶
type RaspAlarmDbData struct { Id string `json:"_id" bson:"_id"` Info HubAlarmInfo `json:",inline" bson:",inline"` RuleName string `json:"rule_name" bson:"rule_name"` HarmLevel string `json:"HarmLevel" bson:"HarmLevel"` Desc string `json:"Desc" bson:"Desc"` AlarmDbHandleData `json:",inline" bson:",inline"` RaspAlarmDbBaseData `json:",inline" bson:",inline"` }
type RaspAlarmExportDataRequest ¶
type RaspAlarmExportDataRequest struct { AlarmIdList *[]string `json:"alarm_id_list"` Conditions *RaspAlarmQueryFilter `json:"conditions"` }
type RaspAlarmListItem ¶
type RaspAlarmListItem struct { AlarmId string `json:"alarm_id"` AgentId string `json:"agent_id"` Status int `json:"status"` Type string `json:"type"` Name string `json:"name"` Level string `json:"level"` HostName string `json:"alarm_hostname"` AlarmTime int64 `json:"alarm_time"` TraceId string `json:"trace_id"` EventId string `json:"event_id"` EventName string `json:"event_name"` Attribution []AlarmAttribution `json:"attribution_list"` Host AlarmHostInfo `json:"host"` DataType string `json:"data_type"` ErrReason string `json:"error_reason,omitempty"` }
type RaspAlarmListRequest ¶
type RaspAlarmListRequest struct { Name string `json:"name,omitempty"` Status []int `json:"status,omitempty"` LevelList []string `json:"level,omitempty"` TypeList []string `json:"type,omitempty"` DataType string `json:"data_type,omitempty"` TimeStart int64 `json:"time_start,omitempty"` TimeEnd int64 `json:"time_end,omitempty"` AgentId string `json:"agent_id,omitempty"` EventId string `json:"event_id,omitempty"` EventName string `json:"event_name,omitempty"` EventReason string `json:"event_reason,omitempty"` Hostname string `json:"hostname,omitempty"` Ip string `json:"ip,omitempty"` }
type RaspAlarmQueryFilter ¶
type RaspAlarmQueryFilter struct { Name string `json:"name" bson:"name"` StatusList []int `json:"status" bson:"status"` Hostname string `json:"hostname" bson:"hostname"` Ip string `json:"ip" bson:"ip"` TypeList []string `json:"type" bson:"type"` LevelList []string `json:"level" bson:"level"` StartTime int64 `json:"time_start" bson:"time_start"` EndTime int64 `json:"time_end" bson:"time_end"` AgentId string `json:"agent_id" bson:"agent_id"` EventName string `json:"event_name" bson:"event_name"` EventId string `json:"event_id" bson:"event_id"` EventReason string `json:"event_reason" bson:"event_reason"` }
type RaspAlarmRawDataItem ¶
type RaspAlarmRawDataItem struct {
RawData map[string]interface{} `json:"rawdata"`
}
type RaspAlarmStatistics ¶
type RaspAlarmStatistics struct { Total int `json:"alarm_total"` CriticalLevelNum int `json:"alarm_critical_num"` HighLevelNum int `json:"alarm_high_num"` MediumLevelNum int `json:"alarm_medium_num"` LowLevelNum int `json:"alarm_low_num"` ProcessedNum int `json:"alarm_processed_num"` WhiteListNum int `json:"alarm_white_num"` }
type RaspAlarmStatisticsRequest ¶
type RaspAlarmStatisticsRequest struct {
AgentId string `form:"agent_id"`
}
type RaspAlarmStatusUpdateRequest ¶
type RaspAlarmStatusUpdateRequest struct { AlarmIdList *[]string `json:"alarm_id_list"` Conditions *RaspAlarmQueryFilter `json:"conditions"` NewStatus int `json:"status"` }
type RefreshDataReqBody ¶
type ResponseStuct ¶
type ResponseStuct struct { Code int `json:"code"` Message string `json:"msg"` Data interface{} `json:"data"` }
ResponseStuct Response 常规返回值
type TagsReq ¶
type TagsReq struct { Tags []string `json:"tags" bson:"tags" binding:"required,unique"` GeneralHostReq `json:",omitempty,inline"` }
type TaskDetail ¶
type TaskDetail struct { TaskId string `json:"task_id" bson:"task_id"` TaskName string `json:"task_name" bson:"task_name"` TaskStatus string `json:"task_status" bson:"task_status"` Action string `json:"action" bson:"action"` TaskUser string `json:"task_user" bson:"task_user"` Tag string `json:"tag" bson:"tag"` IdCount int `json:"id_count" bson:"id_count"` SubTaskCreated int `json:"sub_task_created" bson:"sub_task_created"` SubTaskFailed int `json:"sub_task_failed" bson:"sub_task_failed"` SubTaskSucceed int `json:"sub_task_succeed" bson:"sub_task_succeed"` CreateTime int64 `json:"create_time" bson:"create_time"` UpdateTime int64 `json:"update_time" bson:"update_time"` }
type UploadRuleInfo ¶
type VirusAlarmListRequest ¶
type VirusAlarmListRequest struct { AlarmListRequest `json:",inline"` TaskId *string `json:"task_id,omitempty"` }
type VirusHostInfo ¶
type VirusScanAlarmListItem ¶
type VirusScanAlarmListItem struct { AlarmId string `json:"alarm_id"` AgentId string `json:"agent_id"` Status int `json:"status"` Type string `json:"type"` Name string `json:"name"` Level string `json:"level"` HostName string `json:"alarm_hostname"` AlarmTime int64 `json:"alarm_time"` Host AlarmHostInfo `json:"host"` FilePath string `json:"file_path"` FileHash string `json:"file_hash"` ErrReason string `json:"error_reason,omitempty"` }
********************************* struct *********************************
type VirusScanTaskListFilter ¶
type VirusScanTaskListFilter struct { TaskName string `json:"task_name,omitempty" bson:"task_name,omitempty"` TaskStatus []string `json:"task_status,omitempty" bson:"task_status,omitempty"` Action []string `json:"action,omitempty" bson:"action,omitempty"` TaskUser string `json:"task_user,omitempty" bson:"task_user,omitempty"` FilePath string `json:"file_path,omitempty" bson:"file_path,omitempty"` }
type VirusScanTaskListRequest ¶
type VirusScanTaskListRequest struct {
VirusScanTaskListFilter `json:",inline" bson:",inline"`
}
type VirusScanTaskOptRequest ¶
type VirusSubTaskAndAgentJoinResult ¶
type VirusSubTaskAndAgentJoinResult struct { VirusSubTaskDetail `json:",inline" bson:",inline"` InventoryDocs []VirusSubTaskName `json:"inventory_docs" bson:"inventory_docs"` }
type VirusSubTaskDetail ¶
type VirusSubTaskDetailWithResult ¶
type VirusSubTaskDetailWithResult struct { TaskId string `json:"task_id" bson:"task_id"` AgentId string `json:"agent_id" bson:"agent_id"` Status string `json:"status" bson:"status"` Hostname string `json:"hostname" bson:"hostname"` UpdateTime int64 `json:"update_time" bson:"update_time"` TaskResult VirusSubTaskResult `json:"task_result" bson:"task_result"` }
type VirusSubTaskInfo ¶
type VirusSubTaskListItem ¶
type VirusSubTaskListItem struct { TaskId string `json:"task_id" bson:"task_id"` AgentId string `json:"agent_id" bson:"agent_id"` Status string `json:"status" bson:"status"` Hostname string `json:"hostname" bson:"hostname"` UpdateTime int64 `json:"update_time" bson:"update_time"` FailReason string `json:"fail_reason,omitempty" bson:"fail_reason,omitempty"` }
type VirusSubTaskListRequest ¶
type VirusSubTaskName ¶
type VirusSubTaskResult ¶
type VirusSubTaskResult struct {
Msg string `json:"msg,omitempty" bson:"msg,omitempty"`
}
type VirusSubTaskWithResultAndAgentJoin ¶
type VirusSubTaskWithResultAndAgentJoin struct { VirusSubTaskDetailWithResult `json:",inline" bson:",inline"` InventoryDocs []VirusSubTaskName `json:"inventory_docs" bson:"inventory_docs"` }
type VirusTaskDetail ¶
type VirusTaskDetail struct { TaskDetail `json:",inline" bson:",inline"` FilePath string `json:"file_path" bson:"file_path"` }
type VirusTaskRunConfig ¶
type VirusTaskRunningInfo ¶
type VirusTaskRunningInfo struct { Tag string `json:"tag" bson:"tag"` IDList []string `json:"id_list" bson:"id_list"` TaskName string `json:"task_name" bson:"task_name"` TaskID string `json:"task_id" bson:"task_id"` TaskType string `json:"task_type" bson:"task_type"` TaskStatus string `json:"task_status" bson:"task_status"` //记录任务状态 IDCount float64 `json:"id_count" bson:"id_count"` DistributedCount int `json:"distributed_count" bson:"distributed_count"` //下发总数,可能未执行完成 Action string `json:"action" bson:"action"` TaskUser string `json:"task_user" bson:"task_user"` SubTaskCreated int `json:"sub_task_created" bson:"sub_task_created"` SubTaskRunning int `json:"sub_task_running" bson:"sub_task_running"` SubTaskFailed int `json:"sub_task_failed" bson:"sub_task_failed"` SubTaskSucceed int `json:"sub_task_succeed" bson:"sub_task_succeed"` CreateTime int64 `json:"create_time" bson:"create_time"` UpdateTime int64 `json:"update_time" bson:"update_time"` Config VirusTaskRunConfig `json:"config" bson:"config"` }
type WhiteListDelReq ¶
type WhiteListDelReq struct {
IdList []string `json:"id_list"`
}
############################### Data Struct ###############################
type WhiteListDelRspItem ¶
type WhiteListUpdateReq ¶
Source Files ¶
- alarm.go
- alarm_comm.go
- alarm_data_type.go
- alarm_stat.go
- alarm_whitelist.go
- asset_center.go
- baseline.go
- component.go
- fingerprint.go
- ko.go
- kube_cluster.go
- kube_sec.go
- kube_sec_data_type.go
- license.go
- monitor_agent.go
- monitor_host.go
- monitor_service.go
- notice.go
- notice_msg_push.go
- otp.go
- overview.go
- rasp.go
- rasp_alarm.go
- rasp_alarm_whitelist.go
- rasp_data_type.go
- rasp_vuln.go
- response.go
- shared.go
- system.go
- task.go
- user.go
- virus_detection.go
- vuln.go
- whitelist_comm.go