Skip to content

Added action configuration values#115

Open
benoitgoyette wants to merge 1 commit into
gitleaks:masterfrom
benoitgoyette:feature/added_config_options
Open

Added action configuration values#115
benoitgoyette wants to merge 1 commit into
gitleaks:masterfrom
benoitgoyette:feature/added_config_options

Conversation

@benoitgoyette

Copy link
Copy Markdown

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

kawaxi commented May 22, 2024

Copy link
Copy Markdown

@benoitgoyette

@thunermay

Copy link
Copy Markdown

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