Repository navigation
feat: legal holds, session revocation, plugin governance, advisory intake - #760
Merged
Ayinkx merged 4 commits intoNov 24, 2026
Merged
Conversation
|
@Savvy-B19 is attempting to deploy a commit to the Ayinkx Team on Vercel. A member of the Team first needs to authorize it. |
|
@Savvy-B19 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Four governance and hardening features: scoped legal holds, session tracking with revoke-all, per-organization plugin governance, and a documented security advisory intake policy.
Closes #609
Closes #619
Closes #634
Closes #625
#609 — scoped legal holds
LegalHoldmodel withworkspace_id,scope(audit/workspace/all),reason, placing actor and timestamp, plus release metadata (actor, reason, timestamp).app/services/legal_hold.pyvalidates placement and release, requiresmanage_settings, and writeslegal_hold_placed/legal_hold_releasedaudit rows.app/services/audit_retention.pypurge_expired(an active audit-scoped hold blocks the purge, extending the existing boolean no-op rather than duplicating it), workspace deletion inapp/workspaces/routes.py, and user-data deletion inapp/services/data_deletion.py(returns409 conflict).GET/POST /workspaces/api/workspaces/<id>/legal-holdsandPOST .../<hold_id>/release, with structured400 invalid_input,403 forbidden,404 not_found.e9f8a7b6c5d4; docs indocs/audit-retention.md; tests intests/test_legal_hold.pycover hold blocks purge and deletion, release allows them, scoping, permissions and invalid input.#619 — session revocation for all devices
UserSessionmodel (opaque token id, user, timestamps, user agent, revocation actor and reason).app/services/user_sessions.pybinds a session on sign-in, validates it per request, and can revoke the current session or all of them, auditing actor, reason and count.app/auth/routes.pybinds on register, login and MFA, revokes on logout, and logs out cookies whose tracked row is missing or revoked on the next request.GET /auth/api/sessions,POST /auth/api/sessions/revoke-all, and adminPOST /admin/users/<user_id>/sessions/revoke-allwith a mandatory reason.a7e1c2d3b4f5; docsdocs/session-revocation.md; tests intests/test_session_revocation.pycover immediate self-revocation, admin revocation with its audit row,403for non-admins,400invalid input,404unknown user, and legacy sessions without a tracked id.#634 — per-organization plugin governance
OrganizationPluginPolicyandPluginApproval, keyed on the organization owner, following the repo's existing "workspace owner is the organization" model.app/services/plugin_governance.pysupportsallow,blockandrequire_approval, persists approvals, checks org-admin rights throughapp/services/organizations.py, and auditsplugin_policy_updated,plugin_install_approvedandplugin_install_blocked.app/plugins/routes.py(manifest, catalog, registered, marketplace). A blocked install is audited and committed before the refusal.GET/PUT /plugins/api/workspaces/<id>/plugins/policy,POST .../plugins/<plugin_id>/approve.b4e2f1a3c5d7; docsdocs/plugin-governance.md; tests intests/test_plugin_governance.pycover all three modes, audit rows, permission failures and invalid bodies.#625 — advisory intake and response targets
docs/security-advisory-intake.md: private intake channels, triage, severity table, acknowledgement and fix targets for critical and high reports, disclosure rules, what happens when a target is missed, and scope.SECURITY.mdand the README.tests/test_security_advisory_policy.pykeeps the page honest: it resolves the links, asserts the private channels and the exact targets, requires commitment-not-warranty language, and checks thatSECURITY.mddoes not overclaim calendar SLAs.Verification
Suites run:
test_legal_hold,test_session_revocation,test_plugin_governance,test_security_advisory_policy,test_audit_retention,test_data_deletion,test_docs_links,test_api_error_catalog, plus the migration head test.Limitations
bind_current_session(some plugin or SSO flows) is not tracked and therefore not revocable.UserSession.last_seen_atrecords sign-in time and is not refreshed per request, so it shows login time rather than true last activity.