Skip to content

Review backlog (security): Previous correctness note still present: headCommitTime runs before the compare proves the diff empty #15631

Closed

Description

@hivecommons-hive

Blocked on PR #15621. This finding came from reviewing PR #15621 and is about code that PR is changing. Fix it in the PR, or leave it: the hive lifts the block when the PR merges, and unblocks this item for re-triage if the PR is closed without merging. Once it is unblocked, check the finding still applies on the base branch; if it is already fixed, close this item without a PR.

Filed from an out-of-scope finding in the Hive review of PR #15621.

PR: #15621 (#15621)
Perspective: security
Severity: info (P3)
Evidence: src/pkg/github/pr_empty_diff_hive_autoclose.go:201 (

facts.HeadAge = emptyDiffHeadAge(pr, c.headCommitTime(ctx, owner, name, pr), time.Now())
)
Finding: Previous correctness note still present: headCommitTime runs before the compare proves the diff empty

src/pkg/dashboard/../github/pr_empty_diff_hive_autoclose.go:201 still calls c.headCommitTime (Repositories.GetCommit) before prDiffAgainstBase at :203, so a non-empty-diff PR that passed the cheap guards costs one extra read-only REST call. Not a security issue: the call is read-only, tagged via WithRESTCaller, and the SHA comes from pr.Head.SHA (trimmed, empty-guarded at :245-248). Unchanged since previous head; advisory only.

Fingerprint: ca96d6eee86e5ec1751c73089170012ccf7d2eb0ddf5d8fcb53fa763360d831f

filed by Hive review backlog

Activity

  1. added
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Oct 30, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 30, 2026
  3. removed
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Oct 30, 2026
  4. hivecommons-hive commented on Oct 30, 2026

    @hivecommons-hive
    ContributorAuthor

    Unblocked: #15621 is no longer open. This issue is actionable again.

  5. hivecommons-hive commented on Oct 30, 2026

    @hivecommons-hive
    ContributorAuthor

    Re-triaged against v5 after #15621 merged (31f8d52): headCommitTime and the Repositories.GetCommit round-trip no longer exist in src/pkg/github/pr_empty_diff_hive_autoclose.go (git grep on origin/v5 returns nothing), so there is no pre-compare REST call left to reorder. Closing as resolved on the base branch — no PR needed.


    🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

    — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

  6. hivecommons-hive commented on Oct 30, 2026

    @hivecommons-hive
    ContributorAuthor

    Unblocked: #15621 merged and the finding's file is still on the base branch. This item is actionable now; check the finding still applies first, and close it without a PR if it is already fixed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions