Repository navigation
fix(pnpr): validate and key forwarded catalogs - #13632
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe resolver now includes catalogs in resolution cache keys and validates catalog values for off-allowlist fetch targets and inline URL credentials. SSH transport usernames remain valid without passwords. Tests cover these behaviors. ChangesCatalog resolution and validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; current code fixes both previously reported SSH username rejection paths while retaining rejection of password-bearing URL userinfo. Reviews (4): Last reviewed commit: "fix(pnpr): match ssh schemes case-insens..." | Re-trigger Greptile |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13632 +/- ##
==========================================
+ Coverage 88.19% 88.20% +0.01%
==========================================
Files 615 616 +1
Lines 99955 100084 +129
==========================================
+ Hits 88157 88283 +126
- Misses 11798 11801 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6827387307,
"stddev": 0.20054900621834287,
"median": 2.6469650836000005,
"user": 2.5064416599999992,
"system": 1.8836723,
"min": 2.4802073041000003,
"max": 3.1367447581000003,
"times": [
2.5100636121,
2.7762773251,
2.4802073041000003,
2.5471934091,
2.7217341371000003,
2.5288564311000004,
2.5721960301,
2.7403967971000003,
2.8137175031000004,
3.1367447581000003
]
},
{
"command": "pacquet@main",
"mean": 2.9221497719,
"stddev": 0.1233336765830386,
"median": 2.8842514906000005,
"user": 3.0300595599999998,
"system": 2.2536546999999993,
"min": 2.7589508641,
"max": 3.1422472301,
"times": [
2.8910381031000005,
2.9476589561,
2.8774648781000005,
2.8219368451,
2.7589508641,
3.0385785671,
2.8223361261,
3.0647681571,
3.1422472301,
2.8565179921
]
},
{
"command": "pnpr@HEAD",
"mean": 1.7941300967,
"stddev": 0.12667803483689705,
"median": 1.7446045226,
"user": 1.7930782599999997,
"system": 1.9117553999999999,
"min": 1.6338731921,
"max": 1.9912639361,
"times": [
1.9247123541000002,
1.9129134751,
1.7042658471,
1.7448592571000001,
1.9089842861000001,
1.6837122120999999,
1.9912639361,
1.6338731921,
1.6923666191000002,
1.7443497881
]
},
{
"command": "pnpr@main",
"mean": 1.6161194774000003,
"stddev": 0.13364144938150935,
"median": 1.5432487161000001,
"user": 1.6457889600000002,
"system": 1.6651078,
"min": 1.4519547671,
"max": 1.8312102531,
"times": [
1.8312102531,
1.5476557691000001,
1.8047563081,
1.5274424661,
1.5287868271,
1.7457896491,
1.5297246331,
1.4519547671,
1.6550324381,
1.5388416631000001
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.35370537774000005,
"stddev": 0.022193487626017284,
"median": 0.35526853004000003,
"user": 0.3122580999999999,
"system": 0.65433948,
"min": 0.31323383954000006,
"max": 0.38439618654,
"times": [
0.35340254654000003,
0.35713451354000003,
0.37937372954000004,
0.33989012354000003,
0.36919260854,
0.36003459454000003,
0.38439618654,
0.31323383954000006,
0.35336385354000005,
0.32703178154
]
},
{
"command": "pacquet@main",
"mean": 0.36715010284000005,
"stddev": 0.022440273094287096,
"median": 0.36254264154000004,
"user": 0.3081607,
"system": 0.69484648,
"min": 0.33716234654000005,
"max": 0.40748861954000004,
"times": [
0.33716234654000005,
0.40748861954000004,
0.39391432954000005,
0.36271776654000004,
0.35145451954,
0.35791920054000004,
0.38121721054,
0.37554353754,
0.36236751654000005,
0.34171598154000005
]
},
{
"command": "pnpr@HEAD",
"mean": 0.36608565554000005,
"stddev": 0.03160232451649466,
"median": 0.35987411754000004,
"user": 0.2975701999999999,
"system": 0.6648675799999999,
"min": 0.31817355154000004,
"max": 0.41157295954000006,
"times": [
0.41157295954000006,
0.40546156254000004,
0.31817355154000004,
0.35875383254000004,
0.35664118454000004,
0.33655565454,
0.37310776054000006,
0.33852907054000003,
0.36099440254000004,
0.40106657654000005
]
},
{
"command": "pnpr@main",
"mean": 0.37852347554000004,
"stddev": 0.02294372689894701,
"median": 0.36987803404,
"user": 0.3190357,
"system": 0.6731806800000001,
"min": 0.35122320254000006,
"max": 0.42622967754,
"times": [
0.39911243754000003,
0.42622967754,
0.37999300554000004,
0.37167048454,
0.36808558354000004,
0.36013765954000004,
0.35122320254000006,
0.39881044854000003,
0.36194903954,
0.36802321654000003
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.9481157922000003,
"stddev": 0.04283370350779932,
"median": 2.9551253413000005,
"user": 2.4100683399999996,
"system": 1.9185402599999999,
"min": 2.8728597188000005,
"max": 3.0100049258,
"times": [
2.9635948728000003,
3.0100049258,
2.8728597188000005,
2.9265247148,
2.9466558098,
2.9006790798,
2.9869527458000005,
2.9672336558000003,
2.9206723648,
2.9859800338
]
},
{
"command": "pacquet@main",
"mean": 2.9507559956000002,
"stddev": 0.06934479886834426,
"median": 2.9391235268000004,
"user": 2.48062454,
"system": 1.9885914599999999,
"min": 2.8672176348000002,
"max": 3.1111356198,
"times": [
2.9049955468000004,
2.9206129028000003,
2.8903134828000003,
3.1111356198,
2.8672176348000002,
2.9688798248,
2.9930304578,
2.9762725048000003,
2.9174678308,
2.9576341508
]
},
{
"command": "pnpr@HEAD",
"mean": 1.7174140198,
"stddev": 0.13964194401683447,
"median": 1.7194218138,
"user": 1.56224504,
"system": 1.7143319599999998,
"min": 1.5625493668000001,
"max": 1.9601176508,
"times": [
1.5625493668000001,
1.7615500468,
1.8191102978,
1.5803948578,
1.8179974418,
1.5906082598,
1.8312567578,
1.9601176508,
1.5732619378000001,
1.6772935808
]
},
{
"command": "pnpr@main",
"mean": 1.8053738043999998,
"stddev": 0.18600580771669817,
"median": 1.7402000473,
"user": 1.77748724,
"system": 1.92723016,
"min": 1.5868345238000001,
"max": 2.2373227118,
"times": [
1.6876926518000002,
1.5868345238000001,
1.8738895918,
1.7555351518,
2.2373227118,
1.9583936548,
1.6692271008,
1.7248649428,
1.7238838518,
1.8360938628
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.53968550692,
"stddev": 0.050302165199859014,
"median": 0.5367156417200001,
"user": 0.7318313799999999,
"system": 0.8343469000000001,
"min": 0.44862652222,
"max": 0.64823138422,
"times": [
0.64823138422,
0.56041989822,
0.5585743032200001,
0.5412458922200001,
0.5527353772200001,
0.5069797962200001,
0.51628327622,
0.5321853912200001,
0.44862652222,
0.5315732282200001
]
},
{
"command": "pacquet@main",
"mean": 0.48164205342,
"stddev": 0.02696382627735837,
"median": 0.47401303722,
"user": 0.6393870799999999,
"system": 0.7426742999999999,
"min": 0.45329068522,
"max": 0.5369661332200001,
"times": [
0.50252387622,
0.45329068522,
0.45601000622,
0.46926278222,
0.5369661332200001,
0.47876329222,
0.46581080222,
0.50625328822,
0.48866960622,
0.45887006222
]
},
{
"command": "pnpr@HEAD",
"mean": 0.34217164292,
"stddev": 0.021436430497704124,
"median": 0.33515541222,
"user": 0.23751018,
"system": 0.5791702999999999,
"min": 0.32021506422,
"max": 0.38553213122,
"times": [
0.33870515222,
0.32477293622,
0.32021506422,
0.33749261822,
0.33184080622,
0.33184421322,
0.33281820622,
0.34262254922,
0.37587275222,
0.38553213122
]
},
{
"command": "pnpr@main",
"mean": 0.42581793341999996,
"stddev": 0.05260126373876778,
"median": 0.42045830522000005,
"user": 0.33078418,
"system": 0.6921733999999999,
"min": 0.35123265122,
"max": 0.5240565842200001,
"times": [
0.40909206722,
0.40010207822,
0.43538437722,
0.40079621322000003,
0.35123265122,
0.36346967622,
0.43182454322,
0.47240398722,
0.46981715622000003,
0.5240565842200001
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8285577970000002,
"stddev": 0.04077581791678436,
"median": 1.8306768297,
"user": 0.9422708999999999,
"system": 0.8414622599999999,
"min": 1.7747863062,
"max": 1.8858215932,
"times": [
1.7747863062,
1.7759416051999999,
1.8111664832,
1.8858215932,
1.8689916252,
1.8541377382,
1.7891299572000001,
1.8134149672,
1.8642490022,
1.8479386922
]
},
{
"command": "pacquet@main",
"mean": 1.8844894388,
"stddev": 0.10463465370182995,
"median": 1.8269396907000002,
"user": 1.0578119,
"system": 0.9399712600000001,
"min": 1.7934048792000001,
"max": 2.0711189082,
"times": [
2.0356547412,
2.0711189082,
1.9904448792,
1.8250015402000002,
1.8237733972,
1.8153911902000002,
1.8453366012,
1.8158904102000002,
1.8288778412000002,
1.7934048792000001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.3454373931,
"stddev": 0.0147734417575373,
"median": 0.3452563742,
"user": 0.22098900000000002,
"system": 0.5995751599999999,
"min": 0.3187590022,
"max": 0.3725809042,
"times": [
0.3392191272,
0.3368999102,
0.3187590022,
0.3337197502,
0.3423954702,
0.3546500912,
0.3570514252,
0.3509809722,
0.3481172782,
0.3725809042
]
},
{
"command": "pnpr@main",
"mean": 0.3545583011999999,
"stddev": 0.012069228404430522,
"median": 0.3556382482,
"user": 0.24444239999999998,
"system": 0.59178776,
"min": 0.3362476312,
"max": 0.3705119372,
"times": [
0.3705119372,
0.3511569722,
0.3367158442,
0.3362476312,
0.3660888072,
0.3610902022,
0.3472970922,
0.3509040162,
0.3654509852,
0.3601195242
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2430249053745455,
"stddev": 0.021219431578739293,
"median": 0.23350393192000002,
"user": 0.2047937581818182,
"system": 0.07456252363636363,
"min": 0.21634032392000002,
"max": 0.28036511392,
"times": [
0.26567759192,
0.22268394992000004,
0.22788163592000002,
0.24940403992000004,
0.22805167592000003,
0.23350393192000002,
0.21634032392000002,
0.23172748392000003,
0.27017653192,
0.24746167992000004,
0.28036511392
]
},
{
"command": "pacquet@main",
"mean": 0.26664939012000005,
"stddev": 0.03751019601603843,
"median": 0.25678943492000006,
"user": 0.24333473999999997,
"system": 0.08841335999999997,
"min": 0.22317023492000002,
"max": 0.35163652292,
"times": [
0.29010670492,
0.25643770692,
0.23554163192000002,
0.22317023492000002,
0.26550551792000004,
0.25714116292000005,
0.25171056692000005,
0.29600230592000004,
0.35163652292,
0.23924154592000002
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09651708050620687,
"stddev": 0.005838919064255892,
"median": 0.09669803792000001,
"user": 0.02385666413793103,
"system": 0.014593045517241377,
"min": 0.08875280292,
"max": 0.11068886792,
"times": [
0.09789813992,
0.09467583592,
0.09662008092,
0.10094087392000001,
0.09669803792000001,
0.08875280292,
0.09772547392,
0.10060386992,
0.09067842292,
0.09159543092,
0.09330439192000001,
0.09826891892,
0.11068886792,
0.09870948792,
0.09670389892,
0.08988969592,
0.08910651892,
0.10613900192,
0.09967743292,
0.09201534192000001,
0.10417763492000001,
0.10868665292,
0.09407094492000001,
0.08969315592,
0.09814578692,
0.08918626992,
0.09888963892000001,
0.09374990092,
0.09170282292000001
]
},
{
"command": "pnpr@main",
"mean": 0.09806334927483869,
"stddev": 0.010160426222869551,
"median": 0.09439761192,
"user": 0.026027262580645156,
"system": 0.013770030967741934,
"min": 0.08889028192000001,
"max": 0.13017743792000003,
"times": [
0.09195226392,
0.09130566392,
0.09085861192,
0.09039800392000001,
0.08889028192000001,
0.09362529692,
0.08939683792,
0.09238619192,
0.09380390392,
0.10009919892000001,
0.12212387992000001,
0.09463843592,
0.08984691392000001,
0.10416672392000001,
0.09835251592000001,
0.09779580692,
0.13017743792000003,
0.11054334292000001,
0.09802478892000001,
0.10217858792000001,
0.10941124892000001,
0.09439761192,
0.09068860092,
0.11825950692000001,
0.09717133992,
0.09337754892000001,
0.09151128192,
0.09073483892,
0.09605493592,
0.09585662192000001,
0.09193560192
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.1737107901000001,
"stddev": 0.5412018365458254,
"median": 0.8912244921,
"user": 1.1285799755555557,
"system": 0.22276843333333332,
"min": 0.7550499221,
"max": 2.0992132731,
"times": [
1.6959768021,
0.8912244921,
2.0992132731,
0.7795657291,
1.8413756761,
0.9093137361,
0.7627007321,
0.7550499221,
0.8289767481
]
},
{
"command": "pacquet@main",
"mean": 1.2290492082111113,
"stddev": 0.4464993111475574,
"median": 1.1474966881,
"user": 1.1807001977777776,
"system": 0.24499154444444443,
"min": 0.8245150481,
"max": 2.1895800751000003,
"times": [
1.6001376650999999,
1.3509213571,
2.1895800751000003,
1.1474966881,
1.2733776661,
0.9562122591000001,
0.8559621091,
0.8245150481,
0.8632400061000001
]
},
{
"command": "pnpm@HEAD",
"mean": 3.4592280039888887,
"stddev": 0.3377001574915721,
"median": 3.3399687731000003,
"user": 5.290467420000001,
"system": 0.29307610000000006,
"min": 3.0363305451000002,
"max": 4.0469666281,
"times": [
4.0469666281,
3.6624616811000004,
3.3388423791000004,
3.6080663371000004,
3.1604824111000003,
3.7912145311,
3.3399687731000003,
3.1487187501,
3.0363305451000002
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.6829311287,
"stddev": 0.1932965039016112,
"median": 4.6919187646000005,
"user": 1.98965988,
"system": 1.5385299399999999,
"min": 4.4723256171,
"max": 4.9344650091,
"times": [
4.4985767871,
4.4818296431,
4.6271718301,
4.7566656991,
4.4723256171,
4.4769609101,
4.8871167001,
4.9344650091,
4.7852301771,
4.9089689141
]
},
{
"command": "pacquet@main",
"mean": 4.601734856399999,
"stddev": 0.1213751349039427,
"median": 4.5677559380999995,
"user": 2.1335077800000004,
"system": 1.6397227400000003,
"min": 4.482504030099999,
"max": 4.8194543191,
"times": [
4.6188317271,
4.4825275841,
4.5313136101,
4.482504030099999,
4.8194543191,
4.8038868081,
4.5146855921,
4.5637499131,
4.6286330171,
4.5717619631
]
},
{
"command": "pnpr@HEAD",
"mean": 3.6379388623999995,
"stddev": 0.1431017997731368,
"median": 3.5805326630999996,
"user": 1.6117570799999998,
"system": 1.5692032400000002,
"min": 3.5095272930999997,
"max": 3.9830478500999997,
"times": [
3.5538825670999996,
3.7479495971,
3.6664180341,
3.6818904001,
3.9830478500999997,
3.5754553341,
3.5450902640999997,
3.5305172921,
3.5095272930999997,
3.5856099920999998
]
},
{
"command": "pnpr@main",
"mean": 3.6029293512000002,
"stddev": 0.08600854838242052,
"median": 3.5862846431,
"user": 1.31342818,
"system": 1.38217894,
"min": 3.5005643590999997,
"max": 3.7810607701,
"times": [
3.6089610500999996,
3.7014806820999997,
3.6179396721,
3.5636082361,
3.6315824821,
3.5005643590999997,
3.5228217651,
3.5590181200999997,
3.5422563751,
3.7810607701
]
}
]
} |
24ae5e5 to
6c176a2
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Code Review by Qodo
1. Redundant url_has_inline_credentials comment
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
An ssh remote's bare login username (git+ssh://git@host/...) is transport addressing with no secret — the same login the scp form git@host:path spells, which the inline-credential gate already accepts. Reject only a user:pass@ userinfo on ssh schemes; non-ssh schemes keep rejecting any userinfo. The off-allowlist gate still decides whether the host may be fetched at all. Also adds the trailing comma dylint requires in the catalog cache-key test. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Code review by qodo was updated up to the latest commit 33e5414 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
URL schemes are case-insensitive (RFC 3986), so GIT+SSH://git@host/... must get the same bare-username allowance as the lowercase spelling. A user:pass@ userinfo is still rejected on every casing. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Code review by qodo was updated up to the latest commit 4b6b0b6 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
| Project | pnpm's project |
| Branch | pr/13632 |
| Testbed | pnpr |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,562.55 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 318.76 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 320.22 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 88.75 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,633.87 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,509.53 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 318.17 ms |
Summary
Forwarded catalogs were omitted from pnpr's resolution cache identity and URL safety scans. Requests with different catalog mappings could therefore share resolver output, while catalog-supplied fetch URLs did not pass through the route allowlist and inline-credential checks.
Squash Commit Body
Checklist
pnpm changeset) for@pnpm/pnpr.Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
Tests