diff --git a/.devcontainer/.devcontainer.json b/.devcontainer/.devcontainer.json new file mode 100644 index 00000000..53cf50f1 --- /dev/null +++ b/.devcontainer/.devcontainer.json @@ -0,0 +1,46 @@ +{ + "name": "XCore Development", + "build": { + "dockerfile": "Dockerfile" + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "charliermarsh.ruff", + "njpwerner.autodocstring", + "tamasfe.even-better-toml", + "redhat.vscode-yaml", + "ms-azuretools.vscode-docker", + "mutwo.python-isort", + "ms-python.black-formatter" + ], + "settings": { + "python.defaultInterpreterPath": "${containerWorkspaceFolder}/.venv/bin/python", + "python.terminal.activateEnvInSelectedTerminal": true, + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.organizeImports": "always" + }, + "python.formatting.provider": "none", + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter" + } + } + } + }, + "features": { + "ghcr.io/devcontainers/features/postgres:1": { + "version": "15" + }, + "ghcr.io/devcontainers/features/redis:1": { + "version": "latest" + } + }, + "forwardPorts": [ + 8000 + ], + "postCreateCommand": "make install", + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..9c4eddc7 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,22 @@ +# .devcontainer/Dockerfile +FROM mcr.microsoft.com/devcontainers/python:3.12 + +# Install system dependencies +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends \ + build-essential \ + curl \ + git \ + make \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# Install Poetry +USER vscode +RUN curl -sSL https://install.python-poetry.org | python3 - + +# Add Poetry to PATH +ENV PATH="/home/vscode/.local/bin:$PATH" + +# Configure Poetry +RUN poetry config virtualenvs.in-project true diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..53cf50f1 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,46 @@ +{ + "name": "XCore Development", + "build": { + "dockerfile": "Dockerfile" + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "charliermarsh.ruff", + "njpwerner.autodocstring", + "tamasfe.even-better-toml", + "redhat.vscode-yaml", + "ms-azuretools.vscode-docker", + "mutwo.python-isort", + "ms-python.black-formatter" + ], + "settings": { + "python.defaultInterpreterPath": "${containerWorkspaceFolder}/.venv/bin/python", + "python.terminal.activateEnvInSelectedTerminal": true, + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.organizeImports": "always" + }, + "python.formatting.provider": "none", + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter" + } + } + } + }, + "features": { + "ghcr.io/devcontainers/features/postgres:1": { + "version": "15" + }, + "ghcr.io/devcontainers/features/redis:1": { + "version": "latest" + } + }, + "forwardPorts": [ + 8000 + ], + "postCreateCommand": "make install", + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/GEMINI.md b/GEMINI.md index 9374e76c..c99266bc 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -1,7 +1,7 @@ # GEMINI.md - XCore Framework Context ## Project Overview -**XCore** is a high-performance, plugin-first orchestration framework built on top of **FastAPI**. It is designed to load, isolate, and manage modular extensions (plugins) in a secure, sandboxed environment. +**XCore v2.1.2** is a high-performance, plugin-first orchestration framework built on top of **FastAPI**. It is designed to load, isolate, and manage modular extensions (plugins) in a secure, sandboxed environment. ### Core Architecture - **Xcore Kernel**: The central orchestrator managing the runtime, sandbox, and communication. diff --git a/README.md b/README.md index 4a6bd5b7..17be7f8f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ⚡ XCore Framework -[![Version](https://img.shields.io/badge/version-2.1.1-blue.svg)](https://github.com/traoreera/xcore) +[![Version](https://img.shields.io/badge/version-2.1.2-blue.svg)](https://github.com/traoreera/xcore) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/) [![FastAPI](https://img.shields.io/badge/FastAPI-0.118+-green.svg)](https://fastapi.tiangolo.com/) diff --git a/SECURITY.md b/SECURITY.md index 034e8480..cffc1450 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,20 +2,30 @@ ## Supported Versions -Use this section to tell people about which versions of your project are -currently being supported with security updates. +The following versions of XCore are currently supported with security updates: | Version | Supported | | ------- | ------------------ | -| 5.1.x | :white_check_mark: | -| 5.0.x | :x: | -| 4.0.x | :white_check_mark: | -| < 4.0 | :x: | +| 2.1.x | :white_check_mark: | +| 2.0.x | :white_check_mark: | +| < 2.0 | :x: | ## Reporting a Vulnerability -Use this section to tell people how to report a vulnerability. +We take the security of XCore seriously. If you believe you have found a security vulnerability, please report it to us responsibly. -Tell them where to go, how often they can expect to get an update on a -reported vulnerability, what to expect if the vulnerability is accepted or -declined, etc. +**Please do not report security vulnerabilities through public GitHub issues.** + +### How to report +- Email your findings to: **68350805+traoreera@users.noreply.github.com** +- Provide a detailed description of the vulnerability. +- Include steps to reproduce the issue (PoC scripts are appreciated). +- Mention the version(s) of XCore affected. + +### What to expect +- You will receive an acknowledgment of your report within 48 hours. +- We will provide regular updates on the progress of the fix. +- Once the vulnerability is confirmed and fixed, we will coordinate a public disclosure. +- We ask for your patience and cooperation to protect our users during this process. + +Thank you for helping keep XCore secure! diff --git a/doc/README.md b/doc/README.md index 41fe3da7..ea58433a 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,6 +1,6 @@ # ⚡ XCore Framework -[![Version](https://img.shields.io/badge/version-2.0.0-blue.svg)](https://github.com/traoreera/xcore) +[![Version](https://img.shields.io/badge/version-2.1.2-blue.svg)](https://github.com/traoreera/xcore) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/) [![FastAPI](https://img.shields.io/badge/FastAPI-0.118+-green.svg)](https://fastapi.tiangolo.com/) diff --git a/doc/versions.md b/doc/versions.md index ffba2ca0..1b8dd840 100644 --- a/doc/versions.md +++ b/doc/versions.md @@ -1,6 +1,12 @@ # Versions de XCore -## v2.0.0 (Version Actuelle) +## v2.1.2 (Version Actuelle) +- **Stabilité** : Correction de 13 échecs de tests critiques. +- **Sécurité** : Scanner AST amélioré pour détecter les contournements via alias d'imports. +- **Performance** : Intégration de `pytest-benchmark` pour le suivi des performances noyau. +- **Qualité** : Hooks `pre-commit` synchronisés avec `make lint-fix` et tests automatiques. + +## v2.0.0 - **Architecture Plugin-First** : Nouveau noyau modulaire. - **Sandboxing Avancé** : Isolation par sous-processus et FilesystemGuard. - **Service Container** : Injection de dépendances pour DB, Cache et Scheduler. diff --git a/poetry.lock b/poetry.lock index 4fbab1ec..f0d20760 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.3.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.3.4 and should not be changed by hand. [[package]] name = "aiocache" @@ -360,18 +360,6 @@ files = [ [package.dependencies] pycparser = {version = "*", markers = "implementation_name != \"PyPy\""} -[[package]] -name = "cfgv" -version = "3.5.0" -description = "Validate configuration and produce human readable error messages." -optional = false -python-versions = ">=3.10" -groups = ["main"] -files = [ - {file = "cfgv-3.5.0-py2.py3-none-any.whl", hash = "sha256:a8dc6b26ad22ff227d2634a65cb388215ce6cc96bbcc5cfde7641ae87e8dacc0"}, - {file = "cfgv-3.5.0.tar.gz", hash = "sha256:d5b1034354820651caa73ede66a6294d6e95c1b00acc5e9b098e917404669132"}, -] - [[package]] name = "charset-normalizer" version = "3.4.7" @@ -545,7 +533,7 @@ version = "7.13.5" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.10" -groups = ["main", "dev"] +groups = ["main"] files = [ {file = "coverage-7.13.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0723d2c96324561b9aa76fb982406e11d93cdb388a7a7da2b16e04719cf7ca5"}, {file = "coverage-7.13.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:52f444e86475992506b32d4e5ca55c24fc88d73bcbda0e9745095b28ef4dc0cf"}, @@ -741,18 +729,6 @@ files = [ {file = "csscompressor-0.9.5.tar.gz", hash = "sha256:afa22badbcf3120a4f392e4d22f9fff485c044a1feda4a950ecc5eba9dd31a05"}, ] -[[package]] -name = "distlib" -version = "0.4.0" -description = "Distribution utilities" -optional = false -python-versions = "*" -groups = ["main"] -files = [ - {file = "distlib-0.4.0-py2.py3-none-any.whl", hash = "sha256:9659f7d87e46584a30b5780e43ac7a2143098441670ff0a49d5f9034c54a6c16"}, - {file = "distlib-0.4.0.tar.gz", hash = "sha256:feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d"}, -] - [[package]] name = "dnspython" version = "2.8.0" @@ -1042,18 +1018,6 @@ files = [ {file = "fastar-0.11.0.tar.gz", hash = "sha256:aa7f100f7313c03fdb20f1385927ba95671071ba308ad0c1763fef295e1895ce"}, ] -[[package]] -name = "filelock" -version = "3.29.0" -description = "A platform independent file lock." -optional = false -python-versions = ">=3.10" -groups = ["main"] -files = [ - {file = "filelock-3.29.0-py3-none-any.whl", hash = "sha256:96f5f6344709aa1572bbf631c640e4ebeeb519e08da902c39a001882f30ac258"}, - {file = "filelock-3.29.0.tar.gz", hash = "sha256:69974355e960702e789734cb4871f884ea6fe50bd8404051a3530bc07809cf90"}, -] - [[package]] name = "flake8" version = "7.3.0" @@ -1416,21 +1380,6 @@ http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] zstd = ["zstandard (>=0.18.0)"] -[[package]] -name = "identify" -version = "2.6.19" -description = "File identification library for Python" -optional = false -python-versions = ">=3.10" -groups = ["main"] -files = [ - {file = "identify-2.6.19-py2.py3-none-any.whl", hash = "sha256:20e6a87f786f768c092a721ad107fc9df0eb89347be9396cadf3f4abbd1fb78a"}, - {file = "identify-2.6.19.tar.gz", hash = "sha256:6be5020c38fcb07da56c53733538a3081ea5aa70d36a156f83044bfbf9173842"}, -] - -[package.extras] -license = ["ukkonen"] - [[package]] name = "idna" version = "3.11" @@ -1919,18 +1868,6 @@ gssapi = ["gssapi (==1.8.3)"] telemetry = ["opentelemetry-api (==1.33.1)", "opentelemetry-exporter-otlp-proto-http (==1.33.1)", "opentelemetry-sdk (==1.33.1)"] webauthn = ["fido2 (==1.1.2)"] -[[package]] -name = "nodeenv" -version = "1.10.0" -description = "Node.js virtual environment builder" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -groups = ["main"] -files = [ - {file = "nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827"}, - {file = "nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb"}, -] - [[package]] name = "opshero" version = "0.1.6" @@ -2130,7 +2067,7 @@ version = "4.9.6" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.10" -groups = ["main", "dev", "docs"] +groups = ["dev", "docs"] files = [ {file = "platformdirs-4.9.6-py3-none-any.whl", hash = "sha256:e61adb1d5e5cb3441b4b7710bea7e4c12250ca49439228cc1021c00dcfac0917"}, {file = "platformdirs-4.9.6.tar.gz", hash = "sha256:3bfa75b0ad0db84096ae777218481852c0ebc6c727b3168c1b9e0118e458cf0a"}, @@ -2152,25 +2089,6 @@ files = [ dev = ["pre-commit", "tox"] testing = ["coverage", "pytest", "pytest-benchmark"] -[[package]] -name = "pre-commit" -version = "4.6.0" -description = "A framework for managing and maintaining multi-language pre-commit hooks." -optional = false -python-versions = ">=3.10" -groups = ["main"] -files = [ - {file = "pre_commit-4.6.0-py2.py3-none-any.whl", hash = "sha256:e2cf246f7299edcabcf15f9b0571fdce06058527f0a06535068a86d38089f29b"}, - {file = "pre_commit-4.6.0.tar.gz", hash = "sha256:718d2208cef53fdc38206e40524a6d4d9576d103eb16f0fec11c875e7716e9d9"}, -] - -[package.dependencies] -cfgv = ">=2.0.0" -identify = ">=1.0.0" -nodeenv = ">=0.11.1" -pyyaml = ">=5.1" -virtualenv = ">=20.10.0" - [[package]] name = "psutil" version = "7.2.2" @@ -2588,7 +2506,7 @@ version = "7.1.0" description = "Pytest plugin for measuring coverage." optional = false python-versions = ">=3.9" -groups = ["main", "dev"] +groups = ["main"] files = [ {file = "pytest_cov-7.1.0-py3-none-any.whl", hash = "sha256:a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678"}, {file = "pytest_cov-7.1.0.tar.gz", hash = "sha256:30674f2b5f6351aa09702a9c8c364f6a01c27aae0c1366ae8016160d1efc56b2"}, @@ -2602,36 +2520,6 @@ pytest = ">=7" [package.extras] testing = ["process-tests", "pytest-xdist", "virtualenv"] -[[package]] -name = "pytest-cover" -version = "3.0.0" -description = "Pytest plugin for measuring coverage. Forked from `pytest-cov`." -optional = false -python-versions = "*" -groups = ["dev"] -files = [ - {file = "pytest-cover-3.0.0.tar.gz", hash = "sha256:5bdb6c1cc3dd75583bb7bc2c57f5e1034a1bfcb79d27c71aceb0b16af981dbf4"}, - {file = "pytest_cover-3.0.0-py2.py3-none-any.whl", hash = "sha256:578249955eb3b5f3991209df6e532bb770b647743b7392d3d97698dc02f39ebb"}, -] - -[package.dependencies] -pytest-cov = ">=2.0" - -[[package]] -name = "pytest-coverage" -version = "0.0" -description = "Pytest plugin for measuring coverage. Forked from `pytest-cov`." -optional = false -python-versions = "*" -groups = ["dev"] -files = [ - {file = "pytest-coverage-0.0.tar.gz", hash = "sha256:db6af2cbd7e458c7c9fd2b4207cee75258243c8a81cad31a7ee8cfad5be93c05"}, - {file = "pytest_coverage-0.0-py2.py3-none-any.whl", hash = "sha256:dedd084c5e74d8e669355325916dc011539b190355021b037242514dee546368"}, -] - -[package.dependencies] -pytest-cover = "*" - [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -2647,26 +2535,6 @@ files = [ [package.dependencies] six = ">=1.5" -[[package]] -name = "python-discovery" -version = "1.2.2" -description = "Python interpreter discovery" -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "python_discovery-1.2.2-py3-none-any.whl", hash = "sha256:e1ae95d9af875e78f15e19aed0c6137ab1bb49c200f21f5061786490c9585c7a"}, - {file = "python_discovery-1.2.2.tar.gz", hash = "sha256:876e9c57139eb757cb5878cbdd9ae5379e5d96266c99ef731119e04fffe533bb"}, -] - -[package.dependencies] -filelock = ">=3.15.4" -platformdirs = ">=4.3.6,<5" - -[package.extras] -docs = ["furo (>=2025.12.19)", "sphinx (>=9.1)", "sphinx-autodoc-typehints (>=3.6.3)", "sphinxcontrib-mermaid (>=2)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.5.4)", "pytest (>=8.3.5)", "pytest-mock (>=3.14)", "setuptools (>=75.1)"] - [[package]] name = "python-dotenv" version = "1.2.2" @@ -3620,24 +3488,6 @@ dev = ["Cython (>=3.0,<4.0)", "setuptools (>=60)"] docs = ["Sphinx (>=4.1.2,<4.2.0)", "sphinx_rtd_theme (>=0.5.2,<0.6.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)"] test = ["aiohttp (>=3.10.5)", "flake8 (>=6.1,<7.0)", "mypy (>=0.800)", "psutil", "pyOpenSSL (>=25.3.0,<25.4.0)", "pycodestyle (>=2.11.0,<2.12.0)"] -[[package]] -name = "virtualenv" -version = "21.3.0" -description = "Virtual Python Environment builder" -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "virtualenv-21.3.0-py3-none-any.whl", hash = "sha256:4d28ee41f6d9ec8f1f00cd472b9ffbcedda1b3d3b9a575b5c94a2d004fd51bd7"}, - {file = "virtualenv-21.3.0.tar.gz", hash = "sha256:733750db978ec95c2d8eb4feadaa57091002bce404cb39ba69899cf7bd28944e"}, -] - -[package.dependencies] -distlib = ">=0.3.7,<1" -filelock = {version = ">=3.24.2,<4", markers = "python_version >= \"3.10\""} -platformdirs = ">=3.9.1,<5" -python-discovery = ">=1.2.2" - [[package]] name = "watchdog" version = "6.0.0" @@ -3877,4 +3727,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = ">=3.11,<4.0" -content-hash = "a51550b5b5268ed2290a691e71e17447e43b0c00b9236f6301a3d7564ed6d926" +content-hash = "3fc39d181a1260ea8c089aa5795d75d637eabf367df2e52ed3d0c31d9abb48ee" diff --git a/pyproject.toml b/pyproject.toml index 456daede..10b5a842 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xcore" -version = "2.0.0" +version = "2.1.2" description = "for base html core app" authors = ["Eliezer Traore <68350805+traoreera@users.noreply.github.com>"] license = "MIT" diff --git a/xcore/__version__.py b/xcore/__version__.py index 876c2e3e..d07c7d60 100644 --- a/xcore/__version__.py +++ b/xcore/__version__.py @@ -1,4 +1,4 @@ -__version__ = "2.1.1" -__version_info__ = (2, 1, 1) +__version__ = "2.1.2" +__version_info__ = (2, 1, 2) __author__ = "xcore contributors" __license__ = "MIT"