Commit Graph

298 Commits

Author SHA1 Message Date
jamesread 7ecc7791d8 chore: golangci-lint fixes 2026-07-29 00:30:57 +01:00
jamesread e013ec0f88 chore: all HTTP requests now come with a context, timeout, etc. 2026-07-28 23:08:20 +01:00
jamesread aee6db3263 chore: migrated from experimental go slices to stdlib slices 2026-07-28 22:27:41 +01:00
jamesread a1f03e7d33 chore: fieldalignment across code base to reduce memory usage 2026-07-28 22:26:51 +01:00
jamesread e6a232f21b chore: Turn up golang lint, and fix some minor error handling stuff 2026-07-28 22:13:56 +01:00
jamesread a080f4ee2d chore: Turn up golang lint, and fix some minor error handling stuff 2026-07-28 22:11:37 +01:00
jamesread d7758a91c4 fix: gosec enabled, fixed slowloris on the http.Server, no-timeout serve, webui path traversal, overly permissive perms on themes dir 2026-07-28 21:46:59 +01:00
jamesread 7c4eefa378 fix: Max of 16 clients in an event stream 2026-07-28 17:22:34 +01:00
jamesread e5d29b68da fix: close shellAfterCompleted output injection bypass, and docs consistency
Rewrite all output/exitCode template forms to env refs and omit them
  from template args so command output cannot reach sh -c.
  (GHSA-vc6p)
2026-07-28 16:57:52 +01:00
jamesread e7eac3fa21 chore: Make sure we dont try and bind on a bad port 2026-07-28 15:04:51 +01:00
jamesread 059eed7d62 chore: coderabbit suggestions 2026-07-28 13:58:00 +01:00
jamesread c7646166f2 chore: Missed a couple of files in the last commit 2026-07-28 13:23:19 +01:00
jamesread b95d6c683e fix: Dashboards can now use categories, service looks for $PORT 2026-07-28 12:51:55 +01:00
jamesread 839d244e51 fix: intermediate output and comfirmation 2026-07-27 23:17:42 +01:00
jamesread 18903853fb fix: A single entities read failure wont clear all entities 2026-07-25 22:20:52 +01:00
jamesread b000e82238 chore: Prevent users overriding configsource 2026-07-25 22:20:14 +01:00
jamesread 6eb3827ddd feat: dnsname argument type 2026-07-25 22:00:02 +01:00
James Read ecc5c64046
feat: Show config issues in diagnostics (#1087) 2026-07-25 21:25:11 +01:00
jamesread e1f8c01fe5 chore: coderabbit suggestions 2026-07-24 16:26:13 +01:00
jamesread fe1ac20935 feat: Show config issues in diagnostics 2026-07-24 15:27:02 +01:00
jamesread c4531b344e fix(executor): sanitize unsafe chars in log filenames
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 07:12:03 +01:00
jamesread c5f0387045 chore: coderabbit suggestions 2026-07-19 00:03:12 +01:00
jamesread c72d180fae fix: Dashboards now can have ACLs (#445) 2026-07-18 23:57:09 +01:00
jamesread 25b80e1460 fmt: Code style and linter 2026-07-18 22:46:05 +01:00
jamesread e2bf82ff9c fix(#952): carry arguments when rerunning an action
The Rerun button ignored the original arguments and always started
actions with an empty argument set, so actions that take arguments
threw instead of re-running.

Rerun now reuses the arguments stored on the log entry: complete
runs restart directly, and incomplete ones (missing values, or
password / very_dangerous_raw_string fields) open the argument form
pre-filled via history.state. Justification-required actions always
re-prompt so each execution is explicitly justified.

Storable arguments are copied onto the log entry only after argument
parsing succeeds, so failed executions no longer persist arguments
that could be replayed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 17:06:04 +01:00
jamesread 5b1a29db7f docs: Standardize on "Server Diagnostics", update many screenshots 2026-07-09 11:30:16 +01:00
jamesread 8eda67a39e fix(docs): correct shellAfterCompleted quoting for output and exitCode
The after-completion example put {{ output }} and {{ exitCode }} inside
  single-quoted shell arguments, so  and  never expanded
  after substituteShellAfterCompletedEnvRefs runs.
  Update the apprise sample to use printf-based quoting that allows env
  substitution, document the single-quote pitfall, and extend
  TestShellAfterCompletedUsesOutputEnvSafely to assert stdout is
  substituted as well as injection being blocked.
2026-07-08 14:01:43 +01:00
jamesread 4ef86abee7 security: GHSA-vc6p-m6vx-6cwq (HIGH) harden shellAfterCompleted execution
Route output and exitCode through OUTPUT/EXITCODE environment variables
instead of shell interpolation, and block shellAfterCompleted for webhook
actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 12:29:37 +01:00
jamesread 1396184777 fix(executor): always anchor custom regex patterns and harden shellAfterCompleted
Wrap regex: patterns in a non-capturing group before applying ^...$ so
  alternation cannot bypass full-string matching. Return template parse
  errors from buildShellAfterCommand, and guard nil binding/action before
  building shellAfterCompleted commands.
2026-07-08 10:46:13 +01:00
jamesread 904616b1b1 security: GHSA-jm28-2wcr-qf3h (LOW) enforce logs ACL on sync execution endpoints
StartActionAndWait and StartActionByGetAndWait now apply the same logs
permission check used by GetLogs and ExecutionStatus.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 09:52:30 +01:00
jamesread 0e45f3b0e3 security: GHSA-xc5w-4v5w-7x65 (HIGH) harden shell argument type safety
Block additional unvalidated argument types from shell actions, enforce
full-string custom regex matching, and allowlist http/https URL schemes.

Update checkbox integration test to use exec, matching the intended shell
vs exec split for choiceless checkbox arguments.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 09:40:48 +01:00
James Read ec114e95d2
Merge commit from fork
security: GHSA-xpxj-f2fm-rqch (HIGH) bound OAuth2 state map growth
2026-07-08 08:59:51 +01:00
jamesread 422044317c security: GHSA-xpxj-f2fm-rqch (HIGH) bound OAuth2 state map growth
Sweep expired OAuth2 state entries, cap the map at 10000 entries, and
remove stale state on failed callback validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 14:26:37 +01:00
jamesread 42f2572616 fix(config): reject ambiguous checklist comma format and propagate encode errors
ParseChecklistValue now accepts JSON arrays or single bare values and rejects
  legacy comma-separated input. Empty JSON segments are validated consistently,
  and FormatChecklistValue returns marshal errors instead of an empty string
2026-07-07 11:57:20 +01:00
jamesread a58e2fe0c3 chore: fix flakey test 2026-07-07 10:32:33 +01:00
jamesread 9dc51df01d fix: harden checklist JSON wire format, entity pagination, and review findings across API and UI 2026-07-07 10:14:17 +01:00
James Read 1325ba6a72
Merge branch 'next' into feat/entity-list-related-actions-api 2026-07-06 23:57:06 +01:00
jamesread 58dc804e78 fix: coderabbit suggestions on the justification 2026-07-06 23:35:04 +01:00
jamesread afd9f9033a feat: expand entity list and detail APIs with properties and related actions
Support filtered paginated entity lists, configurable instance columns, and
entity-scoped actions with prefilled arguments for richer entity workflows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 20:37:26 +01:00
jamesread a530dca579 refactor: collapse action justification into a string template field
Use a single justification string for both requirement and templating so
empty values skip prompts while templates can prefill audit reasons at start.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 20:36:30 +01:00
jamesread b18518ebea fix: add support for entities in checklists 2026-07-06 12:17:03 +01:00
jamesread 6077c63cfd chore: Fix coderabbit warnings 2026-07-06 11:39:43 +01:00
jamesread e24ae6265b feat: Checklist support (#922) 2026-07-06 11:01:22 +01:00
jamesread 03af6890c2 fix: flakey unit tests 2026-06-29 16:25:10 +01:00
jamesread c5cd5295b0 chore: fix race condition in tests 2026-06-29 00:39:49 +01:00
jamesread a413f9d6af chore: fix flakey tests 2026-06-29 00:03:31 +01:00
James Read 5fca2d9482
Merge branch 'next' into feat/better-prometheus-metrics 2026-06-28 23:17:28 +01:00
jamesread 57f3ef46ad fix: several merge messes 2026-06-28 22:52:16 +01:00
jamesread e63094e8e8 fix: several merge messes 2026-06-28 22:15:46 +01:00
jamesread 42003da384 fix: rerun args 2026-06-26 23:25:24 +01:00