This failure of
snyk test is usually caused by some of the dependencies relying on a compiled artifact which is available locally but not on the central repository.
Make sure to mount the local repository into the Docker image so that the local Maven can leverage the local artifact (nothing already present is downloaded, making the test faster).
docker run -it -e "SNYK_TOKEN=YOUR_TOKEN_HERE" -e "MONITOR=true" -v "/Users/pstember/Git/java-goof:/project" -v "/Users/pstember/.m2:/root/.m2" -v "/Users/pstember/.ivy2:/root/.ivy2" snyk/snyk-cli:maven-3.6.1 test --org=second-org --file=todolist-web-common/pom.xml
where the important code is:
-v "/Users/USERNAME/.m2:/root/.m2" -v "/Users/USERNAME/.ivy2:/root/.ivy2".