microsoft / GHAzDO-Resources

Resources, Scripts, etc. for GitHub Advanced Security on Azure DevOps
MIT License
31 stars 14 forks source link

Remove windows 7zip dependency from agent install script #19

Closed tjcorr closed 8 months ago

tjcorr commented 8 months ago

Modern versions of Windows now contain tar (and curl) preinstalled. It should be available on Windows Server 2019 and later and Windows 10+. Removing 7zip means that you can now run this script on a base image without any additional steps.

ncouraud commented 8 months ago

Thanks @tjcorr Nice catch! I'd thought it was just an alias to extract-archive for some reason.

We should poke the Actions compute folks as well. (i.e. - https://github.com/actions/runner-images/blob/main/images/windows/scripts/build/Install-CodeQLBundle.ps1)

felickz commented 8 months ago

As an alternative to 7zip on Windows/Server 2016 - Git for Windows has a git Bash folder Program Files/Git/usr/bin that includes tar and gzip - was able to copy over those exe's and accompanying dll's into a folder that is on the PATH. This will allow using the script as is ✅