Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build vulnix with sandbox on #92

Open
j-baker opened this issue Oct 3, 2023 · 1 comment
Open

Cannot build vulnix with sandbox on #92

j-baker opened this issue Oct 3, 2023 · 1 comment

Comments

@j-baker
Copy link

j-baker commented Oct 3, 2023

I'm not sure of the exact circumstances - in any case, I run on MacOS.

error: builder for '/nix/store/72p3497238gfbajfkn120v9vn0vcp09p-vulnix-1.10.1.drv' failed with exit code 1;
       last 10 log lines:
       > Coverage HTML written to dir htmlcov
       >
       > =========================== short test summary info ============================
       > ERROR src/vulnix/tests/nvd_test.py::test_update - PermissionError: [Errno 1] Operation not permitted
       > ERROR src/vulnix/tests/resource_test.py::test_open_remote - socket.gaierror: [Errno 8] nodename nor servname provided, or not known
       > ERROR src/vulnix/tests/resource_test.py::test_multiple_resources - socket.gaierror: [Errno 8] nodename nor servname provided, or not known
       > ERROR src/vulnix/tests/test_derivation.py::test_check_returns_cves - PermissionError: [Errno 1] Operation not permitted
       > ERROR src/vulnix/tests/test_derivation.py::test_ignore_patched_cves_during_check - PermissionError: [Errno 1] Operation not permitted
       > ERROR src/vulnix/tests/vulnerability_test.py::test_product_not_found - PermissionError: [Errno 1] Operation not permitted
       > =================== 59 passed, 9 warnings, 6 errors in 0.78s ===================
       For full logs, run 'nix log /nix/store/72p3497238gfbajfkn120v9vn0vcp09p-vulnix-1.10.1.drv'.

Running the build with sandbox off succeeds. My expectation here is that the vulnix tests access the internet to acquire the CVE database? This means that with sandbox on, the build will fail. Not sure if there's anything difference re: Linux vs MacOS.

I'm wondering if the tests could be fully pure by accessing a copy of the database that's been downloaded as a part of the Nix build, rather than using the network API?

@aciceri
Copy link

aciceri commented Jan 16, 2024

Related to #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants