Documentation ¶
Overview ¶
Package report provides report service for veinmind-runner and veinmind-plugin
Index ¶
- Constants
- func DefaultReportClient(pOpts ...PluginOption) *reportClient
- type AlertDetail
- type AlertType
- type AssetApplicationDetails
- type AssetDetail
- type AssetOSDetail
- type AssetPackageDetail
- type AssetPackageDetails
- type BackdoorDetail
- type BasicDetail
- type DetectType
- type EventType
- type FileDetail
- type HistoryDetail
- type Level
- type MaliciousFileDetail
- type PluginOption
- type ReportEvent
- type ReportService
- type SensitiveEnvDetail
- type SensitveFileDetail
- type WeakpassDetail
- type WeakpassService
Constants ¶
View Source
const BufferSize = 1 << 8
View Source
const Namespace = "github.com/chaitin/veinmind-tools/veinmind-common/go/service/report"
Variables ¶
This section is empty.
Functions ¶
func DefaultReportClient ¶
func DefaultReportClient(pOpts ...PluginOption) *reportClient
Types ¶
type AlertDetail ¶
type AlertDetail struct { MaliciousFileDetail *MaliciousFileDetail `json:"malicious_file_detail,omitempty"` WeakpassDetail *WeakpassDetail `json:"weakpass_detail,omitempty"` BackdoorDetail *BackdoorDetail `json:"backdoor_detail,omitempty"` SensitiveFileDetail *SensitveFileDetail `json:"sensitive_file_detail,omitempty"` SensitiveEnvDetail *SensitiveEnvDetail `json:"sensitive_env_detail,omitempty"` HistoryDetail *HistoryDetail `json:"history_detail,omitempty"` AssetDetail *AssetDetail `json:"asset_detail,omitempty"` BasicDetail *BasicDetail `json:"basic_detail,omitempty"` }
type AlertType ¶
type AlertType uint32
func (AlertType) MarshalJSON ¶
func (*AlertType) UnmarshalJSON ¶
type AssetApplicationDetails ¶
type AssetApplicationDetails struct { Type string `json:"type"` FilePath string `json:"file_path,omitempty"` Packages []AssetPackageDetail `json:"packages"` }
type AssetDetail ¶
type AssetDetail struct { OS AssetOSDetail `json:"os"` PackageInfos []AssetPackageDetails `json:"package_infos"` Applications []AssetApplicationDetails `json:"applications"` }
type AssetOSDetail ¶
type AssetPackageDetail ¶
type AssetPackageDetail struct { Name string `json:"name"` Version string `json:"version"` Release string `json:"release"` Epoch int `json:"epoch"` Arch string `json:"arch"` SrcName string `json:"srcName"` SrcVersion string `json:"srcVersion"` SrcRelease string `json:"srcRelease"` SrcEpoch int `json:"srcEpoch"` Modularitylabel string `json:"modularitylabel"` Indirect bool `json:"indirect"` License string `json:"license"` Layer string `json:"layer"` }
type AssetPackageDetails ¶
type AssetPackageDetails struct { FilePath string `json:"file_path"` Packages []AssetPackageDetail `json:"packages"` }
type BackdoorDetail ¶
type BackdoorDetail struct { FileDetail Description string `json:"description"` }
type BasicDetail ¶
type DetectType ¶
type DetectType uint32
const ( Image DetectType = iota Container )
func (DetectType) MarshalJSON ¶
func (d DetectType) MarshalJSON() ([]byte, error)
func (*DetectType) UnmarshalJSON ¶
func (d *DetectType) UnmarshalJSON(b []byte) error
type EventType ¶
type EventType uint32
func (EventType) MarshalJSON ¶
func (*EventType) UnmarshalJSON ¶
type FileDetail ¶
type HistoryDetail ¶
type MaliciousFileDetail ¶
type MaliciousFileDetail struct { FileDetail Engine string `json:"engine"` MaliciousType string `json:"malicious_type"` MaliciousName string `json:"malicious_name"` }
type PluginOption ¶
type PluginOption func(r *reportClient) (*reportClient, error)
PluginOption use for plugin standalone version (without host)
func WithDisableLog ¶
func WithDisableLog() PluginOption
type ReportEvent ¶
type ReportEvent struct { ID string `json:"id"` Time time.Time `json:"time"` Level Level `json:"level"` DetectType DetectType `json:"detect_type"` EventType EventType `json:"event_type"` AlertType AlertType `json:"alert_type"` AlertDetails []AlertDetail `json:"alert_details"` }
type ReportService ¶
type ReportService struct {
EventChannel chan ReportEvent
}
func NewReportService ¶
func NewReportService() *ReportService
func (*ReportService) Add ¶
func (s *ReportService) Add(registry *service.Registry)
func (*ReportService) Report ¶
func (s *ReportService) Report(evt ReportEvent)
type SensitiveEnvDetail ¶
type SensitveFileDetail ¶
type SensitveFileDetail struct { FileDetail RuleID int64 `json:"rule_id"` RuleName string `json:"rule_name"` RuleDescription string `json:"rule_description"` }
type WeakpassDetail ¶
type WeakpassDetail struct { Username string `json:"username"` Password string `json:"password"` Service WeakpassService `json:"service"` }
type WeakpassService ¶
type WeakpassService uint32
const (
SSH WeakpassService = iota
)
func (WeakpassService) MarshalJSON ¶
func (w WeakpassService) MarshalJSON() ([]byte, error)
func (*WeakpassService) UnmarshalJSON ¶
func (w *WeakpassService) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.