mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
logs: more details on secrets exposure
This commit is contained in:
parent
ff7822176f
commit
42231b6b75
2 changed files with 12 additions and 0 deletions
|
@ -41,6 +41,10 @@ export function commitFilesToBranch(
|
||||||
config.branchName !== sanitize(config.branchName) ||
|
config.branchName !== sanitize(config.branchName) ||
|
||||||
config.commitMessage !== sanitize(config.commitMessage)
|
config.commitMessage !== sanitize(config.commitMessage)
|
||||||
) {
|
) {
|
||||||
|
logger.debug(
|
||||||
|
{ branchName: config.branchName },
|
||||||
|
'Secrets exposed in branchName or commitMessage'
|
||||||
|
);
|
||||||
throw new Error(CONFIG_SECRETS_EXPOSED);
|
throw new Error(CONFIG_SECRETS_EXPOSED);
|
||||||
}
|
}
|
||||||
// API will know whether to create new branch or not
|
// API will know whether to create new branch or not
|
||||||
|
|
|
@ -172,6 +172,10 @@ export function generateBranchConfig(
|
||||||
upgrade.commitMessage = template.compile(upgrade.commitMessage, upgrade);
|
upgrade.commitMessage = template.compile(upgrade.commitMessage, upgrade);
|
||||||
// istanbul ignore if
|
// istanbul ignore if
|
||||||
if (upgrade.commitMessage !== sanitize(upgrade.commitMessage)) {
|
if (upgrade.commitMessage !== sanitize(upgrade.commitMessage)) {
|
||||||
|
logger.debug(
|
||||||
|
{ branchName: config.branchName },
|
||||||
|
'Secrets exposed in commit message'
|
||||||
|
);
|
||||||
throw new Error(CONFIG_SECRETS_EXPOSED);
|
throw new Error(CONFIG_SECRETS_EXPOSED);
|
||||||
}
|
}
|
||||||
upgrade.commitMessage = upgrade.commitMessage.trim(); // Trim exterior whitespace
|
upgrade.commitMessage = upgrade.commitMessage.trim(); // Trim exterior whitespace
|
||||||
|
@ -202,6 +206,10 @@ export function generateBranchConfig(
|
||||||
.replace(regEx(/\s+/g), ' '); // TODO #12071
|
.replace(regEx(/\s+/g), ' '); // TODO #12071
|
||||||
// istanbul ignore if
|
// istanbul ignore if
|
||||||
if (upgrade.prTitle !== sanitize(upgrade.prTitle)) {
|
if (upgrade.prTitle !== sanitize(upgrade.prTitle)) {
|
||||||
|
logger.debug(
|
||||||
|
{ branchName: config.branchName },
|
||||||
|
'Secrets were exposed in PR title'
|
||||||
|
);
|
||||||
throw new Error(CONFIG_SECRETS_EXPOSED);
|
throw new Error(CONFIG_SECRETS_EXPOSED);
|
||||||
}
|
}
|
||||||
if (upgrade.toLowerCase) {
|
if (upgrade.toLowerCase) {
|
||||||
|
|
Loading…
Reference in a new issue