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

Added action configuration values #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

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.

None yet

3 participants