Skip to content

[BUG] Goal progress can be arbitrarily modified through the PATCH endpoint without verification against actual GitHub activity #1753

@Ridanshi

Description

@Ridanshi

Bug Summary

The goal update endpoint allows clients to directly modify goal progress values.

Progress updates are accepted without validating that the reported activity actually occurred on GitHub.

Describe the bug

The PATCH endpoint accepts a client-supplied current value and stores it after basic validation.

The endpoint verifies:

  • value type
  • non-negative values
  • current <= target

However, it does not verify whether the submitted progress corresponds to actual GitHub activity.

Users can therefore mark goals as completed without performing the underlying work.

To Reproduce

  1. Create a goal with a target value.
  2. Submit a PATCH request containing:

{
"current": target
}

  1. Observe that the goal becomes complete.
  2. Verify that no GitHub activity was required.

Expected behavior

Goal progress should be derived from verified activity sources.

Client requests should not be able to arbitrarily mark goals as completed.

Actual behavior

Progress values are accepted directly from the client.

Additional context

Affected file:

src/app/api/goals/[id]/route.ts

Potential impact:

  • inaccurate achievement tracking
  • misleading progress reporting
  • inconsistent goal completion state
  • reduced trust in activity metrics

This issue primarily affects goal integrity rather than GitHub contribution statistics themselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions