Skip to content

Fails to start, 2 issues (with fixes) #2300

@hesa

Description

@hesa

Installation instructions over at https://vulnerablecode.readthedocs.io/en/stable/installation.html says:

git clone https://github.com/aboutcode-org/vulnerablecode.git && cd vulnerablecode
make envfile
docker compose build
... snip
docker compose up

I did that and ended up with two problems:

Problem 1 - make envfile hangs

make envfile hangs. This is caused by the following line in Makefile:

GET_SECRET_KEY=`base64 /dev/urandom | head -c50`

Solution

GET_SECRET_KEY=`head /dev/urandom | base64 | head -c50`

Guessing that /dev/urandom has changed behavior a bit. Perhaps in Ubuntu 25.10.

Problem 2 - Django and SECRET_KEY

When doing docker compose up I get

.... snip
vulnerablecode-1                |   File "/usr/local/lib/python3.12/site-packages/environ/environ.py", line 213, in str
vulnerablecode-1                |     value = self.get_value(var, cast=str, default=default)
vulnerablecode-1                |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vulnerablecode-1                |   File "/usr/local/lib/python3.12/site-packages/environ/environ.py", line 392, in get_value
vulnerablecode-1                |     raise ImproperlyConfigured(error_msg) from exc
vulnerablecode-1                | django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable

Solution

I got it to work by appending the content of .env to docker.env and then run docker compose up. E.g. something like:

$ echo >> docker.env
$ cat .env  >> docker.env

I do not know docker or vulnerablecode enough to propose a nice solution, but the above brute fix worked for me and should give a hint.

Environment

OS: Ubuntu 25.10
vulnerablecode: git latest

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