Skip to main content

Cognitive Code Security Engine - Self-evolving, AI-powered threat detection

Project description

🧠 NeuralSpace – Cognitive Security Universe

Python 3.9+ License: MIT PyPI version CI/CD

NeuralSpace is a self-organizing, zero‑trust security mesh for code. It combines a Covalent Tree (self‑evolving topology), a Hive Mind (emergent intelligence), AST/CFG Data‑Flow Analysis, and a Zero‑Trust Security Mesh (RSA 2048 signing) into a single ultra‑lightweight (~8 KB) system.

📌 Version 4.1.0 — Ship pre‑trained weights, fixed importlib+chr() evasion, raised default threshold to 0.25, added --threshold CLI flag.


🔥 The Problem We Solve

Current Tool Limitation NeuralSpace Advantage
Traditional AV Relies on known signatures. Blocks zero‑day obfuscated threats.
SAST (SonarQube) 99.5% false positives. Contextual detection + Taint Analysis.
Transformer Models Huge, slow, cloud‑dependent. Lightweight (~8 KB), runs instantly on CPU.
File Watchers React to files, don't understand content. Routes files dynamically into a living knowledge tree.

✨ Key Features (v4.1.0)

  • 🧬 Self‑Evolving Topology – The Covalent Tree spawns new branches anticipatorily when it detects structural drift (drift velocity > 0.5).
  • 🌊 True Data‑Flow Analysis – Tracks tainted input (input(), sys.argv) to dangerous sinks (exec, eval, os.system). Catches importlib + chr() evasions.
  • 🔒 Zero‑Trust Security Mesh – All threat reports are cryptographically signed with RSA 2048. Nodes maintain a public key registry (PKI) and earn trust over time.
  • 🧠 Hive Mind (Emergent Intelligence) – Multiple agents communicate and form a consensus on threats (consensus ≥ 0.7).
  • 🛡️ Adversarial Robustness – Trained on obfuscated variants (getattr, string‑concat, __import__, chr()).
  • 🌍 Polyglot – Scans Python, JavaScript, TypeScript, Go, and Rust (Tree‑Sitter AST parsing).
  • ⚡ Ultra‑Lightweight & Local – ~8 KB model, trains in <60 seconds on CPU.
  • 🔧 CLI Configurable – New --threshold flag to adjust sensitivity.
  • 🤖 GitHub App Integration – Auto‑scans Pull Requests and posts comments.

🏗️ How It Works

  1. Tokenization + Data‑Flow – Code is parsed via Tree‑Sitter AST; data‑flow tracks tainted input to dangerous sinks.
  2. Routing – The vector descends the Covalent Tree. If it matches a child node (cosine similarity > 0.85), it dives deeper.
  3. Hive Mind Consensus – All active nodes vote on the threat. The collective decision overrides individual errors.
  4. Judgment – The terminal node's PureNeuralAtom computes Sentinel (S) and Logic (L) scores.
  5. Enforcement – If S > threshold (default 0.25) or L < 0.2, the file is quarantined and cryptographically reported.
  6. Evolution – If the file is allowed but deviates significantly (drift velocity > 0.5), the tree anticipatorily fractures and spawns a new child node.

🚀 Quick Start

Installation (One Command)

pip install neuralspace-ai

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuralspace_ai-4.1.3.tar.gz (332.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuralspace_ai-4.1.3-py3-none-any.whl (351.1 kB view details)

Uploaded Python 3

File details

Details for the file neuralspace_ai-4.1.3.tar.gz.

File metadata

  • Download URL: neuralspace_ai-4.1.3.tar.gz
  • Upload date:
  • Size: 332.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for neuralspace_ai-4.1.3.tar.gz
Algorithm Hash digest
SHA256 b1f667f6191238caaa53aa5470370d97d688c4731f87fb89a5bcfff4237d4d61
MD5 fa5501ed40769cd4dca194e08051f625
BLAKE2b-256 cdfe93cdffc4124bc05f0862cc7ef5fe57ddc5a9b3ff7f28baf398182e524163

See more details on using hashes here.

File details

Details for the file neuralspace_ai-4.1.3-py3-none-any.whl.

File metadata

  • Download URL: neuralspace_ai-4.1.3-py3-none-any.whl
  • Upload date:
  • Size: 351.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for neuralspace_ai-4.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d1391a99bc8cd0ce137f997d6235bb7473841ea85308b1f734f519601e95d0ca
MD5 bddf5bd8328dd285111bbd2c77e88465
BLAKE2b-256 3f1b4e4b8d4d6583ce8764d5d0aaaab07f60877b2676be3309336dec5c45cdbe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page