Documentation ¶
Index ¶
- Constants
- Variables
- func Validate(e Entity) []validator.FieldError
- type AnalysisCheck
- type AnalysisName
- type ApiFinding
- type ApiMatcher
- type ApiRule
- type BinType
- type BinaryAnalysis
- type BinaryAnalysisResult
- type Bits
- type BundleUrlType
- type CodeAnalysis
- type CodeFinding
- type CodeMatcher
- type CodeRule
- type Command
- type Configuration
- type CpuType
- type EmailFinding
- type Endianness
- type Entity
- type Error
- type FileAnalysis
- type InsecureConnections
- type Level
- type LogLevel
- type LogMessage
- type MachoInfo
- type Match
- type PListAnalysis
- type Permission
- type StaticAnalysis
- type Status
- type StoreAnalysis
- type StoreResult
- type SubCpuType
- type ToolUrls
- type UrlFinding
- type VirusAnalysis
- type VirusReport
- type VirusResponse
- type VirusScan
Constants ¶
View Source
const ( Swift BinType = "Swift" ObjC BinType = "ObjC" Bits32 Bits = 32 Bits64 Bits = 64 BigEndian Endianness = "BigEndian" LittleEndian Endianness = "LittleEndian" SecureStatus Status = "secure" InsecureStatus Status = "insecure" InfoStatus Status = "info" WarningStatus Status = "warning" VAX CpuType = "VAX" MC680X0 CpuType = "MC680x0" I386 CpuType = "i386" X8664 CpuType = "x86_64" MIPS CpuType = "MIPS" MC98000 CpuType = "MC98000" HPPA CpuType = "HPPA" ARM CpuType = "ARM" ARM64 CpuType = "ARM64" MC88000 CpuType = "MC88000" SPARC CpuType = "SPARC" I860 CpuType = "i860" Alpha CpuType = "Alpha" PowerPC CpuType = "PowerPC" PowerPC64 CpuType = "PowerPC64" IntelModelAll SubCpuType = "CPU_SUBTYPE_INTEL_MODEL_ALL" IntelHTT SubCpuType = "CPU_THREADTYPE_INTEL_HTT" I386All SubCpuType = "CPU_SUBTYPE_I386_ALL" I486 SubCpuType = "CPU_SUBTYPE_486" I586 SubCpuType = "CPU_SUBTYPE_586" Pentium3 SubCpuType = "CPU_SUBTYPE_PENTIUM_3" PentiumM SubCpuType = "CPU_SUBTYPE_PENTIUM_M" Pentium4 SubCpuType = "CPU_SUBTYPE_PENTIUM_4" Itanium SubCpuType = "CPU_SUBTYPE_ITANIUM" Xeon SubCpuType = "CPU_SUBTYPE_XEON" XeonMP SubCpuType = "CPU_SUBTYPE_XEON_MP" Pentium4M SubCpuType = "CPU_SUBTYPE_PENTIUM_4_M" Itanium2 SubCpuType = "CPU_SUBTYPE_ITANIUM_2" PentiumPro SubCpuType = "CPU_SUBTYPE_PENTPRO" Pentium3M SubCpuType = "CPU_SUBTYPE_PENTIUM_3_M" Pentium3Xeon SubCpuType = "CPU_SUBTYPE_PENTIUM_3_XEON" PentiiM3 SubCpuType = "CPU_SUBTYPE_PENTII_M3" I486Sx SubCpuType = "CPU_SUBTYPE_486SX" PentiiM5 SubCpuType = "CPU_SUBTYPE_PENTII_M5" Celeron SubCpuType = "CPU_SUBTYPE_CELERON" CeleronMobile SubCpuType = "CPU_SUBTYPE_CELERON_MOBILE" X8664All SubCpuType = "CPU_SUBTYPE_X86_64_ALL" X86Arch1 SubCpuType = "CPU_SUBTYPE_X86_ARCH1" MipsAll SubCpuType = "CPU_SUBTYPE_MIPS_ALL" MipsR2300 SubCpuType = "CPU_SUBTYPE_MIPS_R2300" MipsR2600 SubCpuType = "CPU_SUBTYPE_MIPS_R2600" MipsR2800 SubCpuType = "CPU_SUBTYPE_MIPS_R2800" MipsR2000a SubCpuType = "CPU_SUBTYPE_MIPS_R2000a" MipsR2000 SubCpuType = "CPU_SUBTYPE_MIPS_R2000" MipsR3000a SubCpuType = "CPU_SUBTYPE_MIPS_R3000a" MipsR3000 SubCpuType = "CPU_SUBTYPE_MIPS_R3000" MC680X0All SubCpuType = "CPU_SUBTYPE_MC680x0_ALL" MC68040 SubCpuType = "CPU_SUBTYPE_MC68040" MC68030Only SubCpuType = "CPU_SUBTYPE_MC68030_ONLY" MC98000All SubCpuType = "CPU_SUBTYPE_MC98000_ALL" MC98601 SubCpuType = "CPU_SUBTYPE_MC98601" Hppa7100 SubCpuType = "CPU_SUBTYPE_HPPA_7100" Hppa7100LC SubCpuType = "CPU_SUBTYPE_HPPA_7100LC" Mc880000All SubCpuType = "CPU_SUBTYPE_MC88000_ALL" MC88100 SubCpuType = "CPU_SUBTYPE_MC88100" MC88110 SubCpuType = "CPU_SUBTYPE_MC88110" SparcAll SubCpuType = "CPU_SUBTYPE_SPARC_ALL" AlphaAll SubCpuType = "CPU_SUBTYPE_ALPHA_ALL" I860All SubCpuType = "CPU_SUBTYPE_I860_ALL" I860860 SubCpuType = "CPU_SUBTYPE_I860_860" PowerPCAll SubCpuType = "CPU_SUBTYPE_POWERPC_ALL" PowerPC601 SubCpuType = "CPU_SUBTYPE_POWERPC_601" PowerPC602 SubCpuType = "CPU_SUBTYPE_POWERPC_602" PowerPC603 SubCpuType = "CPU_SUBTYPE_POWERPC_603" PowerPC603e SubCpuType = "CPU_SUBTYPE_POWERPC_603e" PowerPC603ev SubCpuType = "CPU_SUBTYPE_POWERPC_603ev" PowerPC604 SubCpuType = "CPU_SUBTYPE_POWERPC_604" PowerPC604e SubCpuType = "CPU_SUBTYPE_POWERPC_604e" PowerPC620 SubCpuType = "CPU_SUBTYPE_POWERPC_620" PowerPC750 SubCpuType = "CPU_SUBTYPE_POWERPC_750" PowerPC7400 SubCpuType = "CPU_SUBTYPE_POWERPC_7400" PowerPC7450 SubCpuType = "CPU_SUBTYPE_POWERPC_7450" PowerPC970 SubCpuType = "CPU_SUBTYPE_POWERPC_970" ArmAll12 SubCpuType = "CPU_SUBTYPE_ARM_ALL12" ArmV4T SubCpuType = "CPU_SUBTYPE_ARM_V4T" ArmV6 SubCpuType = "CPU_SUBTYPE_ARM_V6" ArmV5TEJ SubCpuType = "CPU_SUBTYPE_ARM_V5TEJ" ArmXScale SubCpuType = "CPU_SUBTYPE_ARM_XSCALE" ArmV7 SubCpuType = "CPU_SUBTYPE_ARM_V7" ArmV7F SubCpuType = "CPU_SUBTYPE_ARM_V7F" ArmV7S SubCpuType = "CPU_SUBTYPE_ARM_V7S" ArmV7K SubCpuType = "CPU_SUBTYPE_ARM_V7K" ArmV6M SubCpuType = "CPU_SUBTYPE_ARM_V6M" ArmV7M SubCpuType = "CPU_SUBTYPE_ARM_V7M" ArmV7EM SubCpuType = "CPU_SUBTYPE_ARM_V7EM" VaxAll SubCpuType = "CPU_SUBTYPE_VAX_ALL" Vax780 SubCpuType = "CPU_SUBTYPE_VAX780" Vax785 SubCpuType = "CPU_SUBTYPE_VAX785" Vax750 SubCpuType = "CPU_SUBTYPE_VAX750" Vax730 SubCpuType = "CPU_SUBTYPE_VAX730" UvAxI SubCpuType = "CPU_SUBTYPE_UVAXI" UvAxII SubCpuType = "CPU_SUBTYPE_UVAXII" Vax8200 SubCpuType = "CPU_SUBTYPE_VAX8200" Vax8500 SubCpuType = "CPU_SUBTYPE_VAX8500" Vax8600 SubCpuType = "CPU_SUBTYPE_VAX8600" Vax8650 SubCpuType = "CPU_SUBTYPE_VAX8650" Vax8800 SubCpuType = "CPU_SUBTYPE_VAX8800" UvaxIII SubCpuType = "CPU_SUBTYPE_UVAXIII" )
View Source
const ( Undefined LogLevel = iota // 0: Logs nothing Info // 1: Logs Info, Warnings and Errors Warn // 2: Logs Warning and Errors Err // 3: Logs Errors Binary AnalysisName = "Binary Analysis" Code AnalysisName = "Code Analysis" Files AnalysisName = "Files Analysis" Static AnalysisName = "Static Analysis" Plist AnalysisName = "Plist Analysis" Store AnalysisName = "Store Analysis" None AnalysisName = "" )
Variables ¶
View Source
var ( // ItunesCountryCodes defines the iTunes Country Codes ItunesCountryCodes = map[string]string{}/* 155 elements not displayed */ )
Functions ¶
Types ¶
type AnalysisCheck ¶
type AnalysisCheck string
AnalysisCheck defines the check to be completed
const ( DoPList AnalysisCheck = "DoPList" DoFiles AnalysisCheck = "DoFiles" DoCode AnalysisCheck = "DoCode" DoBinary AnalysisCheck = "DoAnalysis" DoStore AnalysisCheck = "DoStore" )
type AnalysisName ¶
type AnalysisName string
type ApiFinding ¶
func (*ApiFinding) FromMap ¶
func (e *ApiFinding) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*ApiFinding) ToMap ¶
func (e *ApiFinding) ToMap() map[string]interface{}
func (*ApiFinding) Validate ¶
func (e *ApiFinding) Validate() []validator.FieldError
type ApiMatcher ¶
func (*ApiMatcher) FromMap ¶
func (e *ApiMatcher) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*ApiMatcher) ToMap ¶
func (e *ApiMatcher) ToMap() map[string]interface{}
func (*ApiMatcher) Validate ¶
func (e *ApiMatcher) Validate() []validator.FieldError
type ApiRule ¶
type ApiRule struct {
Description string `json:"description" validate:"min=1"`
}
type BinaryAnalysis ¶
type BinaryAnalysis struct { BinType BinType `json:"bin_type" validate:"valid_bin_types"` Libraries []string `json:"libraries"` Macho MachoInfo `json:"macho"` Results []BinaryAnalysisResult `json:"results"` }
func (*BinaryAnalysis) FromMap ¶
func (e *BinaryAnalysis) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*BinaryAnalysis) ToMap ¶
func (e *BinaryAnalysis) ToMap() map[string]interface{}
func (*BinaryAnalysis) Validate ¶
func (e *BinaryAnalysis) Validate() []validator.FieldError
type BinaryAnalysisResult ¶
type BinaryAnalysisResult struct { Issue string `json:"issue" validate:"min=1"` Description string `json:"description" validate:"min=1"` Status Status `json:"status" validate:"valid_status"` Cvss float64 `json:"cvss" validate:"required"` CWE string `json:"cwe" validate:"startswith=CWE-"` }
func (*BinaryAnalysisResult) FromMap ¶
func (e *BinaryAnalysisResult) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*BinaryAnalysisResult) ToMap ¶
func (e *BinaryAnalysisResult) ToMap() map[string]interface{}
func (*BinaryAnalysisResult) Validate ¶
func (e *BinaryAnalysisResult) Validate() []validator.FieldError
type BundleUrlType ¶
type BundleUrlType struct { Name string `json:"name" validate:"required"` Schemas []string `json:"schemas" validate:"min=1"` }
func (*BundleUrlType) FromMap ¶
func (e *BundleUrlType) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*BundleUrlType) ToMap ¶
func (e *BundleUrlType) ToMap() map[string]interface{}
func (*BundleUrlType) Validate ¶
func (e *BundleUrlType) Validate() []validator.FieldError
type CodeAnalysis ¶
type CodeAnalysis struct { Codes []CodeFinding `json:"codes" validate:"required,dive"` Apis []ApiFinding `json:"apis" validate:"required,dive"` Urls []UrlFinding `json:"urls" validate:"required,dive"` Emails []EmailFinding `json:"emails" validate:"required,dive"` BadDomains []string `json:"bad_domains"` }
func (*CodeAnalysis) FromMap ¶
func (e *CodeAnalysis) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*CodeAnalysis) ToMap ¶
func (e *CodeAnalysis) ToMap() map[string]interface{}
func (*CodeAnalysis) Validate ¶
func (e *CodeAnalysis) Validate() []validator.FieldError
type CodeFinding ¶
func (*CodeFinding) FromMap ¶
func (e *CodeFinding) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*CodeFinding) ToMap ¶
func (e *CodeFinding) ToMap() map[string]interface{}
func (*CodeFinding) Validate ¶
func (e *CodeFinding) Validate() []validator.FieldError
type CodeMatcher ¶
type CodeMatcher struct { CodeRule // func (string) bool to call against a string to do the match Match Match `json:"match" validate:"required"` }
func (*CodeMatcher) FromMap ¶
func (e *CodeMatcher) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*CodeMatcher) ToMap ¶
func (e *CodeMatcher) ToMap() map[string]interface{}
func (*CodeMatcher) Validate ¶
func (e *CodeMatcher) Validate() []validator.FieldError
type CodeRule ¶
type CodeRule struct { // Description of the code rule Description string `json:"description" validate:"min=1"` // level of the issue Level Level `json:"level" validate:"required,valid_levels"` Cvss float64 `json:"cvss" validate:"required"` Cwe string `json:"cwe" validate:"startswith=CWE-"` }
type Command ¶
type Command struct { Path string `json:"path" validate:"required_without=SourcePath"` SourcePath string `json:"source_path" validate:"required_without=Path"` Source bool `json:"source"` Tools string `json:"tools"` AppName string `json:"app_name"` AppId string `json:"app_id"` Country string `json:"country" validate:"valid_country_codes"` VirusTotalKey string `json:"virus_total_key"` Analysis map[AnalysisCheck]bool `json:"analysis" validate:"valid_analysis"` Output io.Writer `json:"output"` T *testing.T `json:"t"` Quiet bool `json:"quiet"` Summary bool `json:"summary"` }
Command defines the commands arguments
type Configuration ¶
type Configuration struct { // Path where the source to analyze is present in the filesystem. SourcePath string `id:"source" desc:"Path to the source code to analyze"` // Path where the binary to analyze is present in the filesystem. BinaryPath string `id:"binary" desc:"Path to the binary .ipa file to analyze"` // Folder where the external binary tools (jtool, etc.) are in the system. If nothing is passed, the application // expects them to be in a sibling folder relative to the app binary. ToolsPath string `id:"tools" desc:"Folder where the program external binaries are located"` // String slice with the scans to make when calling scan command Analysis []string `id:"scans" desc:"Test to do when calling scan command"` // Default country to pass to the lookup in the app store command. DefaultCountry string `id:"country" desc:"Country to use in the apple store lookup"` // Virus scan key. If included, the app will call virus scan api to scan the code // TODO: change to a boolean flag when we have the collective key VirusScanKey string `id:"virus" desc:"Virus Scan API key to use the service"` // Whether or not we output in json. Defaults to false JSONFormat bool `id:"json" desc:"Activate the json output"` // Whether or not we look for malware domains in malwaredomainlist.com. Defaults to false. PerformDomainCheck bool `id:"domains" desc:"Activate domain check from www.malwaredomainlist.com"` // Activate quiet mode QuietMode bool `id:"quiet" desc:"Deactivate info messages logging"` // Activate summary mode SummaryMode bool `id:"summary" desc:"Print shorter reports"` }
Configuration describes the optional vulscan configuration file
type EmailFinding ¶
type EmailFinding struct { Email string `json:"email" validate:"min=1"` Paths []string `json:"paths" validate:"min=1"` }
func (*EmailFinding) FromMap ¶
func (e *EmailFinding) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*EmailFinding) ToMap ¶
func (e *EmailFinding) ToMap() map[string]interface{}
func (*EmailFinding) Validate ¶
func (e *EmailFinding) Validate() []validator.FieldError
type Endianness ¶
type Endianness string
type Entity ¶
type Entity interface { // ToMap allows the different entities to be transformed to map[string]interface{} objects without using reflection. ToMap() map[string]interface{} // ToMap and FromMap are complementary functions, in order to test them, we have to be sure that a FromMap().ToMap() // roundtrip outputs the same map object as the used input. FromMap(m map[string]interface{}) (Entity, error) // Validate allows to obtain an array of field errors from the Entity fields. It allows to check if the entity // creation has been completelly succesful or not. Validate() []validator.FieldError }
The interface entity is intended to make easier the communication with external world in a generic way.
type Error ¶
type Error struct { Analysis AnalysisName `json:"analysis"` E error `json:"e" validate:"required"` }
type FileAnalysis ¶
type FileAnalysis struct { Files []string `json:"files" validate:"min=1"` Certifications []string `json:"certifications" validate:"required"` Databases []string `json:"databases" validate:"required"` PLists []string `json:"plists" validate:"required"` }
func (*FileAnalysis) FromMap ¶
func (e *FileAnalysis) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*FileAnalysis) ToMap ¶
func (e *FileAnalysis) ToMap() map[string]interface{}
func (*FileAnalysis) Validate ¶
func (e *FileAnalysis) Validate() []validator.FieldError
type InsecureConnections ¶
type InsecureConnections struct { AllowArbitraryLoads bool `json:"allow_arbitrary_loads"` Domains []string `json:"domains"` }
func (*InsecureConnections) FromMap ¶
func (e *InsecureConnections) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*InsecureConnections) ToMap ¶
func (e *InsecureConnections) ToMap() map[string]interface{}
func (*InsecureConnections) Validate ¶
func (e *InsecureConnections) Validate() []validator.FieldError
type LogMessage ¶
type LogMessage struct { Level LogLevel `json:"level"` Analysis AnalysisName `json:"analysis"` Message string `json:"message" validate:"min=1"` }
func (*LogMessage) FromMap ¶
func (e *LogMessage) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*LogMessage) ToMap ¶
func (e *LogMessage) ToMap() map[string]interface{}
func (*LogMessage) Validate ¶
func (e *LogMessage) Validate() []validator.FieldError
type MachoInfo ¶
type MachoInfo struct { Err bool `json:"err"` Bits Bits `json:"bits" validate:"required,valid_bits"` Endianness Endianness `json:"endianness" validate:"required,valid_endianness"` Cpu CpuType `json:"cpu" validate:"required,valid_cpu"` SubCpu SubCpuType `json:"sub_cpu" validate:"omitempty,valid_sub_cpu"` }
type PListAnalysis ¶
type PListAnalysis struct { Xml string `json:"xml" validate:"min=1"` BinName string `json:"bin_name" validate:"min=1"` Bin string `json:"bin" validate:"min=1"` Id string `json:"id" validate:"min=1"` Build string `json:"build" validate:"min=1"` SDK string `json:"sdk" validate:"min=1"` Platform string `json:"platform" validate:"min=1"` MinimumVersion string `json:"minimum_version" validate:"min=1"` BundleName string `json:"bundle_name" validate:"min=1"` BundleVersionName string `json:"bundle_version_name" validate:"min=1"` BundleSupportedPlatforms []string `json:"bundle_supported_platforms" validate:"min=1"` BundleLocalizations []string `json:"bundle_localizations" validate:"min=1"` BundleUrlTypes []BundleUrlType `json:"bundle_url_types" validate:"required"` Permissions []Permission `json:"permissions" validate:"required"` InsecureConnections InsecureConnections `json:"insecure_connections" validate:"required"` }
func (*PListAnalysis) FromMap ¶
func (e *PListAnalysis) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*PListAnalysis) ToMap ¶
func (e *PListAnalysis) ToMap() map[string]interface{}
func (*PListAnalysis) Validate ¶
func (e *PListAnalysis) Validate() []validator.FieldError
type Permission ¶
type Permission struct { Name string `json:"name" validate:"min=1"` Description string `json:"description" validate:"min=1"` Reason string `json:"reason" validate:"min=1"` }
func (*Permission) FromMap ¶
func (e *Permission) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*Permission) ToMap ¶
func (e *Permission) ToMap() map[string]interface{}
func (*Permission) Validate ¶
func (e *Permission) Validate() []validator.FieldError
type StaticAnalysis ¶
type StaticAnalysis struct { HasBinary bool `json:"has_binary"` HasCode bool `json:"has_code"` HasFiles bool `json:"has_files"` HasPlist bool `json:"has_plist"` HasVirus bool `json:"has_virus"` HasStore bool `json:"has_store"` Binary BinaryAnalysis `json:"binary"` Code CodeAnalysis `json:"code"` Files FileAnalysis `json:"files"` Plist PListAnalysis `json:"plist"` Virus VirusAnalysis `json:"virus"` Store StoreAnalysis `json:"lookup"` }
func (*StaticAnalysis) FromMap ¶
func (e *StaticAnalysis) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*StaticAnalysis) ToMap ¶
func (e *StaticAnalysis) ToMap() map[string]interface{}
func (*StaticAnalysis) Validate ¶
func (e *StaticAnalysis) Validate() []validator.FieldError
type StoreAnalysis ¶
type StoreAnalysis struct { Count int `json:"resultCount" validate:"len=1"` Results []StoreResult `json:"results" validate:"min=1"` }
func (*StoreAnalysis) FromMap ¶
func (e *StoreAnalysis) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*StoreAnalysis) ToMap ¶
func (e *StoreAnalysis) ToMap() map[string]interface{}
func (*StoreAnalysis) Validate ¶
func (e *StoreAnalysis) Validate() []validator.FieldError
type StoreResult ¶
type StoreResult struct { Features []string `json:"features" validate:"required"` IconUrl512 string `json:"artworkUrl512" validate:"required"` IconUrl100 string `json:"artworkUrl100" validate:"required"` IconUrl60 string `json:"artworkUrl60" validate:"required"` DeveloperId int `json:"artistId" validate:"required"` DeveloperName string `json:"artistName" validate:"required"` DeveloperUrl string `json:"artistViewUrl" validate:"required"` DeveloperWebsite string `json:"sellerUrl" validate:"required"` SupportedDevices []string `json:"supportedDevices" validate:"required"` Title string `json:"trackName" validate:"required"` AppId string `json:"bundleId" validate:"required"` Categories []string `json:"genres" validate:"required"` Description string `json:"description" validate:"required"` Price float64 `json:"price"` Url string `json:"trackViewUrl" validate:"required"` Score float64 `json:"averageUserRating" validate:"required"` }
func (*StoreResult) FromMap ¶
func (e *StoreResult) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*StoreResult) ToMap ¶
func (e *StoreResult) ToMap() map[string]interface{}
func (*StoreResult) Validate ¶
func (e *StoreResult) Validate() []validator.FieldError
type SubCpuType ¶
type SubCpuType string
type ToolUrls ¶
type ToolUrls struct { JTool string `json:"jtool" validate:"url"` ClassDumpZ string `json:"class-dump-z" validate:"url"` ClassDumpSwift string `json:"class-dump-swift" validate:"url"` }
type UrlFinding ¶
type UrlFinding struct { Url string `json:"url" validate:"min=1"` Paths []string `json:"paths" validate:"min=1"` }
func (*UrlFinding) FromMap ¶
func (e *UrlFinding) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*UrlFinding) ToMap ¶
func (e *UrlFinding) ToMap() map[string]interface{}
func (*UrlFinding) Validate ¶
func (e *UrlFinding) Validate() []validator.FieldError
type VirusAnalysis ¶
type VirusAnalysis struct { HasReport bool `json:"has_report"` Response VirusResponse `json:"response" validate:"required"` Report VirusReport `json:"report" validate:"structonly"` }
func (*VirusAnalysis) FromMap ¶
func (e *VirusAnalysis) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*VirusAnalysis) ToMap ¶
func (e *VirusAnalysis) ToMap() map[string]interface{}
func (*VirusAnalysis) Validate ¶
func (e *VirusAnalysis) Validate() []validator.FieldError
type VirusReport ¶
type VirusReport struct { VirusResponse Md5 string `json:"md5" validate:"required"` Sha1 string `json:"sha1" validate:"required"` ScanDate string `json:"scan_date" validate:"required"` Positives int `json:"positives"` Total int `json:"total" validate:"required"` Scans map[string]VirusScan `json:"scans" validate:"required"` }
func (*VirusReport) FromMap ¶
func (e *VirusReport) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*VirusReport) ToMap ¶
func (e *VirusReport) ToMap() map[string]interface{}
func (*VirusReport) Validate ¶
func (e *VirusReport) Validate() []validator.FieldError
type VirusResponse ¶
type VirusResponse struct { ResponseCode int `json:"response_code"` VerboseMsg string `json:"verbose_msg" validate:"required"` Resource string `json:"resource" validate:"required"` ScanId string `json:"scan_id" validate:"required"` Sha256 string `json:"sha256" validate:"required"` Permalink string `json:"permalink" validate:"required"` }
func (*VirusResponse) FromMap ¶
func (e *VirusResponse) FromMap(m map[string]interface{}) (ent Entity, err error)
func (*VirusResponse) ToMap ¶
func (e *VirusResponse) ToMap() map[string]interface{}
func (*VirusResponse) Validate ¶
func (e *VirusResponse) Validate() []validator.FieldError
Click to show internal directories.
Click to hide internal directories.