This repository was archived by the owner on May 29, 2026. It is now read-only.
fix(security): membership authz, tally bounds, public-state filtering, workflow default-deny, published-only ORI#330
Merged
Conversation
…, workflow default-deny, published-only ORI Closes #300 castVote now verifies caller's participant is a member of the meeting that owns the voting round before accepting the vote. Closes #302 saveShowOfHandsTally validates submitted counts against active participant count; rejects tallies that exceed meeting membership. Closes #303 getPublicState returns null (404) for secret rounds and for rounds whose lifecycle is not 'published', preventing anonymous projection display of draft or secret ballots. Closes #313 WorkflowService::isTransitionAllowed evaluates domain allow-flags (allowPause / allowAdjourn) before the chairOnlyTransitions list so domain restrictions cannot be short-circuited by a chair-only match. Closes #314 getDomainWorkflow falls back to RESTRICTED_WORKFLOW (quorum enforced, no pause, no adjourn) for unrecognized domains instead of the permissive 'operations' config. Closes #315 AgendaService::publishAgenda and reviseAgenda now read the full meeting object before saveObject to prevent partial updates from wiping required fields. Closes #316 OriController::index and ::show filter to lifecycle=='published' so anonymous ORI callers never see draft or unpublished objects. Closes #317 MotionService::transitionLifecycle rejects empty actorId to prevent unauthenticated DI-path callers from bypassing controller auth guards.
This was referenced May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 7 security/correctness issues found in the quality-loop review.
castVotenow verifies the caller's resolved participant is a member of the meeting that owns the voting round before accepting a vote. Prevents any authenticated user from casting a vote on any open round.saveShowOfHandsTallyvalidates chair-submitted counts against the count of active participants in the meeting. Rejects tallies that exceed membership size.getPublicStatereturnsnull(→ 404) forisSecret==truerounds and for rounds whoselifecycleis not'published'. Anonymous projection callers can no longer see draft or secret ballot data.WorkflowService::isTransitionAllowedevaluates domainallowPause/allowAdjournflags before thechairOnlyTransitionslist so domain restrictions cannot be short-circuited by a chair-only match.getDomainWorkflowfalls back to a newRESTRICTED_WORKFLOWconstant (quorum enforced, no pause, no adjourn) for unrecognized domains instead of the permissiveoperationsconfig.AgendaService::publishAgendaandreviseAgendanow read the full meeting object before callingsaveObject, preventing a partial-payload update from wiping required fields.OriController::indexfilters tolifecycle=='published'via the OR query;::showadditionally checks the fetched object and returns 404 for non-published objects.MotionService::transitionLifecyclerejects an emptyactorIdto prevent unauthenticated DI-path callers from bypassing the controller's chair guard.Test plan
testPublishAgendaNotifiesOnlyActiveParticipantsupdated to stub the newfind()call for the full meeting objectcomposer test(unit suite — VotingServiceTest is skipped per issue Broken: 21 unit tests fail due to ObjectService stub/real-signature mismatch #90)GET /api/ori/v1/eventsreturns only published meetingsGET /api/ori/v1/voteevents/<draft-id>returns 404publicStateon a secret or non-published round returns 404castVotewith a participant not in the meeting returns 403saveShowOfHandsTallywith counts > participant count returns 400