refactor: rewrite framework detection with modular detector architecture

- create detector interface and registry for extensibility
- extract detectors to separate files: backend.go, frontend.go, cms.go, meta.go
- reduce detect.go from 785 lines to 178 lines (pure orchestrator)
- export VersionMatch and ExtractVersionOptimized for detector use
- create result.go with NewFrameworkResult and WithVulnerabilities helpers
- add url validation to New() for early error detection
- add sif_test.go with main package tests
- update detect_test.go to use external test package pattern
This commit is contained in:
Celeste Hickenlooper
2026-01-03 00:07:46 -08:00
parent 09347bc908
commit 49ecfccb4a
12 changed files with 1563 additions and 489 deletions

View File

@@ -16,6 +16,9 @@ import (
"github.com/charmbracelet/log"
"github.com/dropalldatabases/sif"
"github.com/dropalldatabases/sif/pkg/config"
// Register framework detectors
_ "github.com/dropalldatabases/sif/pkg/scan/frameworks/detectors"
)
func main() {