Repository navigation
fix: disable npm workspaces for native config reads - #762
Merged
Merged
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
attiasas
reviewed
May 26, 2026
| const ( | ||
| IgnoreScriptsFlag = "--ignore-scripts" | ||
| LegacyPeerDepsFlag = "--legacy-peer-deps" | ||
| disableWorkspacesFlag = "--workspaces=false" |
Collaborator
There was a problem hiding this comment.
🟡 Documentation
Please add a one-line comment on disableWorkspacesFlag / npmConfigGetArgs noting that npm 7+ can return ENOWORKSPACES for npm config get when cwd is a workspace package (see jfrog/jfrog-cli#3473).
|
|
||
| func npmConfigGetArgs(key string) []string { | ||
| return []string{"config", "get", key, disableWorkspacesFlag} | ||
| } |
Collaborator
There was a problem hiding this comment.
What about users with npm versions lower than the new flag? It will result in an error if the flag is unknown. Should we add a guard?
omribz156
force-pushed
the
codex/npm-config-workspace-cainfo
branch
from
May 26, 2026 21:04
b692c65 to
877cc0d
Compare
Contributor
Author
|
Thanks for the review. I pushed
Verification:
CLA is still pending separately. This follow-up was Codex-assisted and manually checked before pushing. |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
attiasas
self-requested a review
June 8, 2026 12:48
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
jfrog-cli 2.108.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## What changed in v2.108.0 > Auto-generated from 6 repositories · 2026-06-11 > Comparing `v2.107.0` → `v2.108.0` > ℹ️ No changes in: gofrog ### ✨ New Features - **[build-info-go]** Added pnpm package support to recognise 403 Forbidden output [#389](jfrog/build-info-go#389) (@Phavya-jfrog) - **[jfrog-cli]** Add jf mcp command to configure the remote JFrog MCP server [#3533](jfrog/jfrog-cli#3533) (@ehl-jf) - **[jfrog-cli]** Add AI context description to commands [#3503](jfrog/jfrog-cli#3503) (@ehl-jf) - **[jfrog-cli]** feat: add server id to login command [#3394](jfrog/jfrog-cli#3394) (@tim-goto) - **[jfrog-cli]** RTECO-1021 - Enhance metrics visibility by including package manager context [#3534](jfrog/jfrog-cli#3534) (@fluxxBot) - **[jfrog-cli]** Make nix command visible [#3539](jfrog/jfrog-cli#3539) (@reshmifrog) - **[jfrog-cli]** Added Post Failure Run support for pnpm and Yarn [#3509](jfrog/jfrog-cli#3509) (@Phavya-jfrog) - **[jfrog-cli-artifactory]** JGC-473 - Add AI-agent help text to artifactory commands [#455](jfrog/jfrog-cli-artifactory#455) (@ehl-jf) - **[jfrog-cli-artifactory]** RTECO-1021 - Enhance metrics visibility by including package manager context [#481](jfrog/jfrog-cli-artifactory#481) (@fluxxBot) - **[jfrog-cli-artifactory]** RTECO-1400 - Add path validation to prevent traversal attacks in artifact handling [#487](jfrog/jfrog-cli-artifactory#487) (@fluxxBot) - **[jfrog-cli-core]** RTECO-1021 - Enhance metrics visibility by including package manager context [#1569](jfrog/jfrog-cli-core#1569) (@fluxxBot) - **[jfrog-cli-security]** Support parsing SCA issues without components [#758](jfrog/jfrog-cli-security#758) (@attiasas) - **[jfrog-cli-security]** JGC-473 - Add AI-agent help text to security commands [#760](jfrog/jfrog-cli-security#760) (@ehl-jf) - **[jfrog-cli-security]** Feature/xray 138688 add yarn support for jf ca [#759](jfrog/jfrog-cli-security#759) (@gauriy-tech) - **[jfrog-cli-security]** XRAY-144809 - CA command [Maven]: Add option to consider plugin deps [#771](jfrog/jfrog-cli-security#771) (@gauriy-tech) - **[jfrog-cli-security]** Feature/xray 138688 add pnpm support for jf ca [#769](jfrog/jfrog-cli-security#769) (@gauriy-tech) ### 🐛 Bug Fixes - **[build-info-go]** RTECO-1287 jf poetry install --only main captures all dependency [#391](jfrog/build-info-go#391) (@reshmifrog) - **[jfrog-cli]** RTECO 1296 fix repeated 401 errors before fallback authentication [#3537](jfrog/jfrog-cli#3537) (@reshmifrog) - **[jfrog-cli]** RTECO-1287 jf poetry install --only main captures all dependency [#3530](jfrog/jfrog-cli#3530) (@reshmifrog) - **[jfrog-cli-artifactory]** Updated logic for extracting repository key in case of reverse proxy scenario [#458](jfrog/jfrog-cli-artifactory#458) (@naveenku-jfrog) - **[jfrog-cli-core]** Revert "Fix reference token privilege escalation" [#1571](jfrog/jfrog-cli-core#1571) (@reshmifrog) - **[jfrog-cli-security]** XRAY-140212 - Updated gradle dep tree jar with the missing deps fix [#751](jfrog/jfrog-cli-security#751) (@gauriy-tech) - **[jfrog-cli-security]** fix: disable npm workspaces for native config reads [#762](jfrog/jfrog-cli-security#762) (@omribz156) ### 📦 Other Changes - **[build-info-go]** RTECO-1365 Include e2e tests from jfrog cli to build-info-go [#390](jfrog/build-info-go#390) (@reshmifrog) - **[jfrog-cli-artifactory]** pnpm update error output handling [#465](jfrog/jfrog-cli-artifactory#465) (@Phavya-jfrog) - **[jfrog-cli-security]** Auto install Cocoapods when Podfile.lock not exist [#723](jfrog/jfrog-cli-security#723) (@attiasas) - **[jfrog-client-go]** Use Windows system certificate store for CLI TLS transport [#1351](jfrog/jfrog-client-go#1351) (@RemiBou) --- ### 📊 Summary | Repository | Changes | |---|---| | [jfrog-cli](https://github.com/jfrog/jfrog-cli) | 8 | | [jfrog-cli-security](https://github.com/jfrog/jfrog-cli-security) | 8 | | [jfrog-cli-artifactory](https://github.com/jfrog/jfrog-cli-artifactory) | 5 | | [build-info-go](https://github.com/jfrog/build-info-go) | 3 | | [jfrog-cli-core](https://github.com/jfrog/jfrog-cli-core) | 2 | | [jfrog-client-go](https://github.com/jfrog/jfrog-client-go) | 1 | | **Total** | **27** | ### 🔗 Module Version Changes | Module | From | To | |---|---|---| | [build-info-go](https://github.com/jfrog/build-info-go) | `v1.13.1-0.20260528065004-80409c046540` | `v1.13.1-0.20260610071651-260ad6720e0d` | | [jfrog-cli-artifactory](https://github.com/jfrog/jfrog-cli-artifactory) | `v0.8.1-0.20260603105750-3886c0f01286` | `v0.8.1-0.20260610074911-82ce7d90edbd` | | [jfrog-cli-core](https://github.com/jfrog/jfrog-cli-core) | `v2.60.1-0.20260601130310-8d52a530da18` | `v2.60.1-0.20260609101026-df3091b39d06` | | [jfrog-cli-security](https://github.com/jfrog/jfrog-cli-security) | `v1.29.3` | `v1.30.0` | | [jfrog-client-go](https://github.com/jfrog/jfrog-client-go) | `v1.55.1-0.20260528115006-6ca9682a3255` | `v1.55.1-0.20260603130552-af1dd449b994` | </pre> <p>View the full release notes at <a href="https://github.com/jfrog/jfrog-cli/releases/tag/v2.108.0">https://github.com/jfrog/jfrog-cli/releases/tag/v2.108.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!11303
This branch was previously deployed
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
This patch fixes the native npm config lookup path used by
jf curation-audit --run-nativefor npm workspace packages.When curation audit runs from a workspace package directory, npm 10 can infer workspace mode and reject
npm config get registrywithENOWORKSPACES. The fix adds--workspaces=falseto the nativenpm config getcalls used for the registry and auth-token lookups, so curation can still read the project npm config without entering workspace mode.This is related to the report in #892; the curation implementation lives in this repository.
Verification
npx npm@10.9.2 config get registryfails withENOWORKSPACESfrom an npm workspace package directory, while adding--workspaces=falsesucceeds.go test ./sca/bom/buildinfo/technologies/npmgo vet ./...git diff --checkImplemented with Codex assistance; I kept the patch focused and manually reviewed the final diff.
devbranch.go vet ./....go fmt ./....