When user tried to scan a Github URL the “Error: failed to download ZIP file, please check if the URL of the repository is correct” is seen. In the logs the Error "404: Not Found" can also be seen. This error is found to occur only when accessing certain repos. Other URL's work perfectly well.
Details
- Check if putting "master" into "Git branch" works. Old repos have "master" branch which has been replaced by "main" for new repos. Please specify the branch.
- Check if using the --gitBranch parameter as a workaround works.
- Check the access token, if it is a private repository.
NB: "master" is being decommissioned by Github, for all new repositories' the default branch is now "main". When providing a git URL to the CAST Highlight Code Reader, the HL code reader by default may try to download the "main" branch i.e. a main.zip file. For many old GitHub repositories, the "main" branch may not exist or more precisely it may have "master" as the name.
Related Articles
How to scan a Git repo with the Command Line (using Apache Ant)
How to use Github Actions to scan your applications with CAST Highlight
Additional Resources
CAST Highlight Troubleshooting Guides
CAST Highlight Product Documentation
Ticket
51857, 51712
Comments