Skip to content

Conversation

@ANISH-SR
Copy link
Contributor

@ANISH-SR ANISH-SR commented Jan 1, 2026

Summary of Changes

  • Enforced contributor identity across instructions to ensure contributor_account.key == link.contributor_pk where appropriate.
  • Preserved foundation/activator authority flows by introducing a payer_in_foundation guard:
    • Foundation-allowlisted payers bypass the contributor/link equality check in suspend, resume, and delete flows.
  • Prevents contributors from suspending, resuming, deleting, or closing links they do not own.
  • Establishes a consistent authorization invariant across all serviceability paths.
  • Still supports privileged foundation and activator workflows without breaking existing operational flows.

Testing Verification

  • Existing unit and integration tests passed after updates.

Closes #2213

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens authorization controls by enforcing contributor identity verification across link management operations (suspend, resume, delete, and close). The key security improvement ensures that only the link owner or foundation-allowlisted payers can perform these privileged operations.

  • Introduces payer_in_foundation guard to differentiate between foundation authority and contributor ownership
  • Adds verification that link.contributor_pk == contributor_account.key for non-foundation operations
  • Prevents unauthorized contributors from manipulating links they don't own

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
suspend.rs Added contributor identity verification for link suspension operations
resume.rs Added contributor identity verification for link resumption operations
delete.rs Added contributor identity verification for link deletion operations
closeaccount.rs Added contributor identity verification for link account closure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@juan-malbeclabs
Copy link
Contributor

@ANISH-SR Please, rebase to main

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ANISH-SR ANISH-SR force-pushed the feat/verification2 branch from d539866 to 52ef266 Compare January 9, 2026 16:26
@juan-malbeclabs juan-malbeclabs enabled auto-merge (squash) January 12, 2026 17:48
@juan-malbeclabs juan-malbeclabs merged commit fc5932f into malbeclabs:main Jan 14, 2026
25 of 28 checks passed
@ANISH-SR ANISH-SR deleted the feat/verification2 branch January 14, 2026 15:46
ANISH-SR added a commit to ANISH-SR/doublezero that referenced this pull request Jan 20, 2026
…#2539)

## Summary of Changes
* Enforced contributor identity across instructions to ensure
contributor_account.key == link.contributor_pk where appropriate.
* Preserved foundation/activator authority flows by introducing a
payer_in_foundation guard:
* Foundation-allowlisted payers bypass the contributor/link equality
check in suspend, resume, and delete flows.
* Prevents contributors from suspending, resuming, deleting, or closing
links they do not own.
* Establishes a consistent authorization invariant across all
serviceability paths.
* Still supports privileged foundation and activator workflows without
breaking existing operational flows.

## Testing Verification
* Existing unit and integration tests passed after updates.

Closes malbeclabs#2213
ANISH-SR added a commit to ANISH-SR/doublezero that referenced this pull request Jan 26, 2026
…#2539)

## Summary of Changes
* Enforced contributor identity across instructions to ensure
contributor_account.key == link.contributor_pk where appropriate.
* Preserved foundation/activator authority flows by introducing a
payer_in_foundation guard:
* Foundation-allowlisted payers bypass the contributor/link equality
check in suspend, resume, and delete flows.
* Prevents contributors from suspending, resuming, deleting, or closing
links they do not own.
* Establishes a consistent authorization invariant across all
serviceability paths.
* Still supports privileged foundation and activator workflows without
breaking existing operational flows.

## Testing Verification
* Existing unit and integration tests passed after updates.

Closes malbeclabs#2213
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify that contributor_account.key == link.contributor_pk in UpdateLink, SuspendLink, ResumeLink, DeleteLink, CloseAccountLink

2 participants