Repository navigation
feat: bootstrap mode + network scanner - #67
Conversation
When config.yaml is missing, the app now starts a minimal HTTP server serving only the setup wizard + driver catalog + network scanner. No drivers, no telemetry, no MPC — just the wizard API. New package: go/internal/scanner — TCP port scanner for Modbus (502), MQTT (1883), and HTTP (80) on local subnets. 64-goroutine concurrent scan with 500ms timeout per host. API: GET /api/scan returns discovered devices as JSON. POST /api/config saves + restarts via syscall.Exec. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
## [0.5.0](v0.4.0...v0.5.0) (2026-04-16) ### Features * add setup wizard frontend (web/setup.html + web/setup.js) ([#66](#66)) ([bc1a285](bc1a285)) * bootstrap mode + network scanner for onboarding wizard ([#67](#67)) ([267cef4](267cef4)) * wizard dashboard trigger + driver catalog enrichment ([#68](#68)) ([78c83cf](78c83cf))
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb657bea09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| clean := filepath.Clean(filepath.Join(webDir, r.URL.Path)) | ||
| absWeb, _ := filepath.Abs(webDir) | ||
| absPath, _ := filepath.Abs(clean) | ||
| if !strings.HasPrefix(absPath, absWeb) { |
There was a problem hiding this comment.
Harden bootstrap static path check
The path-traversal guard in serveStatic is bypassable because it relies on strings.HasPrefix(absPath, absWeb) instead of enforcing a directory boundary. In bootstrap mode, a request like /%2e%2e/web2/secret can arrive as /../web2/secret, and filepath.Clean(filepath.Join(webDir, ...)) resolves to a sibling path such as <webDir>2/secret; that still passes the prefix test and can be served if it exists. This exposes files outside the intended web root during onboarding; use a boundary-safe check (for example filepath.Rel + .. rejection, or absWeb + string(os.PathSeparator) prefix).
Useful? React with 👍 / 👎.
Onboarding wizard backend. go test ./... green.