Skip to content

[Backend] JWT-protected admin dispute resolve/reject endpoints are not audit-logged #13

Closed

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

The API-key admin mutations (check-defaults, reindex, webhooks) attach auditLog, but the JWT-protected dispute endpoints POST /disputes/:disputeId/resolve and /disputes/:disputeId/reject in src/routes/adminRoutes.ts have no auditLog even though they change loan default status.

Acceptance criteria

  • Attach the auditLog middleware to the dispute resolve and reject routes
  • Ensure the acting admin identity (JWT publicKey) is recorded
  • Confirm sensitive fields stay redacted by the existing sanitizer
  • Add a test asserting an audit_logs row is written for a resolve action

Files to touch

  • src/routes/adminRoutes.ts
  • src/middleware/auditLog.ts
  • src/controllers/adminDisputeController.ts

Out of scope

  • Audit log retention policy
  • Audit log query UI

Activity

  1. added
    bugSomething isn't working
    enhancementNew feature or request
    GrantFox OSSIssue tracked in GrantFox OSS
    Maybe RewardedIssue may be eligible for a GrantFox reward
    on Jun 17, 2026
  2. Amarjeet325 commented on Jun 19, 2026

    @Amarjeet325

    Hi, maintainers 👋.
    I’d like to work on this issue.
    I’m a full-stack developer and smart contract expert; I have previously contributed to multiple open-source projects.

    Could you please assign this issue to me?

  3. samjay8 commented on Jun 20, 2026

    @samjay8

    Hello, maintainer, I have gone through this issue and I will like to help work on it, please can I handle it?
    ETA: 6 hours.

  4. Yerimahjr commented on Jun 21, 2026

    @Yerimahjr

    Hi maintainers, I'd like to work on this issue as well. I'm a full-stack developer with experience in Rust, TypeScript, and smart contract development, and I recently completed PR #25 on remitlend-frontend (merged — RFC 4180 CSV export). For this issue I'll attach the auditLog middleware to both the dispute resolve and reject routes in adminRoutes.ts, ensure the JWT publicKey of the acting admin is captured, verify the existing sanitizer redacts sensitive fields, and add a test asserting an audit_logs row is written on a resolve action.

  5. AbuJulaybeeb commented on Jun 21, 2026

    @AbuJulaybeeb

    Hi Maintainer, I have reviewed the description of the issue and would like to hop on this issue and deliver ETA

  6. grantfox-oss commented on Jun 21, 2026

    @grantfox-oss
    Author

    🦊 GrantFox — @AbuJulaybeeb has been assigned to this issue as part of the Official Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #13)
    2. Your PR will be reviewed by the LabsCrypt maintainers

    Good luck! Track your progress on GrantFox.

  7. grantfox-oss commented on Jun 29, 2026

    @grantfox-oss
    Author

    🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign campaign!

    @AbuJulaybeeb's PR #41 was approved and merged by @ogazboiz.

    🏆 @AbuJulaybeeb: You earned 45 FoxPoints for this contribution! Your current tier: Specialist (3,776 total points). Track your full progress on GrantFox.

    👏 Great work, @AbuJulaybeeb! Keep contributing to LabsCrypt.

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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignbugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions