Voila hides code cells by default, so visitors see outputs and widgets. That is presentation, not protection. It still runs the notebook on a real Jupyter kernel for each visitor, and widgets can reach that kernel. Treat a Voila dashboard as a live application with your account's access.
How Voila works
The Voila documentation describes the steps. Voila runs the code in the notebook and collects the outputs. It converts the notebook and outputs to HTML, with code cells hidden by default. It serves the page as a Tornado application or through the Jupyter server. When users load the page, the widgets on it have access to the underlying Jupyter kernel.
It can run as a standalone application or as a server extension. When it serves a directory, the documentation says a new kernel is created for each notebook you click.
What hidden code does and does not mean
| Claim | Reality |
|---|---|
| Visitors cannot read the source | Hidden in the page by default, but treat it as visible, since the notebook files are what you deployed |
| Visitors cannot run code | They interact with widgets, which talk to a kernel, so the notebook's own logic decides what they can trigger |
| The dashboard is read only | Only if you wrote it that way |
| A directory listing is harmless | Serving a directory lists every notebook in it |
Risks to design out
- Serving a whole folder exposes notebooks you did not mean to publish, including scratch work.
- Credentials in cells or in the environment are available to the kernel the notebook runs in.
- Input widgets that feed text into file paths, shell commands or SQL turn visitors into authors of those operations.
- One kernel per visit means resource use grows with traffic, which can become a denial of service issue.
- Dependencies in the dashboard environment are exposed to the internet, so their vulnerabilities matter more than for a private notebook.
A pre-publish routine
- Copy only the notebooks you intend to share into a clean directory.
- Remove or rotate any credentials, and give the app a minimal account.
- Review every widget that takes free text and validate its use.
- Build the environment from a pinned lock file and scan it.
- Put the app behind authentication if the data is not public, and monitor kernel counts.
For a related look at another sharing tool see /resources/blog/what-does-gradio-share-true-expose-from-your-notebook.
Try it yourself
Click through it at your own pace, or open it full screen. Look at the list of packages a dashboard environment would carry, since each one is exposed once the app is public.
Safeguard's SBOM and dependency scanning can inventory that environment. Run the free scan at gold.safeguard.sh/scan.
Quick check
Does Voila run my notebook once or per visitor?
The documentation says a new kernel is created for each notebook you click when serving a directory, and widgets use the underlying kernel.
Are hidden code cells a security control?
No. They change what is shown, not what runs or who can reach the kernel.
Sources
- Using Voila, Voila documentation, fetched 19 October 2026.
Last reviewed: 19 October 2026.