mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 08:02:38 +00:00
`execute_component` is mounted in `unauthed_service()`; for an anonymous-mode app it is reachable without authentication and the job runs on-behalf-of the app publisher. A run-mode no-id inline `raw_code` runnable is authorized only against the `sha256(content)` policy pin, so every other `raw_code` field was caller-controlled: `lock` is installed verbatim (a PEP 508 direct URL builds an sdist and runs `setup.py`; a bun lock runs `postinstall`), `modules` are inline sources, and `hash` becomes the job's `runnable_id`, making the worker fetch and run a deployed script by hash instead of the pinned content — each is code execution as the publisher. This run-mode no-id arm is legacy back-compat: current deploys assign an `app_script` id (reduce_app) and take the id-based arm, which reads the server-stored lock. In run mode, rebuild the inline payload from the pin-authorized fields only (`content`, `language`, `path`, `cache_ttl`) and default the rest, so a caller cannot smuggle a lock, modules, hash or any future field into a publisher-run job. Preview mode (the app editor / `wmill app dev`, run as the authenticated non-operator caller — the `/jobs/run/preview` equivalent) is unchanged and still honors caller-supplied fields. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Windmill Backend
This folder holds all backend components, the src/ folder only contains files used to build the "root" binary.
Components
| name | description |
|---|---|
| windmill-api | The API server, exposing functionality to other components and the frontend |
| windmill-audit | Contains audit functionality, allowing different components to record important actions |
| windmill-common | Common code shared by all crates |
| windmill-queue | Contains job & flow queuing functionality, commonly written to by the API server and read from by workers |
| windmill-worker | The worker. Used to process and execute flows & jobs. |
| parsers | Contains code to parse signatures in different langauges. |
Compile sqlx for offline ci
cargo sqlx prepare --workspace -- --bin windmill --features enterprise