Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

npm 12 invalid abbreviated flag "--prod"

オープン
#904 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
cli

調査の方向性

Start from the jf audit entry point for npm dependency collection and trace how --dep-type prodOnly produces the npm ls --prod command. Reproduce the failure with npm 12.2.0 using the command shown, then verify that a production-only scan completes successfully without the invalid abbreviated flag.

索引モデルが issue の本文から書いたものです。

説明

bug
Describe the bug

NPM 11 is the last major version steal supported abbreviated flag --prod
When I execute jf-audit with NPM 12 and --dep-type prodOnly, the option --prod is injected and throw exit
It works if the option --dep-type prodOnly is not included in the command line.

Current behavior
$ jf audit --npm --dep-type prodOnly --watches [xxx] --fail=false --format simple-json
08:34:10 [Info] ####### Starting jf audit Scan #######
08:34:10 [Info] Command flags: [--dep-type=prodOnly --fail=false --format=simple-json --npm=true --watches=xxx]
08:34:12 [Info] Detecting recursively targets for scan in current directory
08:34:14 [Info] Generating SBOM...
08:34:14 [Info] Calculating npm dependencies...
08:34:15 [Warn] error while running '/usr/local/bin/npm ls --prod --ignore-scripts --json --all --long': exit status 1
Exit prior to config file resolving
cause
Invalid abbreviated flag "--prod". Did you mean "--production"?
08:34:15 [Info] Used npm version: 12.2.0
Reproduction steps

With NPM 12
$ jf audit --npm --dep-type prodOnly --watches [xxx] --fail=false --format simple-json

Expected behavior

The ability to scan only production dependencies

No response

JFrog CLI-Security version

?

JFrog CLI version (if applicable)

2.125.0

Operating system type and version

alpine 3.23

JFrog Xray version

No response

主要言語
Go
スター
13
フォーク
52
平均マージ
2日 9時間
マージ済み PR(30日)
21

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jfrog/jfrog-cli-security のほかの issue

jfrog/jfrog-cli-security の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。