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
Installation instructions over at https://vulnerablecode.readthedocs.io/en/stable/installation.html says:
I did that and ended up with two problems:
Problem 1 - make envfile hangs
make envfilehangs. This is caused by the following line in Makefile:Solution
Guessing that
/dev/urandomhas changed behavior a bit. Perhaps in Ubuntu 25.10.Problem 2 - Django and SECRET_KEY
When doing
docker compose upI getSolution
I got it to work by appending the content of
.envtodocker.envand then rundocker compose up. E.g. something like: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