Coder Social home page Coder Social logo

falcosecurity / falco-playground Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 17.0 133.63 MB

Web-application used to validate Falco rules and test against scap file

Home Page: http://play.falco.org

License: Apache License 2.0

HTML 1.45% TypeScript 87.83% CSS 5.88% JavaScript 4.84%
hacktoberfest wasm

falco-playground's People

Contributors

anniepauline avatar antidoid avatar caique-rd avatar jasondellaluce avatar leogr avatar lucaguerra avatar mikegcoleman avatar mukeshmx avatar rohith-raju avatar shreyass-ranganatha avatar virajsazzala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

falco-playground's Issues

Wasm download status bar

Motivation

Right now, we don't have a proper way to inform the user about the status of the wasm file. The Wasm file is around 9 MB (as of now) and it takes a while to download. 1 min 30 sec in my case.

If it's the user's first visit, it takes quite a bit of time and during that time user is blocked. After the first visit, the wasm file is cached and loaded in a few seconds the second time around.

First visit (wasm is not cached)

Screenshot 2023-10-11 at 4 02 13 PM

Second visit (wasm is cached)

Screenshot 2023-10-11 at 4 05 35 PM

Feature

During this period, a user might feel the website is broken. Although efforts are being made to reduce the wasm file, It would be nice to indicate to the user the current status of the wasm file through a progress bar. Here's an example

Screenshot 2023-10-11 at 3 54 54 PM

Link: https://ant.design/components/progress

To reproduce this error , load the website in incognito mode.

Test case to check the maximum shareable file size

Motivation

Right now, the share button base64 encodes the entire rules written in the editor.

Feature

We need to check the maximum amount of rules that can be encoded. To accomplish this, we need to attempt to break the functionality of the share button by continuously adding more rules. We need to find that threshold and alert the user to prevent inconsistencies.

const handleShare = () => {
const urlConstructor = new URLSearchParams();
const data = encodedYaml(code);
urlConstructor.append("code", data);
const URL = `${window.location.origin}${
window.location.pathname
}#/?${urlConstructor.toString()}`;
navigator.clipboard.writeText(URL);
message.success("Copied URL to clipboard");
};

fix: Incorrect Testing Command in `README.md`

Describe the bug

Incorrect testing command in the README.md file. Under CLI testing, the command does not start testing.

Expected behaviour

The command should use cypress to start testing.

Support Dark Mode

Motivation

Right now falco-playground can be used in light mode.

Feature

Add support to Dark mode

Automate downloading falco artifacts

Motivation

Right now, the Steps involved in downloading the artifacts are quite cumbersome.
https://github.com/falcosecurity/falco-playground#steps-to-download-additional-artifacts

Feature
Create a download script that automatically downloads the artifact and moves them into specific folders. Something like npm run download

"predeploy": "npm run build",
"deploy": "gh-pages -d dist",
"dev": "vite",
"build": "tsc && vite build --base=./ ",
"cy:open": "cypress open",
"cy:run": "cypress run",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"fix": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix",

Fix: Github star button

Describe the bug

Right now, GitHub star button isn't showing the correct value.

<GitHubButton
href="https://github.com/falcosecurity/falco-playground"
data-size="large"
data-show-count="true"
aria-label="Star falcosecurity/falco-playground on GitHub"
>
Star
</GitHubButton>

Screenshot 2023-09-07 at 7 09 27 PM

Reference: https://buttons.github.io/

How to reproduce it

Go to falco-playground

Expected behaviour

The value on the playground should correlate with the actual amount of stars. As of now it is

Screenshot 2023-09-07 at 7 13 07 PM

Add more test coverage

Motivation

Right now there are only a few test cases that cover basic functionality process.

it("Check for nav bars", () => {
cy.visit("/");
cy.contains("Blog");
cy.contains("Docs");
cy.contains("Community");
cy.contains("About");
});
it("Check for Monaco Editor", () => {
cy.visit("/");
cy.get(".monaco-editor");
});
it("Check for Buttons and terminal", () => {
cy.visit("/");
cy.get("button").should("be.enabled").contains("Run");
cy.get("button").should("be.enabled").contains("Import Yaml");
cy.get("button").should("be.enabled").contains("Copy");
cy.get("button").should("be.enabled").contains("Download");
cy.get("button").should("be.enabled").contains("Load Examples");
cy.get("button").should("be.enabled").contains("Run with scap");
cy.get("button").should("be.enabled").contains("Share");
cy.get("button").should("be.enabled").contains("Upload scap and run");
const date = new Date();
cy.get(".terminal-success").contains(date.getDate(), { timeout: 25000 });
});

Feature

Add more test cases that cover features and it's edge cases like

  • Share
  • Import from yaml
  • Copy
  • Upload Scap and run
  • Download
  • Load examples
  • Run with Scap

Allow selecting the Falco version we want to run the playground with

Motivation

While not every version of Falco can be executed with every playground version, it would be nice to allow users to select what they would like to have a drop-down menu where to select the version of Falco they want to test in the playground. Now that we have introduced releases, I believe this became a possibility

Alternatives

Run only with the latest released version, like it is today

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.