jfrog / jfrog/jfrog-cli-security

Error message shows --target-path instead of --repo-path in Xray CLI

Open
#353 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
13
Forks
50
Avg merge
3d 48m
Merged PRs (30d)
26

Description

Describe the bug
When running an Xray CLI command, for example, $jfrog xr am with no context we get an error message after the build scan is completed:
Note: no context was provided, so no policy could be determined to scan against.
You can get a list of custom violations by providing one of the command options: --watches, --target-path or --project.

The above error message shows --target-path whereas there is no --target-path parameter in the wiki.

To Reproduce
Run the $jfrog xr am without any policy set and we can see the above message in the errors. The issue also occurs when using the $jfrog xr s command.

Expected behaviour
The error message might need to show --repo-path instead of --target-path so that there is no confusion on the same.

Versions

  • JFrog CLI version: 2.2.1, 2.2.0 and 2.1.1
  • JFrog CLI operating system: tested on mac and centos
  • Xray Version: 3.29.0
  • Artifactory Version: 7.23.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Xray CLI code that emits the reported no-context error for the am and s commands, then compare its option names with the documented CLI parameters. Done means the message uses --repo-path consistently and the affected commands no longer mention --target-path.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, security
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.