WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@benoitgoyette
Copy link

Fixes and adds arguments that are passed to gitleaks application.

Fixed GITLEAKS_CONFIG that didn't seem to be used.

While testing, I discovered that passing multiple arguments in the same string does not yield the same result and appending multiple arguments

args.push(`-c ${process.env.GITLEAKS_CONFIG}`);  // raises an error

args.push("-c", process.env.GITLEAKS_CONFIG);      // works

Added these options

  • GITLEAKS_SILENT, if true removes the -v --redact arguments
  • GITLEAKS_NO_GIT, if true sets the --no-git argument, discards the other versions and baseline options.
  • GITLEAKS_BASELINE_FILE, if set, added the -b path/file argument.
  • GITLEAKS_LOG_LEVEL, if set, changes the log level

Fixes and adds arguments that are passed to `gitleaks` application.

Fixed `GITLEAKS_CONFIG` that didn't seem to be used.

While testing, I discovered that
```
args.push(
    `--log-opts=--no-merges --first-parent${scanInfo.baseRef}^..${scanInfo.headRef}`
);

```

Does not yield the same result as:
```
args.push(
    "--log-opts=--no-merges",
    "--first-parent",
    `${scanInfo.baseRef}^..${scanInfo.headRef}`
);
```

Added these options
`GITLEAKS_SILENT`, if `true` removes the `-v --redact` arguments
`GITLEAKS_NO_GIT`, if `true` sets the `--no-git` argument, discards the other versions and baseline options.
`GITLEAKS_BASELINE_FILE`, if set, added the `-b path/file` argument.
`GITLEAKS_LOG_LEVEL`, if set, changes the log level
@kawaxi
Copy link

kawaxi commented May 22, 2024

@benoitgoyette

@thunermay
Copy link

Why is this not merged yet? @benoitgoyette

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants