Skip to content

A fully script-driven operating system runtime that enables live system introspection, policy enforcement, tracing, and fault injection using only scripting languages and minimal assembly hooks.

License

Notifications You must be signed in to change notification settings

Quantum-Fiend/Scripted_System_Runtime

Repository files navigation

Scripted Runtime Control Plane

Scripted System Runtime

Enterprise-Grade Policy Enforcement & Real-Time Telemetry Engine

ArchitectureWorkflowFeaturesGetting Started

Status Runtime Security

⚡ Introduction

Scripted System Runtime (SSR) is a high-performance, polyglot orchestrator designed for autonomous policy enforcement and granular system telemetry.

Built for mission-critical environments, SSR acts as a hyper-visor for your application logic, ensuring that every process, thread, and event adheres to strict security policies defined in Ruby, while the core runtime (simulated or Lua-based) handles execution with millisecond precision. The Control Plane provides a state-of-the-art visualization layer for monitoring system health in real-time.


🏗️ Architecture

SSR employs a Hub-and-Spoke architecture to separate concerns between policy definition, execution, and telemetry.

System Architecture Visualization

Figure 1: Real-Time Analytics & Signal Processing Layer

Core Components

  1. Policy Compiler (policy_compiler.py):

    • Input: Ruby-based DSL (.rb) defining "Rules of Engagement".
    • Process: AST parsing and validation.
    • Output: Optimized JSON Policy Definitions for the runtime kernel.
  2. Runtime Kernel (runtime.lua / runtime_emulator.py):

    • Role: The "Brain" of the system.
    • Function: Ingests JSON policies, monitors system events (Process Spawns, Network I/O, File Access), and enforces rules via a Policy Interceptor.
    • Feedback: Emits structured logs and telemetry signals.
  3. Control Plane (dashboard_server.py):

    • Visual: A Dark-Mode, Glassmorphic Dashboard serving real-time insights.
    • API: REST endpoints (/api/stats, /api/logs) bridging the kernel and the frontend.
    • UX: Zero-latency chart updates using Canvas API.

🔄 Professional Workflow

The SSR workflow is designed for DevSecOps excellence, integrating development, security, and operations into a single continuous loop.

Event Stream & Workflow

Figure 2: Event Stream & Policy Enforcement Log

1. Definition Phase (Dev)

Developers or Security Engineers define policies in high-level Ruby.

policy "production_hardening" do
  rule "forbid_root_processes" do
    match :process, user: "root"
    action :block
  end
end

2. Compilation Phase (CI/CD)

The Policy Compiler validates the syntax and logic, rejecting ambiguous rules before they reach production. python policies/policy_compiler.py policies/hardening.rb policies/dist/production.json

3. Execution Phase (Runtime)

The Kernel loads the compiled policies hot-swapped into memory. It begins the Event Loop, intercepting every system call or simulated event against the active policy set.

4. Telemetry Phase (Ops)

Violations and metrics are streamed to the dashboard_server.

  • Green: Nominal Operation.
  • Amber: Warning / Near-miss.
  • Red: Critical Policy Violation (Blocked).

✨ Key Features

  • Electric Aesthetics: A fully custom Dark/Deep Purple theme designed to reduce eye strain and look stunning in command centers.
  • Polyglot Interoperability: Write policies in Ruby, run on Python/Lua, visualize in HTML5/JS.
  • Zero-Dependency Dashboard: No React/Vue bloat. Pure, high-performance Vanilla JS & Canvas for 60fps rendering.
  • Resilient Fallbacks: Auto-switches between Lua Core and Python Emulator based on environment capabilities.

🚀 Getting Started

Prerequisites

  • Python 3.8+
  • (Optional) Lua 5.3+

Quick Start

We provide a unified orchestration script for instant startup:

./start_all.ps1

This will:

  1. Check your environment.
  2. Compile default policies.
  3. Launch the Runtime Kernel.
  4. Start the Control Plane at http://localhost:8000.

Designed with ❤️ for High-Assurance Systems.

About

A fully script-driven operating system runtime that enables live system introspection, policy enforcement, tracing, and fault injection using only scripting languages and minimal assembly hooks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published