# Security

## Reporting a vulnerability

Please report vulnerabilities privately through GitHub's
[private vulnerability reporting](https://github.com/Techtonique/pyr.js/security/advisories/new)
rather than in a public issue. Include a minimal page that reproduces the problem.

## Security model

- pyr.js has no server component and sends no telemetry. Code runs in the visitor's browser.
- The only network requests it makes are for the engines (Pyodide from jsDelivr, webR from
  webr.r-wasm.org), packages your code imports, and `src` files you reference.
- Results shown with `py-out` / `r-out` are inserted as text, never as HTML. Plots are drawn on canvases.
- Results passed with `py-then` / `r-then` go to the JavaScript function you name. If that function
  inserts them as HTML, sanitize them first.
- Anything in a page is visible to its visitors, including Python and R code. Never put secrets in it.
- Pin a version and add an `integrity` hash when loading pyr.js from a CDN (see the README).
