feat(enrichment): commit-signature and verified-author provenance#1635
Closed
dale053 wants to merge 7 commits into
Closed
feat(enrichment): commit-signature and verified-author provenance#1635dale053 wants to merge 7 commits into
dale053 wants to merge 7 commits into
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review — held for maintainer review
⏸️ Held for maintainer review
Nits — 1 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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.
|
…thor Signed-off-by: dale053 <[email protected]>
…thor Signed-off-by: dale053 <[email protected]>
This was referenced Jun 29, 2026
JSONbored
reviewed
Jun 29, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
4 merge conflicts due to previous analyzer merges that touched the same files - please fix and resubmit. I recommend submitting analyzer PRs one at a time, to reduce the chances for future merge conflicts.
This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/1635/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
review-enrichment/test/enrichment.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CommitSignatureFindingtype andcommitSignaturekey toBriefFindingsinreview-enrichment/src/types.ts.review-enrichment/src/analyzers/commit-signature.ts: two-phase GitHub REST analysis of the PR head commit. Phase 1 fetchesGET /repos/{owner}/{repo}/commits/{headSha}and checkscommit.verification.verified; an unsigned or unverified commit produces akind: "unsigned"finding with theverification.reason(e.g."unsigned","gpgkeys_missing","no_user"). Phase 2 (verified commits only) fetches up to 20 recent repo commits to compute the verified-commit ratio; if ≥80%, fetchesGET /commits?author={login}&per_page=3— a never-before-seen author in that context produces akind: "new-committer"finding (supply-chain / impersonation signal). Bounded at 3 API calls per brief; fail-safe on any network error, non-ok response, missing token, or missing sha.src/brief.tsANALYZERS registry with abort-signal forwarding.### Commit-signature / verified-author provenanceblock insrc/render.ts; unsigned findings cite the abbreviated sha + reason; new-committer findings cite the sha + login with an impersonation-risk note.safeCodeSpanwraps all user-controlled values.node:testunit and integration tests covering every branch: missing token/sha, network failure (phases 1 and 2), non-ok responses for all three fetch calls, unsigned detection, null author login, insufficient history, below-threshold verified ratio, known committer, new-committer detection, render block (unsigned, new-committer with login, new-committer with null login), and orchestrator wiring. Total: 61 tests, all passing.Closes #1517. Parent: #1499.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥97% coverage of the lines AND branches you changed (aim for 98%+ on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
review-enrichment/, which is a standalone Node.js service outside the main Cloudflare Worker build and outside the Codecovsrc/**include path. The enrichment-service test suite (npm testinsidereview-enrichment/) runs 61 tests, all passing, including the 17 new commit-signature tests. The root-level CI checks above apply to the Worker and do not cover this service.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository. — N/A: no visible UI changes.UI Evidence
N/A — no visible UI, frontend, docs, or extension changes.
Notes
githubTokenfromEnrichRequestis forwarded only inAuthorization: Bearerheaders for GitHub API calls; it is never logged or included in any finding output.safeCodeSpanis used for all user-controlled strings in the render block (sha, reason, author login) — same convention as every other network-based analyzer in the service.