diff --git a/src/lib/project-metadata/target-builders/git.ts b/src/lib/project-metadata/target-builders/git.ts index 9e05082916..5055ee2f61 100644 --- a/src/lib/project-metadata/target-builders/git.ts +++ b/src/lib/project-metadata/target-builders/git.ts @@ -1,6 +1,9 @@ import * as url from 'url'; import subProcess = require('../../sub-process'); import { GitTarget } from '../types'; +import * as debugModule from 'debug'; + +const debug = debugModule('snyk:git'); // for scp-like syntax [user@]server:project.git const originRegex = /(.+@)?(.+):(.+$)/; @@ -44,6 +47,7 @@ export async function getInfo({ } catch (err) { // Swallowing exception since we don't want to break the monitor if there is a problem // executing git commands. + debug('getInfo error getting target remoteUrl:', err); } try { @@ -55,6 +59,7 @@ export async function getInfo({ } catch (err) { // Swallowing exception since we don't want to break the monitor if there is a problem // executing git commands. + debug('getInfo error getting target branch:', err); } return target; diff --git a/src/lib/snyk-test/run-test.ts b/src/lib/snyk-test/run-test.ts index db2fd0d3cd..cccae85990 100644 --- a/src/lib/snyk-test/run-test.ts +++ b/src/lib/snyk-test/run-test.ts @@ -490,6 +490,9 @@ function sendTestPayload( const payloadBody = payload.body as any; const filesystemPolicy = payload.body && !!(payloadBody?.policy || payloadBody?.scanResult?.policy); + + debug('sendTestPayload request remoteUrl:', payloadBody?.target?.remoteUrl); + debug('sendTestPayload request branch:', payloadBody?.target?.branch); return new Promise((resolve, reject) => { makeRequest(payload, (error, res, body) => { if (error) {