Learn

Contents

Is it safe to run?

An eLucid8 app is three things: the elucid8 command, a program (program.el8, or its compiled plan.json), and its deployment (deploy.json, with any data files and helper programs beside it). This page says what each can do on your computer, what is safe by design, and the few things to watch, each with what to do. We make every reasonable effort to keep eLucid8 safe to use, and say below what that effort is; no software can be guaranteed free of faults, and eLucid8 comes with no guarantee.

Safe by design

A deploy.json from someone else

A deployment can do more than a program:

A started program runs with your rights. So a deployment that starts programs is as trustworthy as a script from the same person.

What to do:

  1. Read deploy.json first. It is a short text file. Look for "process", "connector", "env" and "outside", and for paths in "from" that leave the folder (a leading /, or ..).
  2. Then run elucid8 check. When the deployment can do more than read its data files and write its outputs, it first lists what: the programs and connectors it starts, with the environment variables each receives, files it writes outside its folder, addresses it listens on, made from deploy.json alone. Then it lists each input's and each output's binding, one line each, without computing anything. For this folder:

program.el8:

readings = input("readings", t : 5)
score = input("score", t : inf)
total = readings + score
output("total") = total

Open in playground

readings.csv:

t,value
0,1
1,2
2,3
3,4
4,5

deploy.json:

{
  "format": "elucid8-deploy/2",
  "inputs": {
    "score": { "from": { "process": ["node", "scorer.js"] }, "answers": true, "env": ["SCORER_KEY"] }
  },
  "outputs": { "total": { "to": "../shared/total.csv", "outside": true } }
}
elucid8 check
this deployment can:
  start a program: node scorer.js (answering input "score" on demand; env SCORER_KEY)
  write outside its folder: ../shared/total.csv (output "total")
program.el8: plan version 26, 2 inputs, 1 output
input "readings": readings.csv (CSV, found beside the configuration), stored, version 520e3d664707a9c9; over t : 5 (whole numbers; 5 rows); a missing point is missing data (no end of data: inside its bounds a missing point is missing data)
  columns: t (coordinate), value (value)
input "score": process node scorer.js, answered on demand; over t (whole numbers)
output "total": ../shared/total.csv (CSV), over t = 0..4 (5 rows); columns t, total_value, total_kind, total_message
ok

The list says that running this deployment starts node scorer.js, giving it SCORER_KEY, and writes outside the folder (said by its "outside": true; without it, check refuses the deployment and says so). run writes there only once you allow it, as it starts the program only once you allow that.

Nothing starts a program until you allow it. run, serve, window and init refuse a deployment that starts programs or connectors, with exit code 3 and the list, until you allow them: at a terminal they ask once, and a yes is recorded in a file .elucid8-allowed in the folder, with a fingerprint of the list, so a deploy.json that later starts something else is asked about again; elsewhere (in a script) pass --allow-programs. The fingerprint covers each program and connector as deploy.json writes it (its command and arguments, its settings, the names in its env), not what it runs: a script it names (scorer.js) changed after your yes, another program found under the same command name on your PATH, or another Python running the connectors (ELUCID8_PYTHON) runs without a new question. Allow a deployment only in a folder whose scripts you trust, and delete .elucid8-allowed to be asked again. check reads every stored input, and an input served by a program ({"process": [...]} without "answers": true) or a connector is read by starting it; so for such a deployment check prints the list, says it checked nothing else, and exits with code 3 unless you allowed them. A program that answers on demand, or that takes an output's records, is started only by run, serve and window. Under elucid8 serve, a reload whose deploy.json starts more than what you allowed is refused.

From Python, elucid8.run(config={…}) and elucid8.Service start the programs and connectors given in the call (in inputs, or in config= as a dict) without asking, because your own code names them; those a deploy.json file given as config= names start only with allow_programs=True or your yes in .elucid8-allowed beside it. An output with "outside": true in config= as a dict is refused, as elucid8 run refuses it in a script: to write outside the folder, run the deployment with elucid8 run --allow-outside, or give it a deploy.json file whose .elucid8-allowed records your yes.

The playground on your computer: elucid8 playground

The browser's playground runs inside the browser's sandbox. elucid8 playground runs on your computer (macOS, Windows and Linux), with your rights, as elucid8 run does, so it keeps to these limits:

Your API key

Writing programs from a description in elucid8 playground uses Anthropic's AI on your own account, with your own Anthropic API key. elucid8 key keeps it.

Data you don't control

Data is only ever data to eLucid8: a value in a file, a database or a stream is read as a number, a boolean or a text, and never run. A file that is not what the deployment says is refused with its line. Two cautions are about where the results go next.

Getting elucid8

Running a service

How we work on security

No guarantee

eLucid8 is provided "as is", without warranty of any kind, as its licences (MIT or Apache 2.0) say. However careful we are, it may have faults we do not know of. You are responsible for what you run with it: read a deploy.json before you run it, run only deployments and helper programs you trust, keep your keys and tokens to yourself, and use your own judgement about data you don't control. If eLucid8 holds or produces data that matters to you, keep your own copies.

Reporting a problem

To report a security problem, write to security@elucid8-lang.org. We read every report, will tell you what we found, and credit you when it is fixed unless you prefer not to be named. Please do not open a public issue: say what is affected, the version (elucid8 --version) and how to reproduce it.