praetorian-inc / chariot-ui

Chariot Offensive Security Platform
https://preview.chariot.praetorian.com
MIT License
15 stars 6 forks source link
Praetorian Logo

Chariot Offensive Security Platform

Node Version NPM Version License Contributor Covenant Open Source Libraries Contributions Welcome

:book: Documentation :link: Chariot Platform :computer: Praetorian CLI

Table of Contents

Description

Chariot is an expert-driven, all-in-one offensive security platform that helps organizations shift from a reactive "assume breach" mentality to a prevention-first strategy. By actively seeking out vulnerabilities and addressing potential weaknesses before attackers can exploit them, Chariot ensures a robust security posture through continuous offensive security testing.

⚠️ This repository mirrors the SaaS offering at preview.chariot.praetorian.com, enabling you to customize your full user experience.

Key Features

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/praetorian-inc/chariot-ui.git
    cd chariot-ui
  2. Install dependencies:

    npm install
  3. Set up HTTPS certificates using mkcert:

    mkdir certs && cd certs
    npx mkcert create-ca
    npx mkcert create-cert
    cd ..

Running the Development Server

Start the development server:

npm start

This will start the app on https://localhost:3000.

Building the Project

To create a production build:

npm run build

This will generate optimized static files in the build directory.

Contributing

We welcome contributions from the community. To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

Please read our Code of Conduct before contributing.

Adding New Charts

To add new charts to the Chariot platform, contributors will need to define a new aggregate within the AggregateCollection. This process involves configuring a new defineAggregate instance, which shapes how data is processed and visualized within the chart.

Steps to Create a New Chart

  1. Define the Data Type: Ensure that the data type (e.g., Asset, Risk, Seed) is accurately defined in @/types. This TypeScript interface should clearly describe the structure of the data, which is essential for accurately accessing and aggregating the data fields.

  2. Create a New Aggregate: In the relevant aggregate file (e.g., src/utils/aggregates/asset.ts, src/utils/aggregates/seed.ts), utilize the defineAggregate function to define your new chart. Provide:

    • A meaningful label for the chart.
    • A function to extract the key for grouping data.
    • The field name (xField) for the grouping key.
    • The field name (yField) for the aggregated value.

    Example:

    defineAggregate<Risk>(
     'Count of Risks by Status',
     risk => risk.status,
     'status',
     'count'
    );
  3. Add to AggregateCollection: Include your new aggregate definition in the respective collection, making it available across the application.

  4. Utilize the Aggregate: Employ the runAggregate and getAggregates generic functions to execute and retrieve your new aggregate's results, respectively.

Types and Utilities

Support

If you have any questions or need support, please open an issue or reach out via support@praetorian.com.

License

This project is licensed under the MIT License - see the LICENSE file for details.