Skip to content

collect recent commit hashes to find nearest ancestor branch - #2903

Draft
refoo0 wants to merge 1 commit into
mainfrom
track-recent-commit-hashes
Draft

collect recent commit hashes to find nearest ancestor branch#2903
refoo0 wants to merge 1 commit into
mainfrom
track-recent-commit-hashes

Conversation

@refoo0

@refoo0 refoo0 commented Aug 21, 2026

Copy link
Copy Markdown
Member

Closes #2796

Done

  • Scanner CLI collects recent commit hashes and sends them via the X-Recent-Commit-Hashes header.
  • API stores the hashes in AssetVersion.RecentCommitHashes (jsonb).
  • New repository method GetNearestAncestorAssetVersion finds the nearest ancestor AssetVersion via SQL based on shared commits.
  • Added migration for the new column.

Open

  • GetNearestAncestorAssetVersion isn't wired up yet: scan_service.go still diffs against all other AssetVersions instead of just the real ancestor.
  • Fallback behavior when no common commit is found is not yet defined.
  • Tests for the new ancestor lookup are still missing.

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Init vulns from nearest git ancestor branch, not latest event

1 participant