Admin portal scaffolding#57
Merged
victor-cuevas merged 9 commits intofeat/admin-portalfrom Mar 7, 2026
Merged
Conversation
- Entry point with YAML config, --config flag, and env var overrides - SQLite store with migration framework (instances, users, audit_log, sessions) - HTTP server with security headers (CSP, X-Frame-Options, etc.) - SPA handler with embed.FS for single-binary distribution - Makefile targets: build-admin, run-admin, build-admin-dev
- Vue 3 + Vite + Pinia + Vue Router with Vite proxy to Go backend - Design system: CSS custom properties, BaseButton, BaseCard, BaseInput, StatusIndicator, BaseEmptyState - App shell with sidebar nav, Fleet Dashboard and Audit Log routes - WCAG AA contrast, keyboard focus styles, aria attributes - Vitest + jsdom configured for testing
- Lint (Go + ESLint), test (Go + Vitest), build (Go + Vite) - Path-scoped triggers on admin/** changes only
RetentionDays as int made it impossible to set retention_days: 0 (keep forever) in YAML — the zero value was indistinguishable from omission and silently became 90. Change to *int so nil means unset (gets default 90) while &0 means explicitly keep forever. Add regression test.
- Fix gofmt import ordering in main.go (errors before flag) - Add context.Context to store.Open and migrate for noctx compliance - Use ExecContext/QueryRowContext/BeginTx throughout store package - Extract parseDuration helper to reduce applyEnvOverrides complexity - Split migrate into ensureMigrationsTable/currentSchemaVersion/applyMigration - Add justifying comment to blank sqlite driver import - Extract default config constants to eliminate goconst violations
- CI: use --version instead of --help || true for binary verification - BaseInput: add aria-invalid and aria-describedby for screen readers
Add #nosec G304 annotation to admin config loader (path from trusted sources: CLI flag, env var, or hardcoded default). Explicitly discard db.Close() errors on cleanup paths in store.Open() to satisfy G104 (CWE-703).
arnaugiralt
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.