Skip to content

feat(enrichment): commit-signature / verified-author provenance analyzer - #1764

Closed
GildardoDev wants to merge 4 commits into
JSONbored:mainfrom
GildardoDev:feat/commit-signature-provenance-analyzer
Closed

feat(enrichment): commit-signature / verified-author provenance analyzer#1764
GildardoDev wants to merge 4 commits into
JSONbored:mainfrom
GildardoDev:feat/commit-signature-provenance-analyzer

Conversation

@GildardoDev

Copy link
Copy Markdown
Contributor

What

A new REES (review-enrichment service) analyzer that flags head-commit signature and author-provenance risks the no-checkout reviewer cannot derive: an unsigned or unverified-signature head commit, an author/committer login mismatch, and a never-before-seen committer whose login has no verified history in a repo that otherwise carries verified commits. These are supply-chain and impersonation signals.

Data source

GitHub REST. It reads commit.verification.{verified, reason} and the author/committer login from GET /repos/{owner}/{repo}/commits/{headSha}, and establishes the new-committer-vs-verified-history signal with at most two bounded GET /commits?per_page=30 queries (author-filtered, then repo-wide). The output is public-safe: only GitHub's verified boolean, its reason string, boolean provenance flags, and the public commit-author login GitHub already shows on the PR. No tokens, emails, local paths, or private signals.

Behavior

Additive and fail-safe: it never throws, and returns no finding on a missing token or head SHA, an unresolvable repo slug, or any fetch error. A clean verified head with a matching author and no new-committer signal produces no finding. It follows the established analyzer pattern entirely within review-enrichment/ (finding type in types.ts, a pure analyzer with injected fetch in analyzers/commit-signature.ts, registration in brief.ts, a public-safe block in render.ts), outside the engine scope.

Tests

12 node:test cases with a mocked fetch cover verified and unverified heads, the reason passthrough, the author/committer mismatch, the new-committer-vs-verified-history signal, the fail-safe paths (no token, bad slug, fetch error), and a public-safe render assertion (no token prefixes, no emails). Full suite: rees build clean, 167 of 167 tests pass.

Closes #1517

@GildardoDev
GildardoDev requested a review from JSONbored as a code owner June 29, 2026 20:29
@dosubot dosubot Bot added the size:L label Jun 29, 2026
@loopover-orb

loopover-orb Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-06-29 22:14:27 UTC

5 files · 1 AI reviewer · no blockers · readiness 55/100 · CI green · dirty

⏸️ Suggested Action - Manual Review

Review summary
The change adds a bounded GitHub-backed enrichment analyzer, wires it into the REES analyzer registry, and renders a public-safe provenance block. The fail-safe behavior, slug validation, token handling, and rendering sanitization are coherent in the visible code. The most notable implementation choice is that the history signal is intentionally shallow and best-effort, so it can miss cases but should not break existing brief generation.

Nits — 6 non-blocking
  • nit: `review-enrichment/src/analyzers/commit-signature.ts:113` names the signal `newCommitter` but computes history from `authorLogin`, so rename the field/comment or switch the lookup to `committerLogin` to keep the contract unambiguous.
  • nit: `review-enrichment/src/analyzers/commit-signature.ts:74` treats an empty author-filtered history page as definitive `false`; confirm that this is acceptable for private/fork/head-only commit visibility because the signal can become dependent on GitHub list-commits scope rather than prior repo history alone.
  • nit: `review-enrichment/test/commit-signature.test.ts:64` does not cover the verified-head/new-author case, which is the edge most likely to expose whether the history query should exclude the head commit or use author versus committer identity.
  • In `review-enrichment/src/analyzers/commit-signature.ts`, align `newCommitter` naming and type docs with the actual login used, or use `committerLogin` for the history query if the intended signal is truly committer provenance.
  • Add a focused test in `review-enrichment/test/commit-signature.test.ts` for a verified head where the actor has no verified history but the repo does, so the analyzer's intended provenance semantics are locked down.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #1517
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:L; 1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR; address the blocker before review.
Contributor workload ✅ 10/10 Author activity: 82 registered-repo PR(s), 52 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor GildardoDev; Gittensor profile; 82 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Fix the blocker.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added gittensor gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jun 29, 2026
…re-provenance-analyzer

# Conflicts:
#	review-enrichment/src/brief.ts
#	review-enrichment/src/render.ts
#	review-enrichment/src/types.ts
@GildardoDev
GildardoDev force-pushed the feat/commit-signature-provenance-analyzer branch from 8aa1214 to c4b7c2f Compare June 29, 2026 21:57

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another feat(enrichment) (REES analyzer) was merged before yours, so there are merge conflicts.

This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/1764/conflicts) or the command line to resolve conflicts before continuing.

review-enrichment/src/brief.ts
review-enrichment/src/render.ts
review-enrichment/src/types.ts

I'd really recommend being careful submitting these, I wouldn't open a PR until you see no other PRs for this are open/awaiting review, as they all touch the same files and as such, bring a very high likelihood for merge conflicts.

Closing.

@JSONbored JSONbored closed this Jun 29, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

feat(enrichment): Commit-signature / verified-author provenance

2 participants