Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Windows containers #163

Closed
pombredanne opened this issue Apr 27, 2021 · 4 comments
Closed

Add support for Windows containers #163

pombredanne opened this issue Apr 27, 2021 · 4 comments
Labels
enhancement New feature or request high priority
Milestone

Comments

@pombredanne
Copy link
Member

These are essentially similar to Docker containers with a few twists:

  • they contains Windows the OS and Windows-based executables
  • the overall footprint is typically larger than Linux
  • the packaging is different, except for application packages

They can be seen in Docker hub such as at https://hub.docker.com/_/microsoft-windows-servercore

I think that the approach will be best handled at first in separate specialized pipeline.

Some high level items:

  • these containers are hard to download from Linux. And since overall we want a feature to download any container they will benefit from this. This could be either in FetchCode or in Container-Inspector
  • there are specific detection of the OS and container layout that might be best handled first in Container-Inspector
  • the specific operations of dissecting Windows registries, WindowsPE and similar are likely best handled in ScanCode toolkit
@pombredanne
Copy link
Member Author

We are enabling fetching Docker images in #174 and this is critical to allow testing the scans of Windows images on Linux (otherwise a docker pull/docker save does not work on Linux for a Windows images as Docker does not allow fetching from Linux)

For now we have this with the #174 code with docker://mcr.microsoft.com/windows/servercore:ltsc2019:

Fetching "docker://mcr.microsoft.com/windows/servercore:ltsc2019" using fetch_docker_image
Fetching image with: /home/pombreda/w421/scancode.io/lib/python3.9/site-packages/fetchcode_container/bin/skopeo copy docker://mcr.microsoft.com/windows/servercore:ltsc2019 docker-archive:/tmp/tmpnpoc571h/mcr_microsoft_com_windows_servercore_ltsc2019.tar --policy /home/pombreda/w421/scancode.io/lib/python3.9/site-packages/fetchcode_container/bin/default-policy.json
time="2021-05-11T14:53:03Z" level=fatal msg="Error choosing an image from manifest list docker://mcr.microsoft.com/windows/servercore:ltsc2019: no image found in manifest list for architecture amd64, variant \"\", OS linux"
[11/May/2021 14:53:04] "POST /project/add/ HTTP/1.1" 200 20561

pombredanne added a commit that referenced this issue May 12, 2021
This queries the regsitry to get the first os/arch and variant if any
This allows to fetch images for other os/arches than the one where
we are running, including windows for #163

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne pombredanne added this to the 2021-08 milestone Jun 9, 2021
@pombredanne
Copy link
Member Author

The latest version of ScanCode Tk adds support for DLL and Windows executable data collection which should be available here anytime now.

@tdruez
Copy link
Member

tdruez commented Aug 11, 2021

@JonoYang is this one completed?

@JonoYang
Copy link
Contributor

@tdruez Closing this ticket as we have added Windows container docker pipeline and the associated scancode-toolkit improvements for Windows package detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

3 participants