Skip to content

Harden agent, briefing and OAuth consent guards - #36

Merged
ankurmans merged 3 commits into
mainfrom
security/agent-guard-gaps
Nov 1, 2026
Merged

ankurmans merged 3 commits into
mainfrom
security/agent-guard-gaps

Conversation

@ankurmans

Copy link
Copy Markdown
Owner

Three hardening changes, each with a regression test.

  • Briefings: the `briefing:` retry key is reserved for briefings, and an auto-send only sends the draft its own run wrote.
  • Segments: an API key or app can't change the rules of a segment a scheduled send or active automation uses; the owner does that in the dashboard.
  • OAuth consent: the consent page and action use the signed-in person's own account, not a team workspace.

…e run wrote

A drafts-level key could create a campaign under a briefing's retry key, and an auto-sending briefing then sent it to the whole list. create_campaign now refuses the briefing: prefix for anyone but a briefing, and settleSend keeps a draft that is not the run's own, or was edited since, as a draft.
…ive automation uses

update_segment is a draft-level action, but a scheduled campaign and an active automation resolve the segment's rules when they run, so changing them moved an approved audience. Through the API and MCP it now answers conflict while a scheduled send or active automation uses the segment; the owner changes it in the dashboard.
…eam workspace

A team seat of any role could answer a consent request with the owner's workspace selected, and saveConsentAccess then rewrote the owner's connected app level. The consent page and action now use the person's own account (getPersonalAccount).
@ankurmans
ankurmans merged commit 0c3d439 into main Nov 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant