Skip to content

fix(security): keep OIDC-group admin grants revocable, mask resolved channel references, contain browser popups - #976

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

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

Conversation

@fclairamb

@fclairamb fclairamb commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Fixes from the daily security scan of 2026-11-22 (HEAD 1121e2e): three findings, each specified then implemented.

What changed

  • AU1 (Medium): OIDC-group admin grants stay revocable. A member PATCH to the role the member already has now writes nothing, so role_source = 'oidc_group' survives and the next login without the group still demotes the admin. The DB layer only overwrites role_source when the role value actually changes. member.role_changed now records previous_role_source when a real change takes over a claim grant.
  • AU2 (Low): resolved channel references stay secret. Manifest apply masks every channel setting filled from a ${param:}/${env:} reference (and any key held only in private settings) in the plan diff. A reference under a key the channel type doesn't declare secret is refused with 400 invalid manifest (the error names keys, never values). Export never shows them. Docs: config-as-code.
  • AU3 (Low): browser popups can't escape the egress policy. Under an enforcing egress policy, window.open returns null, and any other new page in the session's browser context (e.g. a target=_blank click) is closed and fails the check ("the page opened a new window or tab…"). Applies to JS checks too (browser.open()). Docs: egress policy layer 6; the WebRTC flags on remote headless-shell are now documented as required.

Breaking changes

  • A manifest putting a ${param:}/${env:} reference under a public channel key (including webhook_url of Discord/Google Chat/Mattermost/MS Teams/Slack webhooks) now fails instead of storing the value in clear.
  • A browser/JS check that relies on opening a popup fails under an enforcing egress policy: navigate to the URL instead.

Operator action: remote headless-shell sidecars deployed before 79bdc82 should add --force-webrtc-ip-handling-policy=disable_non_proxied_udp.

Batch gate: make build-backend lint-back test and make build-docs green (one unrelated timing flake in checkjs TestMemoryBudgetChargesRegexpSymbolMethods, green on re-run).

Decided by autopilot

  • 2026-11-22-01-member-patch-keeps-oidc-role-source: should admins be refused from changing their own role? → No, the no-op fix is enough and keeps the ownership-transfer flow (recommended answer).

🤖 Generated with Claude Code

fclairamb and others added 8 commits November 22, 2026 07:25
A member PATCH re-sending the current role wrote role_source = NULL,
turning an OIDC org-admin group grant into a permanent local grant that
revokeOrgAdmin never demotes (security scan 2026-11-22, AU1).

- UpdateMember writes nothing when the role is unchanged.
- UpdateOrganizationMember overwrites role_source only when the role value
  changes (Postgres and SQLite).
- member.role_changed carries previous_role_source when a real change
  takes over a sourced role.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… an OIDC-group admin grant into a permanent local grant

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

A ${param:} / ${env:} reference in a channel setting is now refused unless
the channel type declares that key secret, so a resolved value can only land
in the encrypted private column. The plan diff also masks keys fed from a
reference and keys stored in the private settings.

Behaviour change: a reference under a public key (e.g. the webhook_url of a
Discord / Slack-webhook channel) now fails the apply with ErrInvalidManifest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…solved value of a reference in a non-secret channel setting

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

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.60440% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.87%. Comparing base (1121e2e) to head (7b5deaf).

Files with missing lines Patch % Lines
server/internal/handlers/manifestapply/channels.go 94.59% 2 Missing ⚠️
server/internal/checkers/checkbrowser/session.go 95.45% 1 Missing ⚠️
server/internal/handlers/members/service.go 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #976      +/-   ##
==========================================
- Coverage   90.88%   90.87%   -0.01%     
==========================================
  Files        1405     1405              
  Lines      145273   145346      +73     
==========================================
+ Hits       132030   132083      +53     
- Misses      13235    13255      +20     
  Partials        8        8              
Files with missing lines Coverage Δ
server/internal/checkers/checkbrowser/checker.go 68.75% <100.00%> (+0.24%) ⬆️
server/internal/db/dbcontract/identity.go 100.00% <100.00%> (ø)
server/internal/db/models/auth.go 100.00% <ø> (ø)
server/internal/db/postgres/postgres.go 95.21% <100.00%> (+<0.01%) ⬆️
server/internal/db/sqlite/sqlite.go 96.79% <100.00%> (+<0.01%) ⬆️
server/internal/handlers/manifestapply/export.go 92.85% <ø> (ø)
server/internal/checkers/checkbrowser/session.go 79.72% <95.45%> (+2.72%) ⬆️
server/internal/handlers/members/service.go 90.87% <92.85%> (+0.19%) ⬆️
server/internal/handlers/manifestapply/channels.go 87.02% <94.59%> (+2.32%) ⬆️

... and 17 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 5 commits November 22, 2026 07:45
A page opened with window.open or a target=_blank link is a separate CDP
target: it escaped the WebRTC removal script and the egress watch. Under an
enforcing policy the session now closes any foreign page target of its own
browser context as soon as it is created and is poisoned with a refusal
("the page opened a new window or tab"); a speculation-rules prerender is
closed without failing the check. The new-document script also makes
window.open return null, since its opener holds the popup's window before
the popup can be closed. Shared by the browser check and the JS runtime's
browser.open().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s the WebRTC removal script and the egress watch

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 autorelease labels Nov 22, 2026
@fclairamb
fclairamb enabled auto-merge (squash) November 22, 2026 07:17
@fclairamb
fclairamb merged commit 6e0f09e into main Nov 22, 2026
41 checks passed
@fclairamb
fclairamb deleted the security/scan-specs-2026-11-22 branch November 22, 2026 07:30
fclairamb added a commit that referenced this pull request Nov 22, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.53.0](v0.52.0...v0.53.0)
(2026-11-22)


### Features

* **auth:** OIDC-only mode with IdP group admin roles
([#966](#966))
([1b51f89](1b51f89))
* **service:** install writes config.env, unit loads it via
EnvironmentFile
([#948](#948))
([e4b7fc4](e4b7fc4))


### Bug Fixes

* **aggregation:** drain the raw backlog in one run and log lag
([#978](#978))
([26b93cd](26b93cd))
* **deps:** update github.com/dop251/goja digest to 79d6ad3
([#972](#972))
([02c6821](02c6821))
* **deps:** update go dependencies (non-major)
([#955](#955))
([7dfbcd6](7dfbcd6))
* **deps:** update go dependencies (non-major)
([#968](#968))
([6c09bae](6c09bae))
* **deps:** update go dependencies (non-major)
([#979](#979))
([ee088b6](ee088b6))
* **deps:** update module github.com/oapi-codegen/oapi-codegen/v2 to
v2.9.0 ([#975](#975))
([1121e2e](1121e2e))
* **deps:** update module go.mongodb.org/mongo-driver/v2 to v2.10.1
([#950](#950))
([9e684c4](9e684c4))
* email validation, OAuth error display, translator crash guard, clone
slugs, watchdog pauses
([#959](#959))
([a20f951](a20f951))
* log OAuth code-exchange failures, show a refused sign-in on the
invitation page
([#974](#974))
([c4a8dca](c4a8dca))
* retry SMTP 4xx, 503 on agent auth DB errors, scope checkGroupUid to
the org ([#973](#973))
([88179aa](88179aa))
* **security:** block WebRTC around the browser egress proxy, survive an
invalid status page ?lang=
([#957](#957))
([79bdc82](79bdc82))
* **security:** keep OIDC-group admin grants revocable, mask resolved
channel references, contain browser popups
([#976](#976))
([6e0f09e](6e0f09e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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