Repository navigation
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1744 +/- ##
==========================================
+ Coverage 86.84% 86.97% +0.13%
==========================================
Files 113 113
Lines 6453 6472 +19
Branches 1253 1255 +2
==========================================
+ Hits 5604 5629 +25
+ Misses 543 537 -6
Partials 306 306 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Reminder to self: check whether the |
Fixes CodeQL alerts
Makes its purpose more obvious to plugin developers
dcoric
left a comment
There was a problem hiding this comment.
Core changes look good and I verified them locally (build, unit, e2e, and a live clone through the proxy with both sample plugins loaded). One blocking issue in the sample plugin and two optional notes.
Blocking: want-set cache can be poisoned to skip scanning (extractPullData/fetchWanted.ts, roundKey / rememberRecentFetch)
roundKey is url|wants and onChainSuccess records the key for every allowed fetch, but pullSecretScanner only diffs base..want. Repro:
- POST a fetch with
want X+have X. Diff is empty, scan passes, keyurl|Xis cached. - Any later
git cloneof X (base = empty tree) hits the cache, skips checkout and scan, and receives X unscanned.
Reproduced locally against trufflesecurity/test_keys: the poisoned clone delivered the AWS key. Repeating step 1 refreshes the 5 min TTL, and the victim's want set is discoverable via ls-refs.
Suggested fix: only remember a round when it was a full-tree scan, e.g. in rememberRecentFetch return early unless pullData.base === EMPTY_COMMIT_HASH. A full-tree pass is a superset of any incremental scan, so a cache hit is then always safe. Alternatively include the haves in the key.
Optional:
fetchWanted.tstreats a fetch with onlywant-reflines (nowant) as "client up to date" and passes it unscanned. Harmless against GitHub (no ref-in-want), but exploitable against upstreams withuploadpack.allowRefInWant.- README.md / plugins.mdx suggest
GIT_SSL_NO_VERIFYas a fallback for self-signed upstreams. For a security sample I would drop that and only mention configuring the CA.
Description
Refactors the pull chain to actually decode pull data, and store it temporarily in
.remote:wantsandhavescommit hashes, stores in theAction.remote, which can be accessed by plugins/other processorsclearBareCloneclearBareCloneexecution logic to simplify bothchain.tsandclearBareCloneitselfRelated Issue
Based on the following PR that revamps the plugin system: #1683
Checklist
General
Documentation
Tests
npm test)npm run lintandnpm run format:check)npm run check-types)