Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecurityTest ¶
type SecurityTest struct {
Name string `json:"name"`
Type string `json:"type"`
Endpoint string `json:"endpoint"`
Method string `json:"method"`
Payload string `json:"payload"`
Expected string `json:"expected"`
Actual string `json:"actual"`
Passed bool `json:"passed"`
Severity string `json:"severity"`
Description string `json:"description"`
Metadata map[string]interface{} `json:"metadata"`
}
SecurityTest represents a single security test
type SecurityTestConfig ¶
type SecurityTestConfig struct {
BaseURL string `json:"base_url"`
Timeout time.Duration `json:"timeout"`
Headers map[string]string `json:"headers"`
TestPayloads []string `json:"test_payloads"`
AuthToken string `json:"auth_token"`
EnableOWASP bool `json:"enable_owasp"`
EnableCustom bool `json:"enable_custom"`
}
SecurityTestConfig holds configuration for security testing
func DefaultSecurityTestConfig ¶
func DefaultSecurityTestConfig() *SecurityTestConfig
DefaultSecurityTestConfig returns the default security test configuration
type SecurityTestResult ¶
type SecurityTestResult struct {
TotalTests int `json:"total_tests"`
PassedTests int `json:"passed_tests"`
FailedTests int `json:"failed_tests"`
Vulnerabilities []Vulnerability `json:"vulnerabilities"`
TestResults []SecurityTest `json:"test_results"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
}
SecurityTestResult holds the results of security testing
type SecurityTester ¶
type SecurityTester struct {
// contains filtered or unexported fields
}
SecurityTester performs security testing
func NewSecurityTester ¶
func NewSecurityTester(config *SecurityTestConfig, logger *slog.Logger) *SecurityTester
NewSecurityTester creates a new security tester
func (*SecurityTester) GetResults ¶
func (st *SecurityTester) GetResults() *SecurityTestResult
GetResults returns the current test results
func (*SecurityTester) RunSecurityTests ¶
func (st *SecurityTester) RunSecurityTests(ctx context.Context, endpoints []string) (*SecurityTestResult, error)
RunSecurityTests runs comprehensive security tests
type Vulnerability ¶
type Vulnerability struct {
Type string `json:"type"`
Severity string `json:"severity"`
Description string `json:"description"`
Endpoint string `json:"endpoint"`
Method string `json:"method"`
Payload string `json:"payload"`
Response string `json:"response"`
Remediation string `json:"remediation"`
Metadata map[string]interface{} `json:"metadata"`
}
Vulnerability represents a security vulnerability
Click to show internal directories.
Click to hide internal directories.