Commit Graph

253 Commits

Author SHA1 Message Date
Celeste Hickenlooper
d9dd3dc40c Merge pull request #56 from 0x4bs3nt/feat/astro-framework-detection
feat(frameworks): add Astro framework detection
automated-release-d9dd3dc
2026-01-06 12:10:34 -08:00
jan
0a0f8d0a11 fix: adjust generator meta weight
Adjusted generator meta weight to remain consistent with other meta-framework detectors.

Co-authored-by: Celeste Hickenlooper <celeste@router.sex>
2026-01-06 14:45:03 +01:00
Celeste Hickenlooper
02bb8aed1b Merge pull request #55 from 0x4bs3nt/docs/contributing-update
docs: update CONTRIBUTING.md
automated-release-02bb8ae
2026-01-05 23:50:02 -08:00
jan
2879dc2ae7 fix: discord invite
Fixed discord invite to official server invite url.
2026-01-06 06:35:32 +01:00
Celeste Hickenlooper
fe0119b437 fix: use dynamic versioning for debian packages automated-release-fe0119b 2026-01-05 20:55:30 -08:00
0x4bs3nt
1fdedb7f49 docs: update CONTRIBUTING.md
Update CONTRIBUTING.md docs with up to date data:
 - Discord invite to new sif server
 - Update URL-s to new vmfunc/sif repository
 - Update guidelines on contributing framework detection patterns
2026-01-06 05:30:34 +01:00
Celeste Hickenlooper
ef96746357 docs: add apt/cloudsmith installation instructions and badge automated-release-ef96746 automated-release-6a67031 2026-01-05 20:28:30 -08:00
Celeste Hickenlooper
6a67031c39 ci: push debian packages to cloudsmith 2026-01-05 20:28:07 -08:00
Celeste Hickenlooper
f53d739fa7 ci: add debian package builds to releases automated-release-f53d739 2026-01-05 20:13:18 -08:00
Celeste Hickenlooper
a36993a908 docs: add 0xatrilla to contributors for AUR packaging automated-release-04db9be automated-release-9267d9d automated-release-a36993a 2026-01-05 19:51:50 -08:00
Celeste Hickenlooper
04db9be896 docs: add AUR and Homebrew badges to readme 2026-01-05 19:48:51 -08:00
Celeste Hickenlooper
9267d9d682 Merge pull request #53 from 0xatrilla/add-aur-install-instructions
docs: add AUR installation instructions
2026-01-05 19:44:43 -08:00
Celeste Hickenlooper
961db21b2a chore: revise arch linux installation section in README
Updated Arch Linux installation instructions in README.md.
2026-01-05 19:44:15 -08:00
0x4bs3nt
cceb165f3f feat(frameworks): add Astro framework detection
Add detection support for the Astro meta framework.

Includes signature detection, version extraction and tests with full
signature coverage.
2026-01-06 04:40:15 +01:00
acxtrilla
d3d8da2b6b docs: add AUR installation instructions
Added Arch Linux (AUR) installation section to README with instructions
for installing via AUR helpers (yay/paru) or manually with makepkg.

Package available at: https://aur.archlinux.org/packages/sif
2026-01-06 01:56:40 +00:00
Celeste Hickenlooper
cb22206967 docs: add homebrew installation instructions automated-release-cb22206 2026-01-05 16:53:26 -08:00
Celeste Hickenlooper
6df11f8284 chore: readme inconsistency automated-release-6df11f8 2026-01-03 06:14:40 -08:00
Celeste Hickenlooper
ec51fb69b9 ci: upgrade to go 1.24 in all workflows automated-release-1e7f713 automated-release-ec51fb6 automated-release-6c44c6d 2026-01-03 06:04:33 -08:00
Celeste Hickenlooper
6c44c6dc6f chore: add license headers to missing files automated-release-061c5fb 2026-01-03 06:01:00 -08:00
Celeste Hickenlooper
1e7f713bf8 feat(output): add styled console output with module loggers
- Add output package with colored prefixes and module loggers
- Each module gets unique background color based on name hash
- Add spinner for indeterminate operations
- Add progress bar for known-count operations
- Update all scan files to use ModuleLogger pattern
- Add clean PrintSummary for scan completion
2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
4942425ce5 docs: add comprehensive documentation and fix github actions
- add docs/ with installation, usage, modules, scans, and api docs
- add docs link to main readme
- fix release.yml to bundle modules directory with releases
- add module system tests to runtest.yml
- standardize go version to 1.23 across workflows
2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
c7598a1d3f docs: update readme and add module documentation 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
6a2d1664e7 feat: show module loading and execution logs by default 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
9f053850e6 feat: add debug logging for module execution 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
f4c4d79add refactor: move pkg/scan to internal/scan 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
3e67164da2 fix: add io.LimitReader and proper error handling to shodan.go
Add io.LimitReader with 5MB limit to prevent memory exhaustion and
fix ignored error in queryShodanHost. The error from io.ReadAll was
previously being discarded with _, which could mask read failures.
2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
f6e53740f0 fix: add io.LimitReader to prevent memory exhaustion
Add io.LimitReader with 5MB limit to all HTTP response body reads
to prevent potential memory exhaustion from maliciously large responses.

Affected files:
- pkg/scan/cms.go
- pkg/scan/subdomaintakeover.go
- pkg/scan/js/scan.go
- pkg/scan/js/supabase.go
2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
0210b55753 fix: regex compilation performance
Move regex compilation from inside functions to package level to avoid
recompiling on every function call. This improves performance by
compiling the regex patterns once at package initialization.

- Move jwtRegex to package level in supabase.go
- Move nextPagesRegex to package level in next.go
- Use strings.Builder instead of string concatenation in next.go
2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
0a65acdfff feat: implement loadYAML in module loader 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
d7c4387413 feat: integrate module system into sif.go
Add module system integration allowing users to run YAML-defined security
modules via CLI flags. Implements --list-modules to display available modules,
and supports running modules by ID, tags, or all at once.
2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
3239bfd046 feat: add module cli flags 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
aac5d48cbd feat: add built-in yaml modules for security scanning 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
e92650fb16 feat: add yaml module parser and http executor 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
04da73b79c feat: add module system infrastructure 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
3ae61080fe refactor: move config to internal 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
6b209bfb38 refactor: move logger to internal 2026-01-03 05:57:10 -08:00
Celeste Hickenlooper
49ecfccb4a 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
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
09347bc908 feat: add generic types and type-safe result handling
introduce ScanResult interface and generic NewModuleResult constructor
for compile-time type safety when creating module results.

- add pkg/scan/result.go with ScanResult interface and named slice types
- add typed shodanMetadata struct to replace map[string]interface{}
- refactor supabase.go with typed response structs and json.RawMessage
- add ResultType() methods to all scan result types
- update sif.go to use NewModuleResult generic constructor

this provides type safety without breaking JSON serialization.
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
79b60a5259 refactor: extract cve database to separate file
move CVEEntry struct and knownCVEs map to cve.go for better
organization. this reduces detect.go by another 170 lines and makes
the CVE database easier to maintain and extend.
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
a922b77b1e perf: precompile framework version regex patterns
move version extraction patterns to version.go and compile them at init
time instead of recompiling on every check. this significantly improves
framework detection performance.

- add version.go with pre-compiled regex patterns for all frameworks
- update detect.go to use extractVersionOptimized
- remove duplicate extractVersionWithConfidence and isValidVersion functions
- add io.LimitReader to prevent memory exhaustion on large responses
- update tests to use the optimized version extraction
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
06d896b2a5 fix: response body leaks in cms.go and sql.go
close response bodies immediately after reading instead of deferring
inside loops, which delays closure until function exit
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
953b912a3b fix: response body leak in scan.go robots processing
move resp.body.close() inside the loop after use instead of deferring,
which would only run when the outer function exits
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
0f1c2b1799 feat: add generic worker pool for concurrent task processing
implement channel-based work distribution with generics for type-safe
concurrent processing, includes run, runwithfilter, and foreach methods
with comprehensive test coverage
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
29f817d935 perf: optimize deduplication with map-based o(1) lookups in lfi and sql
replace o(n) slice iteration with map lookups for checking duplicates,
preallocate result slices, reduce lock hold time by separating map check
from result append
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
534d2605fd fix: data races and slice preallocation in dirlist and dnslist
add mutex protection for concurrent slice appends, preallocate result
slices with reasonable capacity, use logger instead of direct file i/o
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
6d505b90a3 fix: error patterns and string building in sif.go and js/scan.go
replace errors.new(fmt.sprintf()) with fmt.errorf, use strings.builder
instead of string concatenation in loop, fix defer in loop issue,
preallocate slices where size is estimable
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
18ab70fc35 test: add logger tests for buffered write functionality
covers initialization, write, flush, close, concurrent writes, and
file creation with proper cleanup verification
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
6f9a5ce9e8 refactor: logger to use buffered file handles
replace per-write file open/close with cached file handles and buffered
writers for significantly reduced i/o overhead. adds flush and close
methods for proper cleanup at program exit.
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
d7cf882a8d chore: remove unused utils package
the returnApiOutput function was never used and contained only
hardcoded test data
2026-01-03 05:57:09 -08:00
Celeste Hickenlooper
a18a4fae31 ci: add test coverage reporting to workflow
run tests with race detector and coverage profiling, upload results
to codecov for visibility into test coverage metrics
2026-01-03 05:57:09 -08:00