insightsengineering / insightsengineering/teal.code
[Feature Request]: Explore and implement robust sandboxing mechanism
- Lingua principale
- R
- Stelle
- 12
- Fork
- 11
- Merge medio
- 1g 17h
- PR unite (30g)
- 1
Descrizione
### Feature description
Currently `eval_code` evaluates each call in the new (cloned) environment where `parent.env(env) <- parent.env(.GlobalEnv)`. When executing `library` via `eval_code` new `library` is added over each `qenv@env` - i.e. all `qenv` objects have the same package-namespaces in the search path.
We would like to separate `@env` as much as possible.
### Separate search path for each `env@env`
So that each `qenv` is a child of libraries which have been attached in this `eval_code`

### Separate `qenv` sessions
Other solution is to separate sessions where `eval_code` is executed [rlang::r_session](https://callr.r-lib.org/reference/r_session.html)
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by tracing how eval_code clones environments and how qenv@env shares package namespaces. Compare separate search paths with the proposed rlang::r_session approach; done means eval_code executions have isolated environments and package namespaces under a clearly selected design.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- r
- Ambito
- security
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100