Skip to content

Passing "--no-notes" via --log-opts option doesn't work with CSV output #2003

@huornlmj

Description

@huornlmj

Describe the bug
The following command does not omit commit notes and messages as suggested and instead includes them in the CSV output. In most cases, escape character confusion occurs and breaks the CSV syntax and results in a broken CSV file.

To Reproduce

  1. Find and clone a repo containing secrets in git commit history.
  2. Run $ gitleaks git -v -r=20 local-repo/ -f csv -r local-repo.csv --log-opts "--no-notes"

Expected behavior
The output local-repo.csv file should not have any Git notes or messages included. You will see that it does, and if you're dealing with a repo containing verbose commit messages you get a broken CSV with spilled comments and notes.

Screenshots
N/A

Basic Info (please complete the following information):

  • OS: Ubuntu 24.04.3
  • Gitleaks Version: gitleaks version 8.30.0

Additional context

cc @zricethezav

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions