Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect help instructions displayed on command line #10063

Open
1 of 3 tasks
jgadsden opened this issue Apr 5, 2024 · 0 comments
Open
1 of 3 tasks

Incorrect help instructions displayed on command line #10063

jgadsden opened this issue Apr 5, 2024 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@jgadsden
Copy link

jgadsden commented Apr 5, 2024

Describe the bug
semgrep --help incorrectly states that semgrep with no subcommand is equivalent to semgrep scan

When running from the command with no subcommand semgrep will correctly print the text provided by the 'print_help' function.

To Reproduce
Steps to reproduce the behavior:

  1. run command semgrep --help from the command line and get:
semgrep-develop % semgrep --help
Usage: semgrep [OPTIONS] COMMAND [ARGS]...

To get started quickly, run `semgrep scan --config auto`

Run `semgrep SUBCOMMAND --help` for more information on each subcommand

If no subcommand is passed, will run `scan` subcommand by default

Options:
...
  1. run command semgrep with no subcommand:
semgrep-develop % semgrep

┌──── ○○○ ────┐
│ Semgrep CLI │
└─────────────┘
Semgrep CLI scans your code for bugs, security and dependency vulnerabilities.

For more information about Semgrep, visit https://semgrep.dev

Get Started:
  Run `semgrep login && semgrep ci` to enable Pro rules, Semgrep Supply Chain,
  and secrets scanning. Without logging in, Semgrep CLI will only run the free
  open-source rules available at https://semgrep.dev/r.
...

Expected behavior
semgrep --help should not report that the 'scan' subcommand will be run if no subcommand is provided

Screenshots
run command semgrep --help and get:
Screenshot 2024-04-05 at 09 31 13

run command semgrep with no subcommand:
Screenshot 2024-04-05 at 09 31 59

What is the priority of the bug to you?

  • P0: blocking your adoption of Semgrep or workflow
  • P1: important to fix or quite annoying
  • P2: regular bug that should get fixed

Environment
semgrep official release 1.67.0

Use case
Correct help instructions displayed on command line

@ievans ievans added bug Something isn't working documentation Improvements or additions to documentation labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Development

No branches or pull requests

2 participants