You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `frontend` feature is enabled by default, so once the api is running open `http://localhost:8000/` for the frontend.
59
59
60
+
## Running as a Docker image
61
+
62
+
Genealogos API and frontend can also be packaged into a Docker image.
63
+
64
+
To get and run the image,
65
+
66
+
```fish
67
+
# Produce the image
68
+
nix build github:tweag/genealogos#dockerImage
69
+
70
+
# Load it into docker
71
+
docker load -i=./result
72
+
73
+
# Run the image
74
+
# Note: --rm will wipe the nix store inside the container after it quits
75
+
# The service will be available on port 8000
76
+
docker run -it --rm -p 8000:8000 localhost/genealogos
77
+
```
78
+
60
79
## Hacking
61
80
### Prerequisites
62
81
Development of Genealogos requires Cargo, and some other dependencies.
@@ -211,6 +230,20 @@ This means some inputs can be missed, in particular those that are part of strin
211
230
Additionally, Nixtract (through Genealogos) restarts nix for every SBOM component.
212
231
When evaluation of your derivation takes a long time, this will result in very slow SBOM generation.
213
232
233
+
### Security notes
234
+
235
+
By its very nature, Genealogos API evaluates arbitrary Nix code provided by users.
236
+
If you are planning to run it as a public service, make sure to properly secure the process and set up appropriate serivce management measures, taking into account:
237
+
238
+
- Potential for Denial of Service attacks by any user, in particular
239
+
* Unlimited memory usage,
240
+
* Unlimited storage usage,
241
+
* Unlimited CPU time usage
242
+
- Reliance on the assumption that Nix Flake evaluation is fully hermetic and pure, and thus safe
243
+
- Reliance on the Nix sandbox to be secure and non-leaking
244
+
245
+
As such, we recommend running any public Genealogos instance in some containerised setting, such as via the provided [Docker Image](#Running_as_a_Docker_image), and properly limiting the resources available to the container.
246
+
214
247
## License
215
248
Distributed under the MIT License. See `LICENSE` for more information.
0 commit comments