Commit Graph

17 Commits

Author SHA1 Message Date
salvacybersec
dd2c8c5586 feat(18-01): chi v5 dependency, go:embed static assets, HTML layout and overview templates
- Add chi v5.2.5 to go.mod
- Vendor htmx v2.0.4 minified JS in pkg/web/static/
- Create go:embed directives for static/ and templates/
- Create layout.html with nav bar and Tailwind CDN
- Create overview.html with stat cards and findings table
2026-04-06 18:01:37 +03:00
salvacybersec
0319d288db feat(phase-17): Telegram bot + scheduler + serve/schedule CLI commands
pkg/bot: Bot struct with telego long-polling, command handlers (/scan, /verify,
/recon, /status, /stats, /providers, /help, /key), /subscribe + /unsubscribe,
notification dispatcher.

pkg/scheduler: gocron v2 wrapper with SQLite-backed job persistence,
Start/Stop/AddJob/RemoveJob lifecycle.

cmd/serve.go: keyhunter serve [--telegram] [--port=8080]
cmd/schedule.go: keyhunter schedule add/list/remove
2026-04-06 17:50:43 +03:00
salvacybersec
8dd051feb0 merge: phase 17 wave 3 CLI wiring 2026-04-06 17:48:25 +03:00
salvacybersec
292ec247fe feat(17-05): implement serve and schedule commands replacing stubs
- cmd/serve.go: starts scheduler, optionally starts Telegram bot with --telegram flag
- cmd/schedule.go: add/list/remove/run subcommands for scheduled scan job CRUD
- pkg/scheduler/: gocron v2 based scheduler with DB-backed jobs and scan execution
- pkg/storage/scheduled_jobs.go: scheduled_jobs table CRUD with tests
- Remove serve and schedule stubs from cmd/stubs.go

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:46:24 +03:00
salvacybersec
9ad58534fc feat(17-03): implement Telegram bot command handlers
- Add telego v1.8.0 dependency for Telegram Bot API
- Create pkg/bot package with Bot struct holding engine, verifier, recon, storage, registry deps
- Implement 8 command handlers: /help, /scan, /verify, /recon, /status, /stats, /providers, /key
- /key enforced private-chat-only for security (never exposes unmasked keys in groups)
- All other commands use masked keys only
- Handler registration via telego's BotHandler with CommandEqual predicates
2026-04-06 17:34:44 +03:00
salvacybersec
77e8956bce fix(17-04): resolve go.sum merge conflict
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:31:22 +03:00
salvacybersec
6e0024daba merge: phase 17 wave 1 2026-04-06 17:29:18 +03:00
salvacybersec
0d00215a26 feat(17-01): add telego dependency and create Bot package skeleton
- Add telego v1.8.0 as direct dependency for Telegram bot
- Create pkg/bot/bot.go with Bot struct, Config, New, Start, Stop
- Implement isAllowed chat authorization and per-user rate limiting
- Add command dispatch with handler stubs for all 10 commands
- Long polling lifecycle with context cancellation for graceful shutdown
2026-04-06 17:27:41 +03:00
salvacybersec
c71faa97f5 feat(17-02): implement scheduler package with gocron wrapper and job lifecycle
- Scheduler wraps gocron with Start/Stop lifecycle
- Start loads enabled jobs from DB and registers cron schedules
- AddJob/RemoveJob persist to DB and sync with gocron
- RunJob for manual trigger with OnComplete callback
- JobResult struct for notification bridge
- Promote gocron/v2 v2.19.1 to direct dependency
2026-04-06 17:27:00 +03:00
salvacybersec
c8f7592b73 feat(17-02): add gocron dependency, subscribers and scheduled_jobs tables with CRUD
- Add gocron/v2 v2.19.1 as direct dependency
- Append subscribers and scheduled_jobs CREATE TABLE to schema.sql
- Implement full subscriber CRUD (Add/Remove/List/IsSubscribed)
- Implement full scheduled job CRUD (Save/List/Get/Delete/UpdateLastRun/SetEnabled)
2026-04-06 17:25:43 +03:00
salvacybersec
c3b9fb4043 chore(09-04): add github.com/temoto/robotstxt dependency
- Added temoto/robotstxt v1.1.2 for robots.txt parsing in recon sources
2026-04-06 00:40:39 +03:00
salvacybersec
30c0e9871b feat(05-01): extend VerifySpec and Finding, add gjson dep
- VerifySpec: add SuccessCodes, FailureCodes, RateLimitCodes, MetadataPaths, Body
- Preserve legacy ValidStatus/InvalidStatus for backward compat
- Add EffectiveSuccessCodes/FailureCodes/RateLimitCodes fallback helpers
- Add ExtractMetadata helper using gjson (skeleton for Plan 05-03)
- Finding: add Verified, VerifyStatus, VerifyHTTPCode, VerifyMetadata, VerifyError
- Add github.com/tidwall/gjson v1.18.0 as direct dependency
2026-04-05 15:41:13 +03:00
salvacybersec
e48a7a489e feat(04-03): implement GitSource with full-history traversal
- Walks every commit across branches, tags, remote-tracking refs, and stash
- Deduplicates blob scans by OID (seenBlobs map) so identical content
  across commits/files is scanned exactly once
- Emits chunks with source format git:<short-sha>:<path>
- Honors --since filter via GitSource.Since (commit author date)
- Resolves annotated tag objects down to their commit hash
- Skips binary blobs via go-git IsBinary plus null-byte sniff
- 8 subtests cover history walk, dedup, modified-file, multi-branch,
  tag reachability, since filter, source format, missing repo
2026-04-05 15:18:05 +03:00
salvacybersec
0f30c0d156 chore(04-01): add go-git, clipboard, and x/exp/mmap dependencies
- github.com/go-git/go-git/v5 v5.17.2 (git history traversal)
- github.com/atotto/clipboard v0.1.4 (cross-platform clipboard)
- golang.org/x/exp (mmap for large file reads)

Wave 0 dependency bootstrap for Phase 4 input sources. Modules
are recorded as indirect until Wave 1 plans import them; go.sum
contains checksums. go build ./... and go vet ./... both green.
2026-04-05 15:14:37 +03:00
salvacybersec
ef8717b9ab chore: fix go.mod after wave 1 merge 2026-04-05 00:14:32 +03:00
salvacybersec
a9859b3384 feat(01-02): embed loader, registry with Aho-Corasick, and filled test stubs
- loader.go with go:embed definitions/*.yaml for compile-time embedding
- registry.go with List(), Get(), Stats(), AC() methods
- Aho-Corasick automaton built from all provider keywords at NewRegistry()
- pkg/providers/definitions/ with 3 YAML files for embed
- All 5 provider tests pass: load, get, stats, AC, schema validation
2026-04-05 00:10:56 +03:00
salvacybersec
ebaf7d7c2d test(01-02): add failing tests for provider schema validation and registry 2026-04-05 00:03:55 +03:00