Watch
1
0
Fork
You've already forked RedFlag
0
Commit graph

426 commits

Author SHA1 Message Date
Fimeg
0dbf4432dd ci: sync-codeberg job — auto-push public to codeberg when CI passes 2026-06-12 15:23:46 -04:00
Fimeg
88b612c77e feat: component manifest drives installs, checkoff, and desktop lockstep
INSTALL-001: manifest schema with components+artifacts, CI generation
in release gate, manifest-driven install template with --guided and
--checkoff modes, post-install provisioning checks, desktop joins
version lockstep (bump-version.sh + CI build + gate enforcement).

Setup.tsx reduced to primitives (FormSection, TextField, Alert).
2026-06-12 15:23:15 -04:00
Fimeg
0669b4d6b1 web: completed is green everywhere; typed-confirmation actually gates
CommandStatusBadge joins the inline timelines (Casey ruling). SecuritySettings CONFIRM/RESET input was theater — border colors changed, Confirm worked regardless. Now controlled state, button disabled until the phrase matches.
2026-06-12 14:35:27 -04:00
Fimeg
6fb7e7c81f web: shared timestamp formatters + PageState adoption; Agents test gets ConfirmProvider
formatUnixTime/formatTimeOnly into utils (ProcessDetailModal's formatTime was never a duration). RateLimiting loading state onto PageState; six candidate sites correctly left alone as section/inline loaders. Agents.test.tsx wraps in ConfirmProvider — the 31c4ae74 conversion broke it and nobody ran the full suite.
2026-06-12 14:25:32 -04:00
Fimeg
8c396c1f7a web: hand-rolled modal overlays onto the Modal primitive
Five sites converted (LiveOperations, AgentUpdatesEnhanced x2, SecurityEvents, ProcessDetailModal, SecuritySettings); Layout's sidebar backdrop is a drawer, not a modal — left alone. Modal grows maxHeight + Body scrollable.
2026-06-12 14:18:52 -04:00
Fimeg
31c4ae74e5 web: ConfirmDialog primitive — window.confirm is gone
ConfirmProvider + useConfirm, 11 call sites converted (4 more than expected). Danger variant: red button, Enter inert, cancel takes focus — a stray Enter can never destroy. Modal now yields focus to autoFocus children.
2026-06-12 14:11:16 -04:00
Fimeg
d75939cb6a web: status/severity colors get one truth table
statusColors.ts in primitives — 9 domains, kept distinct on purpose. Eight files stop hand-rolling switches. Known discrepancy documented in place: CommandStatusBadge paints completed gray, both inline command timelines paint it green.
2026-06-12 14:01:00 -04:00
Fimeg
e0f2dd8b07 tests: drop unused React imports breaking tsc 2026-06-12 13:41:11 -04:00
Fimeg
415f229b8f web: server status awareness — version header, disconnect overlay, update banner
X-RedFlag-Version on every response; axios interceptor tracks connection state, no dedicated health poll. Recovered from stash — never meant to be parked.
2026-06-12 13:41:11 -04:00
Fimeg
8d54fec8eb raf: desktop component + local trust boundary + fleet-join maintainability
- components/05-desktop.md: the tray as credential-less localapi client; no-token surface marked as open decision (peer identity unanswered), not doctrine
- trust-boundaries: Local boundary section — the kernel is the middleware, group stamping at login is the sharp edge
- standalone-authority: fleet join must stay idempotent, single-source gated, and tested in both directions
2026-06-12 13:26:54 -04:00
Fimeg
71fe075f65 desktop: fix tray icon depth, entry routing, socket error UX
- icon.png 16-bit -> 8-bit RGBA (tray panicked on data size)
- devUrl + dist rename so the desktop entry actually loads (release served 404, dev served the fleet login)
- permission denied on the localapi socket now explains group membership / re-login instead of os error 13
2026-06-12 13:19:51 -04:00
Fimeg
070148f1f5 test: set issuer claim in auth verify test tokens
Now mandatory after the JWT issuer grace period closed.
2026-06-11 20:58:28 -04:00
Fimeg
7670594ac3 sec: issuer claim mandatory — grace period closed
Grace shipped 2026-05-21 for pre-issuer tokens; forward-only removal.
Empty issuer now rejects like a wrong one.
2026-06-11 20:50:27 -04:00
Fimeg
2b1189aaa2 sec: hash failure now blocks approval — fail closed
Hash registry is the tamper gate; approving without it was fail-open.
Empty hash with no error (no artifact) still passes.
2026-06-11 20:48:05 -04:00
Fimeg
6a4be4d12f refactor: timeout + reconciler tickers onto bgRunner
Last two raw tickers; now they get shutdown, panic isolation,
and /health/tasks like everything else.
2026-06-11 20:48:04 -04:00
Fimeg
1af5a9a184 test: guard test learns the bgRunner.Every pattern
Ticker consolidation moved refresh_token_cleanup into the taskrunner;
the source-grep guard only knew go func/ticker.
2026-06-11 20:39:32 -04:00
Fimeg
6cec9aa8ac test: atomic counter in notifier countingSink
Dispatch fires sinks in goroutines; the plain-int counter tripped
go test -race. CI red since the notification bell landed.
2026-06-11 20:27:28 -04:00
Fimeg
dee6149c06 bump: v0.2.8.2
Version lockstep across server, agent, docker-compose, helper.
2026-06-11 20:25:08 -04:00
Fimeg
a944479085 changelog: backfill v0.2.8.1, add v0.2.8.2 2026-06-11 20:24:33 -04:00
Fimeg
413211c657 fix: idempotent Stop() + surface discarded errors
sync.Once on TimeoutService/Reconciler/Syncer stop channels.
syncOne returns its error so admin SyncNow reports real failures.
OSV vuln unmarshal failure now logged, still fails closed.
2026-06-11 20:23:35 -04:00
Fimeg
32c195ef2f sec: stop trusting Host header for agent-facing URLs
resolveServerURL: operator-configured REDFLAG_PUBLIC_URL wins;
request Host only as fallback with a [WARN]. Applied to install
scripts, registration responses, and fleet-join. Host header is
attacker-controllable on pre-auth endpoints.
2026-06-11 20:23:35 -04:00
Fimeg
43ddaab262 cleanup: remove unwired lifecycle/build services
AgentLifecycleService, ConfigService, BuildService, ArtifactService,
AgentBuildHandler — added as a unification pass (e56888e6), never
instantiated by any commit since. ~600 lines.
2026-06-11 20:17:26 -04:00
Fimeg
c6e430225c setup: read bootstrap DB password from environment
Server container shares the bootstrap .env with postgres, so the
current password is already in our environment. Hardcoded literal
kept only as fallback for the shipped default.
2026-06-11 20:17:26 -04:00
Fimeg
230b2f9ab9 fix: comma-ok guards on agent-supplied metadata and gin context
Malformed agent metadata could panic the server (rapid_polling
fields, buffered event metadata, timeout params). scanner_config
asserted uuid.UUID on a user_id the middleware stores as string —
guaranteed panic on both admin endpoints.
2026-06-11 20:17:26 -04:00
Fimeg
86b0944551 wire: auth audit registration + background task consolidation
AUDIT-002: webAuth/agentAuth/metricsAuth registered with the route
auditor before AuditAndExit. RETAIN-001: retention sweep on bgRunner.
Offline-agent and refresh-token tickers migrated to bgRunner.Every;
upstream syncer + reconciler now stopped on shutdown.
2026-06-11 20:17:26 -04:00
Fimeg
7beb0b9478 bump: v0.2.8.1
Version lockstep across server, agent, docker-compose.
2026-06-11 17:47:42 -04:00
Fimeg
7deca9bc25 web: wire FilterBar + useFilterUrl across pages
Agents and History pages now use the primitives FilterBar with
URL-synced filter state via useFilterUrl. Adds test setup infra
(vitest + jsdom) and page-level test shells.
2026-06-11 17:47:39 -04:00
Fimeg
182536a1d1 retain: core retention sweep (RETAIN-001)
Prunes aged rows from append-only history tables on a schedule.
Three operator-tunable horizons (metrics/events/audit), 0 = keep
forever. ctid-based batched DELETE, closed-table whitelist.

Signed-off-by: Fimeg <casey.tunturi@gmail.com>
2026-06-11 17:47:30 -04:00
Fimeg
75346d4c68 sec: encrypt TOTP seed at rest (migration 058)
Store the fleet-join TOTP seed as AES-256-GCM ciphertext instead of
a SHA-256 hash. Hash-only can never verify a time code without the
host disclosing the seed — which made the 2FA a second cleartext
shared secret. Seed crosses the wire once, at token creation over
the admin-authenticated channel; the join request carries only the
6-digit code.
2026-06-11 17:47:23 -04:00
Fimeg
3a8ffe1643 raf: publish — relative links, auth audit section, component tables 2026-06-11 17:47:21 -04:00
Fimeg
a4d585c79c code review: 12-finding fan-out — fixes across server, agent, web
HIGH:
- URL sync race: page useEffect now preserves filter params from useFilterUrl
- useFilterUrl: document two-effect pattern (state→URL and URL→state)
- Fleet-join: store nil (not &"") for absent MachineID/PublicKeyFingerprint
- agents.go: same NULL fix for standard registration path

MEDIUM:
- Test assertions: replace CSS class checks with user-visible element assertions
- Updates vuln toggle: fixed-set like other quick filters (was toggling)
- ConfigureSecrets route: restore to welcome-mode server
- Config upgrade: recursive mergeMissingKeys for nested sub-fields + test

LOW:
- LiveOperations: wire FilterBar pills/clearAll/activeCount
- HashTOTPSeed: remove dead code replaced by encrypted storage (migration 058)
- auditor.go: replace unsafe reflect with Recorder wrapper (AUDIT-002)

History filter panel kept as-is (collapsible pattern intentional).
Agents.tsx duplicate buildFilterPills was a false positive (already resolved).
2026-06-11 17:38:08 -04:00
Fimeg
7c25204bd8 README: fix installer commands to use header-based token auth 2026-06-11 17:24:09 -04:00
Fimeg
d55026aa44 process scan: set Source on AgentCommand to avoid check constraint crash
TriggerProcessScan was building an AgentCommand without Source, which hit
the agent_commands_source_check constraint every time. Every other
command-creation site sets this correctly; this one got missed.

Thanks to QiTechCo for the catch during v0.2.8.0 dev testing.

Co-Authored-By: Xzaviar <user@QiTechCo.qitc.io>
2026-06-11 17:24:06 -04:00
Fimeg
44d7e3dd66 global events: notification bell feed + exclude client_error from operator alerts 2026-06-11 13:38:31 -04:00
Fimeg
34d4a02826 install template integrity test — render, config keys, scriptlet syntax 2026-06-11 13:38:17 -04:00
Fimeg
76fd491849 agent config: persist new default keys on upgrade 2026-06-11 13:38:16 -04:00
Fimeg
88adf90420 agent: post-upgrade healthcheck + kernel enforcer wired to tee logger 2026-06-11 13:38:16 -04:00
Fimeg
db63095e03 CI: installer integrity test job 2026-06-11 13:38:15 -04:00
Fimeg
ea9fbc1d7b supply chain consumer: refinements + test coverage 2026-06-11 13:37:58 -04:00
Fimeg
c99d0a1815 security logger: structured event output + test coverage 2026-06-11 13:37:57 -04:00
Fimeg
4ec8afcbfd kernel: eBPF consumer refinements 2026-06-11 13:37:56 -04:00
Fimeg
5e710f597b notifier: ntfy + SMTP event dispatch, wired through SystemEventLogger 2026-06-11 13:37:53 -04:00
Fimeg
4c1da83d8d SEC-025: wire fleet-join endpoint + notifier dispatcher (main.go) 2026-06-11 13:37:41 -04:00
Fimeg
9c43698b00 SEC-025: fleet-join 2FA — TOTP validation, host-generated seed, migration 057 2026-06-11 13:37:17 -04:00
Fimeg
47fe315e8f RAF: convert [[wiki-links]] to standard markdown for GitHub rendering 2026-06-11 11:47:44 -04:00
Fimeg
6debe1f729 global events query + handler — fleet-wide notification bell feed 2026-06-11 11:33:07 -04:00
Fimeg
7d1ad50399 wire agent + global event endpoints (LIFECYCLE-006 groundwork) 2026-06-11 11:32:51 -04:00
Fimeg
5845709f86 dnf scanner: tighten EVRA comparison + test coverage 2026-06-11 11:32:25 -04:00
Fimeg
2064a5035f supply chain vuln UI — backend endpoints + frontend rendering for CVE/advisory detail 2026-06-11 11:32:24 -04:00
Fimeg
a19dcf4f14 RAF: full docs pass — components, flows, security, scanners, reference, testing, verification, overview 2026-06-11 11:32:21 -04:00