Documentation ¶
Index ¶
- Constants
- Variables
- type APIAttacks
- type APIAttacksInput
- type AdvancedSetting
- type AdvancedSettingInput
- type CreateWebAPIPracticeInput
- type FileSchema
- type FileWrapper
- type IPS
- type IPSInput
- type SchemaAPIAttacks
- type SchemaAdvancedSetting
- type SchemaIPS
- type SchemaValidation
- type SchemaValidationInput
- type UpdateAPIAttacksInput
- type UpdateIPSInput
- type UpdatePracticeInput
- type UpdateSchemaValidationInput
- type UpdateWebApplicationFileSecurityInput
- type WebAPIFileSecurityInput
- type WebAPIPractice
- type WebApplicationFileSecurity
- type WebApplicationFileSecuritySchema
Constants ¶
View Source
const ( FileDataFilenameFormat = "%s;$$:$$;" FileDataFormat = "data:application/octet-stream;base64,%s" )
Variables ¶
View Source
var (
ErrorInvalidDataFormat = errors.New("invalid data format")
)
Functions ¶
This section is empty.
Types ¶
type APIAttacks ¶
type APIAttacks struct { ID string `json:"id"` MinimumSeverity string `json:"minimumSeverity"` AdvancedSetting AdvancedSetting `json:"advancedSetting"` }
APIAttacks represents the APIAttacks field of the WebAPIPractice returned from the API
type APIAttacksInput ¶
type APIAttacksInput struct { ID string `json:"id,omitempty"` MinimumSeverity string `json:"minimumSeverity,omitempty"` AdvancedSetting AdvancedSettingInput `json:"advancedSetting,omitempty"` }
type AdvancedSetting ¶
type AdvancedSetting struct { ID string `json:"id"` IllegalHttpMethods string `json:"illegalHttpMethods,omitempty"` BodySize int `json:"bodySize,omitempty"` URLSize int `json:"urlSize,omitempty"` HeaderSize int `json:"headerSize,omitempty"` MaxObjectDepth int `json:"maxObjectDepth,omitempty"` }
AdvancedSetting represents the AdvancedSetting field of the APIAttacks field of the WebAPIPractice returned from the API
type AdvancedSettingInput ¶
type AdvancedSettingInput struct { ID string `json:"id,omitempty"` IllegalHttpMethods string `json:"illegalHttpMethods,omitempty"` BodySize int `json:"bodySize,omitempty"` URLSize int `json:"urlSize,omitempty"` HeaderSize int `json:"headerSize,omitempty"` MaxObjectDepth int `json:"maxObjectDepth,omitempty"` }
type CreateWebAPIPracticeInput ¶
type CreateWebAPIPracticeInput struct { Name string `json:"name"` Visibility string `json:"visibility,omitempty"` IPS IPSInput `json:"IPS,omitempty"` APIAttacks APIAttacksInput `json:"APIAttacks,omitempty"` SchemaValidation SchemaValidationInput `json:"SchemaValidation,omitempty"` FileSecurity WebAPIFileSecurityInput `json:"FileSecurity,omitempty"` }
CreateWebAPIPracticeInput represents the api input for creating a web API practice
type FileSchema ¶
type FileSchema struct { ID string `json:"id,omitempty"` Filename string `json:"name,omitempty"` Data string `json:"data"` Size uint64 `json:"size,omitempty"` }
func NewFileSchemaDecode ¶
func NewFileSchemaDecode(filename, b64Data string) (*FileSchema, error)
func NewFileSchemaEncode ¶
func NewFileSchemaEncode(filename, fileData string) FileSchema
type FileWrapper ¶
type FileWrapper struct { Data string `json:"data"` Name string `json:"name"` Size uint64 `json:"size"` IsFileExist bool `json:"isFileExist"` }
FileWrapper represents the OASSchema field of the SchemaValidation field of the WebAPIPractice returned from the API
type IPS ¶
type IPS struct { ID string `json:"id"` PerformanceImpact string `json:"performanceImpact"` SeverityLevel string `json:"severityLevel"` ProtectionsFromYear string `json:"protectionsFromYear"` HighConfidence string `json:"highConfidence"` MediumConfidence string `json:"mediumConfidence"` LowConfidence string `json:"lowConfidence"` }
IPS represents the IPS field of the WebAPIPractice returned from the API
type IPSInput ¶
type IPSInput struct { ID string `json:"id,omitempty"` PerformanceImpact string `json:"performanceImpact,omitempty"` SeverityLevel string `json:"severityLevel,omitempty"` ProtectionsFromYear string `json:"protectionsFromYear,omitempty"` HighConfidence string `json:"highConfidence,omitempty"` MediumConfidence string `json:"mediumConfidence,omitempty"` LowConfidence string `json:"lowConfidence,omitempty"` }
type SchemaAPIAttacks ¶
type SchemaAPIAttacks struct { ID string `json:"id"` MinimumSeverity string `json:"minimum_severity"` AdvancedSetting []SchemaAdvancedSetting `json:"advanced_setting"` }
type SchemaAdvancedSetting ¶
type SchemaAdvancedSetting struct { ID string `json:"id"` IllegalHttpMethods bool `json:"illegal_http_methods,omitempty"` BodySize int `json:"body_size,omitempty"` URLSize int `json:"url_size,omitempty"` HeaderSize int `json:"header_size,omitempty"` MaxObjectDepth int `json:"max_object_depth,omitempty"` }
type SchemaIPS ¶
type SchemaIPS struct { ID string `json:"id"` PerformanceImpact string `json:"performance_impact"` SeverityLevel string `json:"severity_level"` ProtectionsFromYear string `json:"protections_from_year"` HighConfidence string `json:"high_confidence"` MediumConfidence string `json:"medium_confidence"` LowConfidence string `json:"low_confidence"` }
type SchemaValidation ¶
type SchemaValidation struct { ID string `json:"id"` OASSchema FileWrapper `json:"OasSchema"` }
SchemaValidation represents the SchemaValidation field of the WebAPIPractice returned from the API
type SchemaValidationInput ¶
type UpdateAPIAttacksInput ¶
type UpdateAPIAttacksInput struct { ID string `json:"id,omitempty"` MinimumSeverity string `json:"minimumSeverity,omitempty"` AdvancedSetting AdvancedSettingInput `json:"advancedSetting,omitempty"` }
type UpdateIPSInput ¶
type UpdateIPSInput struct { ID string `json:"id,omitempty"` PerformanceImpact string `json:"performanceImpact,omitempty"` SeverityLevel string `json:"severityLevel,omitempty"` ProtectionsFromYear string `json:"protectionsFromYear,omitempty"` HighConfidence string `json:"highConfidence,omitempty"` MediumConfidence string `json:"mediumConfidence,omitempty"` LowConfidence string `json:"lowConfidence,omitempty"` }
type UpdatePracticeInput ¶
type UpdatePracticeInput struct { Name string `json:"name,omitempty"` Visibility string `json:"visibility,omitempty"` IPS UpdateIPSInput `json:"IPS,omitempty"` APIAttacks UpdateAPIAttacksInput `json:"APIAttacks,omitempty"` SchemaValidation UpdateSchemaValidationInput `json:"SchemaValidation,omitempty"` FileSecurity UpdateWebApplicationFileSecurityInput `json:"FileSecurity,omitempty"` }
type UpdateWebApplicationFileSecurityInput ¶ added in v1.1.1
type UpdateWebApplicationFileSecurityInput struct { ID string `json:"id,omitempty"` SeverityLevel string `json:"severityLevel,omitempty"` HighConfidence string `json:"highConfidence,omitempty"` MediumConfidence string `json:"mediumConfidence,omitempty"` LowConfidence string `json:"lowConfidence,omitempty"` AllowFileSizeLimit string `json:"allowFileSizeLimit,omitempty"` FileSizeLimit int `json:"fileSizeLimit,omitempty"` FileSizeLimitUnit string `json:"fileSizeLimitUnit,omitempty"` FilesWithoutName string `json:"filesWithoutName,omitempty"` RequiredArchiveExtraction bool `json:"requiredArchiveExtraction,omitempty"` ArchiveFileSizeLimit int `json:"archiveFileSizeLimit,omitempty"` ArchiveFileSizeLimitUnit string `json:"archiveFileSizeLimitUnit,omitempty"` AllowArchiveWithinArchive string `json:"allowArchiveWithinArchive,omitempty"` AllowAnUnopenedArchive string `json:"allowAnUnopenedArchive,omitempty"` AllowFileType bool `json:"allowFileType,omitempty"` RequiredThreatEmulation bool `json:"requiredThreatEmulation,omitempty"` }
type WebAPIFileSecurityInput ¶ added in v1.1.1
type WebAPIFileSecurityInput struct { ID string `json:"id,omitempty"` SeverityLevel string `json:"severityLevel,omitempty"` HighConfidence string `json:"highConfidence,omitempty"` MediumConfidence string `json:"mediumConfidence,omitempty"` LowConfidence string `json:"lowConfidence,omitempty"` AllowFileSizeLimit string `json:"allowFileSizeLimit,omitempty"` FileSizeLimit int `json:"fileSizeLimit,omitempty"` FileSizeLimitUnit string `json:"fileSizeLimitUnit,omitempty"` FilesWithoutName string `json:"filesWithoutName,omitempty"` RequiredArchiveExtraction bool `json:"requiredArchiveExtraction,omitempty"` ArchiveFileSizeLimit int `json:"archiveFileSizeLimit,omitempty"` ArchiveFileSizeLimitUnit string `json:"archiveFileSizeLimitUnit,omitempty"` AllowArchiveWithinArchive string `json:"allowArchiveWithinArchive,omitempty"` AllowAnUnopenedArchive string `json:"allowAnUnopenedArchive,omitempty"` AllowFileType bool `json:"allowFileType,omitempty"` RequiredThreatEmulation bool `json:"requiredThreatEmulation,omitempty"` }
type WebAPIPractice ¶
type WebAPIPractice struct { ID string `json:"id"` IPS IPS `json:"IPS"` Name string `json:"name"` Category string `json:"category"` PracticeType string `json:"practiceType"` Visibility string `json:"visibility"` APIAttacks APIAttacks `json:"APIAttacks"` Default bool `json:"default"` SchemaValidation SchemaValidation `json:"SchemaValidation"` FileSecurity WebApplicationFileSecurity `json:"FileSecurity"` }
WebAPIPractice represents the response from the API after creating the web API practice
type WebApplicationFileSecurity ¶ added in v1.1.1
type WebApplicationFileSecurity struct { ID string `json:"id"` SeverityLevel string `json:"severityLevel"` HighConfidence string `json:"highConfidence"` MediumConfidence string `json:"mediumConfidence"` LowConfidence string `json:"lowConfidence"` AllowFileSizeLimit string `json:"allowFileSizeLimit"` FileSizeLimit int `json:"fileSizeLimit"` FileSizeLimitUnit string `json:"fileSizeLimitUnit"` FilesWithoutName string `json:"filesWithoutName"` RequiredArchiveExtraction bool `json:"requiredArchiveExtraction"` ArchiveFileSizeLimit int `json:"archiveFileSizeLimit"` ArchiveFileSizeLimitUnit string `json:"archiveFileSizeLimitUnit"` AllowArchiveWithinArchive string `json:"allowArchiveWithinArchive"` AllowAnUnopenedArchive string `json:"allowAnUnopenedArchive"` AllowFileType bool `json:"allowFileType"` RequiredThreatEmulation bool `json:"requiredThreatEmulation"` }
type WebApplicationFileSecuritySchema ¶ added in v1.1.1
type WebApplicationFileSecuritySchema struct { ID string `json:"id,omitempty"` SeverityLevel string `json:"severity_level,omitempty"` HighConfidence string `json:"high_confidence,omitempty"` MediumConfidence string `json:"medium_confidence,omitempty"` LowConfidence string `json:"low_confidence,omitempty"` AllowFileSizeLimit string `json:"allow_file_size_limit,omitempty"` FileSizeLimit int `json:"file_size_limit,omitempty"` FileSizeLimitUnit string `json:"file_size_limit_unit,omitempty"` FilesWithoutName string `json:"files_without_name,omitempty"` RequiredArchiveExtraction bool `json:"required_archive_extraction,omitempty"` ArchiveFileSizeLimit int `json:"archive_file_size_limit,omitempty"` ArchiveFileSizeLimitUnit string `json:"archive_file_size_limit_unit,omitempty"` AllowArchiveWithinArchive string `json:"allow_archive_within_archive,omitempty"` AllowAnUnopenedArchive string `json:"allow_an_unopened_archive,omitempty"` AllowFileType bool `json:"allow_file_type,omitempty"` RequiredThreatEmulation bool `json:"required_threat_emulation,omitempty"` }
Click to show internal directories.
Click to hide internal directories.