dependency-check / azuredevops

Dependency Check Azure DevOps Extension
Apache License 2.0
45 stars 25 forks source link

Azure DevOps task hangs when downloading the installer from GitHub #87

Closed calumtomeny closed 3 years ago

calumtomeny commented 3 years ago

Describe the bug The Azure DevOps task hangs at the point of Downloading Dependency Check latest installer from GitHub..

image

Version of dependency-check used 6.0.4

Log file Screenshot provided above.

To Reproduce Steps to reproduce the behavior:

  1. Add the Dependency Check task to a build.
  2. Run the build.

Expected behavior The task executes successfully or an error is thrown.

Additional context I have added some logging to the task:

console.log('Getting latest...');
let response = yield client.get(url);
console.log('...Downloaded latest.');

In the case above the first log would execute but the second log was never reached.

ejohn20 commented 3 years ago

Are you running the extension on your local build agents? It appears your outbound connection to github is being blocked by a firewall policy.

Rather than pulling the installer externally, you can set the local install path property to a directory on the build agent: https://github.com/dependency-check/azuredevops/blob/ec3d0e53f8be4feeb48eb97be9df71b01767baed/src/Tasks/dependency-check-build-task/task.json#L135.

That will use a local copy of dependency check rather than downloading the installer.

calumtomeny commented 3 years ago

That worked for me, thanks @ejohn20!