Skip to content

milestones::release_issue has no test proving it requires the oracle's authorization #550

Closed

Description

@chonilius

Problem

Every milestones test that calls release_issue runs under env.mock_all_auths(), which authorises every address. No test uses targeted env.mock_auths(&[MockAuth { address: <oracle>, invoke: … fn_name: "release_issue" … }]) or checks that a call signed by a different address fails. (In contracts/milestones/src/test.rs, targeted mocks exist only for no function at all.) If the require_auth() call were deleted or pointed at the wrong address, the suite would still pass.

Suggested fix

Add a positive test that mocks only the oracle's auth for release_issue, and a negative test that mocks another address's auth and asserts the host auth error.

Related: #50

Activity

  1. added
    securitySecurity-related issue
    testingTesting/QA infrastructure
    Stellar WaveIssues in the Stellar wave program
    on Oct 13, 2026
  2. urielit1313-creator commented on Oct 13, 2026

    @urielit1313-creator

    I have submitted a targeted, clean fix in PR #588.

    Summary of Changes

    • Renamed the stub test to test_release_issue_requires_oracle_auth matching the actual contract authorization requirement (require_oracle(&env)?.require_auth()).
    • Added targeted negative authorization test asserting calls without authorization or signed by an unauthorized attacker fail host auth verification.
    • Added targeted positive authorization test proving that explicit oracle MockAuth passes.
    • Exported pub use contract::*; in contracts/milestones/src/lib.rs.
    • All 59 tests in mergefi-milestones pass with 0 warnings.

    Payout Address (Base USDC): 0xfE777c43e4B0A24fFA1527eD520d1E7f9ECED483

  3. Mikey-222 commented on Oct 20, 2026

    @Mikey-222
    Contributor

    @Mikey-222 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I am a full stack engineer capable of executing this task

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Mikey-222 to this issue.

  4. drips-wave commented on Oct 20, 2026

    @drips-wave

    Congratulations, @Mikey-222! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @Mikey-222: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  5. grantfox-oss commented on Oct 20, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @Mikey-222's PR #755 was approved and merged by @chonilius.

    🏆 @Mikey-222: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,259 total points). Track your full progress on GrantFox.

    👏 Great work, @Mikey-222! Keep contributing to MergeFi.

  6. drips-wave commented on Oct 20, 2026

    @drips-wave

    This issue has been completed by @Mikey-222 as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @Mikey-222: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programsecuritySecurity-related issuetestingTesting/QA infrastructure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions