Skip to content

Commit 27aae98

Browse files
committed
do not pass default branch and repo name to coana CLI
1 parent 5a9a7ec commit 27aae98

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/commands/scan/perform-reachability-analysis.mts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,12 @@ export async function performReachabilityAnalysis(
167167
const env: NodeJS.ProcessEnv = {
168168
...process.env,
169169
}
170-
if (repoName) {
170+
// do not pass default repo and branch name to coana to mixing
171+
// buckets (cached configuration) from projects that are likely very different.
172+
if (repoName && repoName !== constants.SOCKET_DEFAULT_REPOSITORY) {
171173
env['SOCKET_REPO_NAME'] = repoName
172174
}
173-
if (branchName) {
175+
if (branchName && branchName !== constants.SOCKET_DEFAULT_BRANCH) {
174176
env['SOCKET_BRANCH_NAME'] = branchName
175177
}
176178

0 commit comments

Comments
 (0)