eliasgranderubio / dagda

a tool to perform static analysis of known vulnerabilities, trojans, viruses, malware & other malicious threats in docker images/containers and to monitor the docker daemon and running docker containers for detecting anomalous activities
Apache License 2.0
1.16k stars 163 forks source link

The problem of using docker-compose to build and deploy dagda is suspected to be a bug #80

Closed liangxiaoxiaoxiao closed 3 years ago

liangxiaoxiaoxiao commented 4 years ago

Short description

After I built docker-compose completely, and then usedokcer-compose exec dagda / bin / sh -c 'python3 dagda.py vuln --init', an error will appear when using --init_status to view The pre-display is being initialized

Reproduction steps

The process I created is as follows: Environment: centos7 docker1.13.1

  1. I use wget to get the whole project, and then use the yaml file to create, on the basis of the original addition of dns analysis and environment variables,
  2. There are three complete container start-ups, namely dagda, vulndb, and falco. There are four processes for viewing dagda, so everything looks correct.

Expected results

The issue is:

  1. Using container deployment, you will get:
    {
    "msg": "Accepted the init db request"
    }

    Then, when you use --init_status to check the status, it will appear:

    "status": "Unexpected exception of type ConnectionError occurred: (MaxRetryError (\" HTTPSConnectionPool (host = 'raw.githubusercontent.com', port = 443): Max retries exceeded with url: / offensive-security / exploit-database / master /files_exploits.csv (Caused by NewConnectionError ('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f9bf7ed5208>: Failed to establish a new connection: [Errno -3] Try again',)) \ ",),)",
    "timestamp": "2020-04-25 07: 35: 36.567760"

    The query results are still the same

  2. If deploying with python, use the command --init to return:
    {
    "msg": "Accepted the init db request"
    }

    Then use--init_status to query, you will find that it is in the initialization state, the query is still the same after a long time, but the container will not be like this: { "status": "Initializing", "timestamp": "2020-04-25 08:04:39.697677" } { "status": "Initializing", "timestamp": "2020-04-25 08:04:39.697677" }

Solution

I hope that you can correctly use compose to deploy dagda and use it correctly. It is not clear whether it is caused by a bug. If the network is a problem, the effect of upgrading the network speed is still the same