Files
renovate/lib/modules/platform/github/utils.ts
T
Jamie Tanna bad0211f30 chore(github): warn when using default Git author on GitHub.com (#41055)
As part of #39309 we enabled "Vigilant Mode" for the `@renovate-bot`
author.

To give an indication to folks who are self-hosting (on GitHub.com) and
using this Git commit author, we can provide a log message to let them
know.

This does not at all stop usage of this default committer email address,
but does provide a "nudge" to folks that they may see `Unverified`
commits pop up.
2026-02-12 11:42:08 +00:00

24 lines
1.1 KiB
TypeScript

import { logger } from '../../../logger/index.ts';
import { parseGitAuthor } from '../../../util/git/author.ts';
export function warnIfDefaultGitAuthorEmail(
gitAuthor: string | undefined,
isGHE: boolean | undefined,
): void {
if (isGHE === true) {
return;
}
const parsed = parseGitAuthor(
gitAuthor ?? 'renovate@whitesourcesoftware.com',
);
if (parsed?.address === 'renovate@whitesourcesoftware.com') {
logger.once.warn(
{
documentationUrl:
'https://github.com/renovatebot/renovate/discussions/39309',
},
'Using the default gitAuthor email address, renovate@whitesourcesoftware.com, is not recommended on GitHub.com, as this corresponds to a user owned by Mend and used by users of the forking-renovate[bot] GitHub App. For security and authenticity reasons, Mend enables "Vigilant Mode" on this account to visibly flag unsigned commits. As an account you do not control, you will not be able to sign commits. If you are comfortable with the `Unverified` signatures on each commit, no work is needed. Otherwise, it is recommended to migrate to a user account you own',
);
}
}