From 82257b56c286941ced7ff325d288c742ebe2850a Mon Sep 17 00:00:00 2001 From: eric sciple Date: Tue, 14 Oct 2025 18:55:51 +0000 Subject: [PATCH] . --- src/git-auth-helper.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts index 9b8131d..8ebe4dc 100644 --- a/src/git-auth-helper.ts +++ b/src/git-auth-helper.ts @@ -171,11 +171,13 @@ class GitAuthHelper { await this.removeGitConfig(this.insteadOfKey, true) if (this.settings.persistCredentials) { + // TODO: UPDATE THIS + // Configure a placeholder value. This approach avoids the credential being captured // by process creation audit events, which are commonly logged. For more information, // refer to https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/manage/component-updates/command-line-process-auditing const output = await this.git.submoduleForeach( - // wrap the pipeline in quotes to make sure it's handled properly by submoduleForeach, rather than just the first part of the pipeline + // Wrap the pipeline in quotes to make sure it's handled properly by submoduleForeach, rather than just the first part of the pipeline `sh -c "git config --local '${this.tokenConfigKey}' '${this.tokenPlaceholderConfigValue}' && git config --local --show-origin --name-only --get-regexp remote.origin.url"`, this.settings.nestedSubmodules ) @@ -311,14 +313,13 @@ class GitAuthHelper { // Add include or includeIf to reference the credentials config if (globalConfig) { - // For global config, use unconditional include. - // No need to track for cleanup since the temp .gitconfig file (which contains - // this include.path entry) gets deleted by removeGlobalConfig(). + // Global config file is temporary await this.git.config('include.path', credentialsConfigPath, true) } else { // For local config, use includeIf.gitdir to match the .git directory. // Configure for both host and container paths to support Docker container actions. let gitDir = path.join(this.git.getWorkingDirectory(), '.git') + console.log(`Git dir: ${gitDir}`) // Use forward slashes for git config, even on Windows gitDir = gitDir.replace(/\\/g, '/') const hostIncludeKey = `includeIf.gitdir:${gitDir}.path`