Skip to content

Fee-recipient compromise adversarial test scenario #87

Description

@nanaf6203-bit

Problem Statement
The contract's admin can change FeeRecipient to any address. If an
attacker compromises the admin key, they can route every future tip's
fee to themselves. The current test suite asserts happy-path
set_fee_recipient but does not model the post-compromise runbook.

Why it matters
A compromised admin key is the highest-impact attack on a tip jar of
this shape. Without an explicit test that exercises the recovery
sequence, the runbook documented in #115 cannot be validated.

Technical Context

  • set_fee_recipient(caller, fee_recipient) is admin-gated.
  • Recovery: pause \u2192 rotate admin \u2192 change fee recipient \u2192 unpause.

Expected Outcome
A test test_fee_recipient_compromise_response_runbook that:

  • Sets up a normal-creator scenario with active tips.
  • Asserts unauthorized set_fee_recipient panics with #71.
  • Verifies the recovery sequence: pause by current admin, change
    fee_recipient back to a safe address, verify future tips route
    correctly.

Acceptance Criteria

  • Test asserts unauthorized set_fee_recipient panics with #71.
  • Test asserts that after a fee-recipient change, the next tip
    routes the fee correctly.
  • Cross-linked from docs/ADMIN_RUNBOOK.md.

Files/Modules Likely Affected

  • src/test.rs
  • docs/ADMIN_RUNBOOK.md \u2014 add reference

Difficulty Medium. Estimated Effort S.

Labels
area:security, area:testing,
area:admin, priority:high


E. Testing — Unit / Integration


Imported from docs/open-issues-draft.md as draft issue #27 (commit 7becd4b). Original draft-order cross-references in this body have been remapped to current GitHub issue numbers at import time.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26area:adminImported from open-issues-draft.mdarea:securityImported from open-issues-draft.mdarea:testingImported from open-issues-draft.mdpriority:highImported from open-issues-draft.md

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions