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

Semgrep prints "only git-tracked" when not in a git repository #9815

Open
1 of 3 tasks
m1cm1c opened this issue Feb 21, 2024 · 0 comments
Open
1 of 3 tasks

Semgrep prints "only git-tracked" when not in a git repository #9815

m1cm1c opened this issue Feb 21, 2024 · 0 comments
Labels

Comments

@m1cm1c
Copy link

m1cm1c commented Feb 21, 2024

Describe the bug
Semgrep incorrectly states that it only scanned git-tracked files.

To Reproduce

  1. Create a new directory.
  2. Copy some project where semgrep will find something into the new directory but make sure not to copy the .git directory (if any).
  3. Run semgrep scan --json -o o while in the newly created directory.
  4. Semgrep will print something like Scanning 35809 files (only git-tracked) with: [...] even though file o will contain findings. Since semgrep was not run in a git directory, there are no git-tracked files in it, meaning that "Scanning 35809 files (only git-tracked)" is a false statement.

Expected behavior
Semgrep should not print "only git-tracked".

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
Official build (1.60.1) installed via python3 -m pipx install semgrep running on Manjaro.

Use case
Without this bug, I wouldn't have spent a long time trying to figure out how to make semgrep ignore git. In fact, I'm still not sure whether semgrep even allows the user to ignore git or whether you need to copy your project to a different directory without .git and .gitignore if you want to do so.

@ievans ievans added bug Something isn't working priority:low feature:cli-ux labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants