Documentation
¶
Overview ¶
Package cmd provides command-line interfaces for the LLMrecon tool
Package cmd provides command-line commands for the LLMrecon tool
Index ¶
- func CacheChangelog(changelog *Changelog) error
- func CheckVersionForCI() (string, error)
- func Execute()
- func GetOWASPCategories() []string
- func ValidateOWASPCategory(category string) bool
- type BuildInfo
- type BundleComplianceStatus
- type BundleInfo
- type BundleManifestInfo
- type BundleMetadata
- type BundleReportData
- type BundleReportStatistics
- type BundleStatistics
- type CategoryCompliance
- type CategoryMapping
- type CategoryReport
- type CategoryStats
- type Changelog
- type ChangelogEntry
- type CompatibilityIssue
- type CompatibilityReport
- type ComplianceDocument
- type ComplianceInfo
- type ComplianceSection
- type ComplianceStatus
- type ComponentItem
- type ComponentVersion
- type ComponentsInfo
- type CoverageReport
- type DependencyInfo
- type ISOComplianceReport
- type ISOGap
- type ISOSection
- type OWASPCategory
- type OWASPComplianceCategory
- type OWASPComplianceReport
- type OWASPFinding
- type OWASPInfo
- type ReportSummary
- type SystemInfo
- type TemplateMetadata
- type VersionInfo
- type VulnerabilityReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheChangelog ¶
CacheChangelog saves changelog to local cache
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetOWASPCategories ¶
func GetOWASPCategories() []string
GetOWASPCategories returns all OWASP LLM Top 10 categories
func ValidateOWASPCategory ¶
ValidateOWASPCategory validates if a category is valid
Types ¶
type BuildInfo ¶
type BuildInfo struct {
Date string `json:"date"`
Commit string `json:"commit"`
Branch string `json:"branch"`
Number string `json:"number"`
GoVersion string `json:"go_version"`
Compiler string `json:"compiler"`
}
BuildInfo contains build-time information
type BundleComplianceStatus ¶
type BundleComplianceStatus struct {
Present bool `json:"present"`
Version string `json:"version"`
LastUpdated string `json:"last_updated"`
Files []string `json:"files"`
}
BundleComplianceStatus represents compliance standard status
type BundleInfo ¶
type BundleInfo struct {
Path string `json:"path"`
Size int64 `json:"size"`
Checksum string `json:"checksum"`
CreatedAt time.Time `json:"created_at"`
Manifest BundleManifestInfo `json:"manifest"`
Components ComponentsInfo `json:"components"`
OWASP OWASPInfo `json:"owasp"`
Compliance ComplianceInfo `json:"compliance"`
Statistics BundleStatistics `json:"statistics"`
}
BundleInfo contains comprehensive bundle information
type BundleManifestInfo ¶
type BundleManifestInfo struct {
Version string `json:"version"`
Name string `json:"name"`
Description string `json:"description"`
Author string `json:"author"`
CreatedAt time.Time `json:"created_at"`
Metadata map[string]interface{} `json:"metadata"`
}
BundleManifestInfo contains manifest information
type BundleMetadata ¶
type BundleReportData ¶
type BundleReportData struct {
Metadata BundleMetadata `json:"metadata"`
Summary ReportSummary `json:"summary"`
OWASPAnalysis *OWASPComplianceReport `json:"owasp_analysis,omitempty"`
ISOAnalysis *ISOComplianceReport `json:"iso_analysis,omitempty"`
Statistics *BundleReportStatistics `json:"statistics,omitempty"`
Vulnerabilities []VulnerabilityReport `json:"vulnerabilities,omitempty"`
Coverage *CoverageReport `json:"coverage,omitempty"`
}
type BundleReportStatistics ¶
type BundleReportStatistics struct {
TemplatesByCategory map[string]int `json:"templates_by_category"`
TemplatesBySeverity map[string]int `json:"templates_by_severity"`
TemplatesByType map[string]int `json:"templates_by_type"`
AverageComplexity float64 `json:"average_complexity"`
UniquePatterns int `json:"unique_patterns"`
TotalDetectionRules int `json:"total_detection_rules"`
LanguageDistribution map[string]int `json:"language_distribution"`
UpdateFrequency string `json:"update_frequency"`
}
type BundleStatistics ¶
type BundleStatistics struct {
TotalFiles int `json:"total_files"`
TotalSize int64 `json:"total_size"`
TemplateCount int `json:"template_count"`
ModuleCount int `json:"module_count"`
DocumentCount int `json:"document_count"`
LargestFile string `json:"largest_file"`
LargestFileSize int64 `json:"largest_file_size"`
}
BundleStatistics contains bundle statistics
type CategoryCompliance ¶
type CategoryMapping ¶
type CategoryMapping struct {
Template string `json:"template"`
Path string `json:"path"`
Category string `json:"category"`
Confidence float64 `json:"confidence"`
MatchedKeys []string `json:"matched_keywords"`
}
CategoryMapping represents template to category mapping
type CategoryReport ¶
type CategoryReport struct {
TotalTemplates int `json:"total_templates"`
CategorizedCount int `json:"categorized_count"`
UncategorizedCount int `json:"uncategorized_count"`
Categories map[string]*CategoryStats `json:"categories"`
Mappings []CategoryMapping `json:"mappings"`
Coverage map[string]float64 `json:"coverage"`
}
CategoryReport represents categorization results
type CategoryStats ¶
type CategoryStats struct {
Count int `json:"count"`
Percentage float64 `json:"percentage"`
Templates []string `json:"templates"`
SubTypes map[string]int `json:"subtypes,omitempty"`
}
CategoryStats represents statistics for a category
type Changelog ¶
type Changelog struct {
Component string `json:"component"`
Entries []ChangelogEntry `json:"entries"`
Generated time.Time `json:"generated"`
}
Changelog represents the full changelog
type ChangelogEntry ¶
type ChangelogEntry struct {
Version string `json:"version"`
Date time.Time `json:"date"`
Component string `json:"component"`
Summary string `json:"summary"`
BreakingChanges []string `json:"breaking_changes,omitempty"`
Features []string `json:"features,omitempty"`
Improvements []string `json:"improvements,omitempty"`
BugFixes []string `json:"bug_fixes,omitempty"`
SecurityFixes []string `json:"security_fixes,omitempty"`
Contributors []string `json:"contributors,omitempty"`
DownloadURL string `json:"download_url,omitempty"`
}
ChangelogEntry represents a single changelog entry
type CompatibilityIssue ¶
type CompatibilityIssue struct {
Component string `json:"component"`
Issue string `json:"issue"`
Severity string `json:"severity"`
}
CompatibilityIssue represents a compatibility problem
type CompatibilityReport ¶
type CompatibilityReport struct {
Compatible bool `json:"compatible"`
Issues []CompatibilityIssue `json:"issues,omitempty"`
Recommendations []string `json:"recommendations,omitempty"`
}
CompatibilityReport contains compatibility check results
type ComplianceDocument ¶
type ComplianceInfo ¶
type ComplianceInfo struct {
ISO42001 BundleComplianceStatus `json:"iso42001"`
OWASP BundleComplianceStatus `json:"owasp"`
Documents []string `json:"documents"`
}
ComplianceInfo contains compliance documentation status
type ComplianceSection ¶
type ComplianceStatus ¶
type ComponentItem ¶
type ComponentItem struct {
Name string `json:"name"`
Path string `json:"path"`
Version string `json:"version"`
Size int64 `json:"size"`
Checksum string `json:"checksum"`
Category string `json:"category,omitempty"`
Type string `json:"type,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
ComponentItem represents a component in the bundle
type ComponentVersion ¶
type ComponentVersion struct {
Name string `json:"name"`
Version string `json:"version"`
ReleaseDate time.Time `json:"release_date,omitempty"`
Author string `json:"author,omitempty"`
Description string `json:"description,omitempty"`
License string `json:"license,omitempty"`
Homepage string `json:"homepage,omitempty"`
}
ComponentVersion represents version info for a component
type ComponentsInfo ¶
type ComponentsInfo struct {
Templates []ComponentItem `json:"templates"`
Modules []ComponentItem `json:"modules"`
Documents []ComponentItem `json:"documents"`
Resources []ComponentItem `json:"resources"`
}
ComponentsInfo contains component counts
type CoverageReport ¶
type CoverageReport struct {
OverallCoverage float64 `json:"overall_coverage"`
CategoryCoverage map[string]float64 `json:"category_coverage"`
AttackVectorCoverage map[string]float64 `json:"attack_vector_coverage"`
UncoveredAreas []string `json:"uncovered_areas"`
CoverageMatrix map[string]map[string]bool `json:"coverage_matrix"`
}
type DependencyInfo ¶
type DependencyInfo struct {
Name string `json:"name"`
Version string `json:"version"`
License string `json:"license,omitempty"`
}
DependencyInfo contains dependency information
type ISOComplianceReport ¶
type ISOComplianceReport struct {
ComplianceLevel string `json:"compliance_level"`
RequirementsMet int `json:"requirements_met"`
TotalRequirements int `json:"total_requirements"`
Sections map[string]ISOSection `json:"sections"`
Gaps []ISOGap `json:"gaps"`
Recommendations []string `json:"recommendations"`
}
type ISOSection ¶
type OWASPCategory ¶
type OWASPCategory struct {
ID string `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
Description string `json:"description"`
Keywords []string `json:"keywords"`
Patterns []string `json:"patterns"`
Examples []string `json:"examples"`
}
OWASPCategory represents a category with full details
type OWASPComplianceCategory ¶
type OWASPComplianceReport ¶
type OWASPComplianceReport struct {
OverallScore float64 `json:"overall_score"`
CategoryScores map[string]CategoryCompliance `json:"category_scores"`
CoverageGaps []string `json:"coverage_gaps"`
Recommendations []string `json:"recommendations"`
DetailedFindings []OWASPFinding `json:"detailed_findings,omitempty"`
}
type OWASPFinding ¶
type OWASPInfo ¶
type OWASPInfo struct {
Categorized bool `json:"categorized"`
Categories map[string]int `json:"categories"`
Uncategorized int `json:"uncategorized"`
}
OWASPInfo contains OWASP categorization information
type ReportSummary ¶
type ReportSummary struct {
TotalTemplates int `json:"total_templates"`
CategoriesCount int `json:"categories_count"`
ComplianceScore float64 `json:"compliance_score"`
SecurityLevel string `json:"security_level"`
TopCategories []string `json:"top_categories"`
RecommendationCount int `json:"recommendation_count"`
}
type SystemInfo ¶
type SystemInfo struct {
OS string `json:"os"`
Architecture string `json:"architecture"`
CPUs int `json:"cpus"`
GoMaxProcs int `json:"go_max_procs"`
}
SystemInfo contains system information
type TemplateMetadata ¶
type VersionInfo ¶
type VersionInfo struct {
Binary ComponentVersion `json:"binary"`
Templates ComponentVersion `json:"templates"`
Modules []ComponentVersion `json:"modules"`
Build BuildInfo `json:"build"`
System SystemInfo `json:"system"`
Dependencies []DependencyInfo `json:"dependencies,omitempty"`
Compatibility *CompatibilityReport `json:"compatibility,omitempty"`
}
VersionInfo contains all version information
type VulnerabilityReport ¶
type VulnerabilityReport struct {
ID string `json:"id"`
Name string `json:"name"`
Category string `json:"category"`
Severity string `json:"severity"`
Description string `json:"description"`
Impact string `json:"impact"`
Likelihood string `json:"likelihood"`
Detections []string `json:"detections"`
Mitigations []string `json:"mitigations"`
}
Source Files
¶
- api_server.go
- bundle.go
- bundle_categorize.go
- bundle_compliance.go
- bundle_create.go
- bundle_info.go
- bundle_interactive.go
- bundle_report.go
- changelog.go
- check_version.go
- credentials.go
- notification.go
- package.go
- prompt_protection.go
- root.go
- template_manager.go
- update.go
- update_apply.go
- update_check.go
- version_info.go
- vulnerability_detection.go