Skip to content

fix(oncall): record on-call override changes in the audit log - #816

Merged
fclairamb merged 1 commit into
mainfrom
fix/oncall-override-delete-scope
Nov 9, 2026
Merged

fclairamb merged 1 commit into
mainfrom
fix/oncall-override-delete-scope

Conversation

@fclairamb

Copy link
Copy Markdown
Owner

Follow-up to GHSA-rh8v-28gv-2q57. The authorization part of that advisory (deleting an override must stay within its org and schedule) shipped in #714 and is in v0.42.1 and later. This PR closes the remaining point: override changes left no audit trace.

What changed

  • Creating or deleting an on-call override now records an oncall_schedule.updated audit event on the schedule. The event has changed_fields: ["overrides"] plus override_action (created / deleted), override_uid, override_user_uid, override_start_at and override_end_at. This follows the pattern maintenance_window.updated uses for its attached checks. The free-text reason is not recorded.
  • DeleteOverride now loads the override within its schedule (GetOnCallScheduleOverride) before deleting it, so the event can name whose cover was removed. The delete itself stays scoped to the schedule.
  • No new event type, no migration, no config change. dash0 already renders oncall_schedule.* through the generic configuration-event path.

Docs

  • web/docs/docs/features/audit-log.md: the on-call row now mentions overrides.
  • web/docs/docs/features/on-call.md: overrides section says changes are audited.
  • wiki/api-specification/events-catalogue.md: the payload keys are documented.

Tests

New server/internal/handlers/oncallschedules/audit_test.go (SQLite):

  • Table-driven create/delete: each writes exactly one attributed row with the expected target and payload, and without the reason.
  • A refused cross-org delete records nothing in either org. Positive control: the same caller deleting their own override is recorded.

Both tests fail on main and pass with this change. go test -short on oncallschedules, events, audit and db/... passes, and golangci-lint run ./... reports 0 issues.

🤖 Generated with Claude Code

Adding or removing an on-call schedule override changes who gets paged,
but neither left any trace in the audit log. Both now record an
`oncall_schedule.updated` event on the schedule, with `overrides` as the
changed field and the override's UID, user and time window. The free-text
reason is not recorded.

Deleting an override now loads it within its schedule first, so the event
says whose cover was removed. A delete that is refused (wrong org, wrong
schedule, unknown override) records nothing.

Follow-up to GHSA-rh8v-28gv-2q57 (the authorization fix shipped in #714).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.22%. Comparing base (906a002) to head (081abef).

Files with missing lines Patch % Lines
...erver/internal/handlers/oncallschedules/service.go 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #816      +/-   ##
==========================================
- Coverage   89.25%   89.22%   -0.04%     
==========================================
  Files        1332     1332              
  Lines      135941   135956      +15     
==========================================
- Hits       121336   121306      -30     
- Misses      14596    14641      +45     
  Partials        9        9              
Files with missing lines Coverage Δ
...erver/internal/handlers/oncallschedules/service.go 87.86% <93.75%> (-0.62%) ⬇️

... and 19 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fclairamb
fclairamb merged commit 4561f41 into main Nov 9, 2026
39 checks passed
@fclairamb
fclairamb deleted the fix/oncall-override-delete-scope branch November 9, 2026 08:06
@fclairamb fclairamb mentioned this pull request Nov 9, 2026
fclairamb added a commit that referenced this pull request Nov 9, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.45.0](v0.44.3...v0.45.0)
(2026-11-09)


### Features

* dashboard glance strips, failed sign-in account names, log noise fixes
([#824](#824))
([659c52c](659c52c))
* **dashboard:** 24h / 7d / 30d availability window, saved per user
([#821](#821))
([283a28e](283a28e))
* **mcp:** sharpen tool descriptions for Glama scoring
([#825](#825))
([ca305f1](ca305f1))
* **server:** run as a native Linux systemd service
([#819](#819))
([8a0cb2f](8a0cb2f))
* **server:** run as a native macOS launchd service
([#811](#811))
([c6612ea](c6612ea))
* **server:** run as a native Windows service, no NSSM
([#802](#802))
([c66c947](c66c947))
* **telegram:** explicit /support mode instead of capturing every
message ([#820](#820))
([571607e](571607e))


### Bug Fixes

* **auth:** admit by email address only when the email is verified
([#818](#818))
([91992fe](91992fe))
* batch of production-log and Slack issues
([#808](#808))
([580d09c](580d09c))
* **deps:** update github.com/dop251/goja digest to d6eaa50
([#800](#800))
([60b7443](60b7443))
* **deps:** update github.com/dop251/goja digest to d8dfb4d
([#810](#810))
([e11b926](e11b926))
* **deps:** update go dependencies (non-major)
([#806](#806))
([1c59927](1c59927))
* **deps:** update go dependencies (non-major)
([#822](#822))
([ec0aebf](ec0aebf))
* **deps:** update module github.com/aws/aws-sdk-go-v2/credentials to
v1.20.17 ([#823](#823))
([27efc51](27efc51))
* **deps:** update module github.com/crewjam/saml to v0.6.3
([#807](#807))
([0f06336](0f06336))
* **deps:** update module github.com/wneessen/go-mail to v0.8.2
([#812](#812))
([3670206](3670206))
* **oncall:** record on-call override changes in the audit log
([#816](#816))
([4561f41](4561f41))
* serve robots.txt, indexable on solidping.io only
([#809](#809))
([3512833](3512833))
* **server:** refuse a pre-existing Windows service data folder others
control ([#817](#817))
([b1832b5](b1832b5))
* **vendorstatus:** drop datadog and atlassian from the catalog
([#814](#814))
([d3397c5](d3397c5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant