Skip to content

INVM Crawling for Packages, etc. does not work with dockerized crawler #376

@canturkisci

Description

@canturkisci

Description

Build a dockerized crawler and try to use it to inspect the host itself (INVM mode). The crawler will run, but it will keep inspecting itself, i.e., the container.

How to Reproduce

Build the container

sudo docker build -t crawler .

Run crawler to just collect packages and do a simple count to test

$ sudo docker run --privileged --net=host --pid=host -v /cgroup:/cgroup:ro -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /var/lib/docker:/var/lib/docker:ro -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/output:/crawler/output -it crawler --features package | wc -l

429 (428 pkgs + 1 metadata line)

DO the same from host:

$ dpkg -l | wc -l

598

Do the same directly from the crawler container:

$ sudo docker run -it --entrypoint /bin/bash crawler
root@bc94958a3b78:/crawler# dpkg -l | wc -l

433 (428 pkgs + 5 header lines)

What to do

I am not sure what we could be doing about this. If we want to run the dockerized version also for hosts, the crawler needs to scan host pkg contents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions