A simple web application where you can create, edit and validate falco rules. This is a quick solution for users wanting to easily check the accuracy of their custom rules. This application is completely client side and doesn't make calls to any backend server. It leverages the power of WebAssembly to test your rules.
Falco-playground is hosted here: https://falcosecurity.github.io/falco-playground
Please refer to the contributing guide and the code of conduct for more information on how to contribute.
This application is built using React as its front-end framework and incorporates TypeScript for enhanced type-safety. It also uses Vite as it's build tool.
npm install
Since falco-playground
uses WebAssembly, it relies on a .wasm
file linked to a .js
file. You can find the falco.js
and falco.wasm
in the lastest completed ci
build of falco.
- Go to https://github.com/falcosecurity/falco/actions/workflows/ci.yml
- Select a sucessful workflow.
- Download the
falco-*-wasm.tar.gz
in the Artifact section below.
Since WebAssembly files (.wasm
) can't be transpiled by the bundler, we need to ensure they remain static. To achieve this, we should relocate the falco.wasm
file to the public
directory. Additionally, for the application to interact with falco.wasm effectively, we should move falco.js
to the hooks
directory.
After extracting falco-*-wasm.tar.gz
, falco.js
and falco.wasm
can be found at falco-*-wasm/usr/bin
.
- Move
falco.wasm
intopublic
- Move
falco.js
intosrc/Hooks
npm run dev
falco-playground
uses cypress as it's testing tool.
npm run cy:open
npm run cy:run