Skip to content

fix(security): Telegram bot membership and role checks, admin-only email suppressions, mask import payload in replay - #914

Merged
fclairamb merged 17 commits into
mainfrom
security/scan-specs-2026-11-17
Nov 17, 2026
Merged

fclairamb merged 17 commits into
mainfrom
security/scan-specs-2026-11-17

Conversation

@fclairamb

@fclairamb fclairamb commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Fixes from the security scan of 2026-11-17 (findings AP1 to AP3). The three specs are implemented and archived in specs/done/2026/11/.

What changed

  • Telegram bot, membership and role (AP1, Medium). The bot checks on every update that the linked user still exists and is a joined member of the org. A removed member's chat now gets the "not linked" answer on /status, /incidents, /incident, /ack, /comment and the ack button. Viewers can still read, but /ack, /comment and the ack button refuse them, and they no longer see the button. The same rule is enforced in the incidents service (AcknowledgeIncidentFromTelegram, AddCommentFromTelegram).
  • Member removal cleans up (AP1). The new db.Service.RemoveOrganizationMember ends the membership and deletes that user's contacts and notification routes in that org only, in one transaction. All three ways a member is removed use it: member removal, org deletion and demo cleanup. The member.removed audit entry records contactsRemoved.
  • Email suppressions are admin only (AP2, Low). GET and DELETE /orgs/:org/email-suppressions need admin or owner. dash0 shows the suppression card only to admins, with a "permission denied" message on a 403. The wiki and the OpenAPI spec are updated.
  • Import payload is kept out of the session replay (AP3, Low). The check import textarea gets ph-no-capture, including for uploaded files. The require-secret-input lint rule now flags a Textarea named like payload, import or config that is not masked.
  • E2E fix: check-placement.spec.ts waits for the regions query before submitting, which removes a race that showed up on a slow server.

Breaking changes

  • user members can no longer list email suppressions or re-subscribe someone. Both now return 403 below admin, PATs included.
  • The Telegram write methods refuse anyone who is not a joined member with the user role or above.
  • Removing a member now deletes their contacts and routes in that org. Someone who rejoins has to link Telegram again.

Follow-ups

  • Slack, Discord and phone acks don't map the person to a SolidPing member, so they have no membership or role check. This is a separate gap, not fixed here.
  • On this Mac, checks-index-group-pagination.spec.ts:71 and check-placement.spec.ts:237 time out against a Docker Postgres under heavy load. They fail the same way on the base commit and pass on a native Postgres.

Decided by autopilot

  • 2026-11-17-07-email-suppressions-admin-only, "Should user members keep the re-subscribe action?": no, admin only, like the subscriber list (recommended answer).

🤖 Generated with Claude Code

fclairamb and others added 8 commits November 17, 2026 07:27
Removing a membership (member removal, org deletion, demo cleanup) now
soft-deletes the user's contacts and hard-deletes their notification
routes in that org, in the same transaction. The member.removed audit
entry records contactsRemoved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mment

AcknowledgeIncidentFromTelegram and AddCommentFromTelegram now require a
live user with a live, joined membership at role user or above, the same
floor as the web routes. They return ErrNotOrgMember / ErrRoleReadOnly
otherwise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A linked chat now counts only while its owner is a live user with a
live, joined membership in the contact's org; otherwise the bot answers
as for an unlinked chat. Viewers keep /status, /incidents and /incident
but /ack, the ack button and /comment answer a read-only message, and
viewers are not offered the Acknowledge button.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Avoids an extra organization_members read in RemoveOrganizationMember,
and adds the method to the notifications test mock.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed members and lets viewers acknowledge and comment

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

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.91525% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.74%. Comparing base (31e41f4) to head (f0a23e3).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
server/internal/db/postgres/postgres.go 91.66% 3 Missing ⚠️
server/internal/handlers/telegramcb/resolver.go 88.88% 3 Missing ⚠️
server/internal/db/sqlite/sqlite.go 94.44% 2 Missing ⚠️
server/internal/handlers/incidents/service.go 92.85% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main     #914    +/-   ##
========================================
  Coverage   90.74%   90.74%            
========================================
  Files        1372     1372            
  Lines      141395   141553   +158     
========================================
+ Hits       128311   128455   +144     
- Misses      13075    13089    +14     
  Partials        9        9            
Files with missing lines Coverage Δ
server/internal/app/server.go 92.13% <100.00%> (+<0.01%) ⬆️
server/internal/db/dbcontract/contract.go 100.00% <100.00%> (ø)
server/internal/db/dbcontract/notifications.go 100.00% <100.00%> (ø)
server/internal/handlers/members/service.go 90.67% <100.00%> (+0.03%) ⬆️
server/internal/handlers/telegramcb/callback.go 72.72% <100.00%> (+1.45%) ⬆️
server/internal/handlers/telegramcb/commands.go 82.93% <100.00%> (+0.24%) ⬆️
server/internal/handlers/telegramcb/comment.go 85.10% <100.00%> (+0.66%) ⬆️
server/internal/handlers/telegramcb/handler.go 81.92% <100.00%> (ø)
...ver/internal/integrations/telegram/incidentview.go 91.03% <100.00%> (+0.21%) ⬆️
server/internal/handlers/incidents/service.go 88.13% <92.85%> (+0.04%) ⬆️
... and 3 more

... and 22 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 and others added 8 commits November 17, 2026 07:47
…e to org admins

Viewers and user members now get 403 FORBIDDEN on GET and DELETE
/api/v1/orgs/:org/email-suppressions (security scan finding AP2).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ssions (third parties' addresses)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The import dialog's payload textarea takes Uptime Kuma backups, Gatus
configs and apply documents, which hold credentials. It now carries
data-secret-input (ph-no-capture), and require-secret-input flags a
Textarea named payload, import or config without it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…monitoring exports, credentials included, in the session replay

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…heck (batch gate)

check-form.tsx omits placement from a create while availableRegions is
still undefined, by design. The single-region E2E submitted as soon as the
name input was visible, so on a slow server it raced the regions query and
saw a body without placement. Wait for the regions response first; the
assertions are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fclairamb fclairamb added implemented Every spec of the PR is implemented and its batch gate was green automerge labels Nov 17, 2026
@fclairamb
fclairamb merged commit 55ffc4b into main Nov 17, 2026
39 checks passed
@fclairamb
fclairamb deleted the security/scan-specs-2026-11-17 branch November 17, 2026 12:31
fclairamb added a commit that referenced this pull request Nov 19, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.52.0](v0.51.0...v0.52.0)
(2026-11-19)


### Features

* **checks:** Pingdom TMS and Chrome Recorder import, named steps and
test runs, richer selectors and basic auth for JS browser checks
([#909](#909))
([1240c57](1240c57))
* **dash0:** switch the dashboard language with ?lang= on any URL
([#926](#926))
([c2640ae](c2640ae))
* **email:** maximum delivery delay, Date-header latency and
missed-probe detection
([#938](#938))
([8489326](8489326))
* **showcase:** cut the published video in any dashboard language
([#932](#932))
([d940da5](d940da5))
* **showcase:** take the dashboard stills in any dashboard language
([#925](#925))
([5104606](5104606))
* status updates in several languages, random first admin password,
Postgres Unix socket
([#939](#939))
([a69424f](a69424f))


### Bug Fixes

* **dash0:** chart dates follow the dashboard language
([#928](#928))
([eae2951](eae2951))
* **deps:** update github.com/dop251/goja digest to 0802ca1
([#920](#920))
([3524928](3524928))
* **deps:** update github.com/dop251/goja digest to 2eded47
([#911](#911))
([a8496d4](a8496d4))
* **deps:** update github.com/dop251/goja digest to 8dfece3
([#935](#935))
([98297e8](98297e8))
* **deps:** update go dependencies (non-major)
([#907](#907))
([41187dc](41187dc))
* **deps:** update go dependencies (non-major)
([#927](#927))
([fcef3fc](fcef3fc))
* **deps:** update go dependencies (non-major)
([#940](#940))
([0fd9228](0fd9228))
* **deps:** update module github.com/a2aproject/a2a-go/v2 to v2.9.0
([#922](#922))
([fe48c84](fe48c84))
* **deps:** update module github.com/posthog/posthog-go to v2
([#924](#924))
([eab03f2](eab03f2))
* **deps:** update module github.com/posthog/posthog-go to v2
([#929](#929))
([545e621](545e621))
* **deps:** update module github.com/posthog/posthog-go to v2
([#930](#930))
([82b03cc](82b03cc))
* **deps:** update module github.com/rabbitmq/amqp091-go to v1.17.0
([#916](#916))
([6974177](6974177))
* **deps:** update module
github.com/standard-webhooks/standard-webhooks/libraries to v1
([#931](#931))
([7b9d073](7b9d073))
* **deps:** update module golang.org/x/net to v0.63.0
([#923](#923))
([7d0fac9](7d0fac9))
* DMARC temperror cause, reaper regions, force-expanded group headers
([#934](#934))
([99f955d](99f955d))
* **i18n:** say "Check" instead of "Prüfung" in German
([#910](#910))
([696dcf8](696dcf8))
* **i18n:** translate generated incident, status-page and validation
text ([#913](#913))
([92bb05a](92bb05a))
* **security:** no paging contacts via impersonation/PAT, shared MCP
probe caps, browser WebSocket egress, analytics key replay
([#946](#946))
([8d51875](8d51875))
* **security:** per-org test-run slots, typed credentials of imported
transaction checks go to secrets
([#933](#933))
([51914b3](51914b3))
* **security:** Telegram bot membership and role checks, admin-only
email suppressions, mask import payload in replay
([#914](#914))
([55ffc4b](55ffc4b))
* Slack events after ack, region badge clicks, WHOIS deadline, legacy
agent warning, empty check groups
([#917](#917))
([65b00e2](65b00e2))

---
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

Labels

automerge autopilot implemented Every spec of the PR is implemented and its batch gate was green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant