diff --git a/AirlockTools_Client.py b/AirlockTools_Client.py index c2d4093..03d3c8f 100644 --- a/AirlockTools_Client.py +++ b/AirlockTools_Client.py @@ -24,13 +24,14 @@ import logging import os import tempfile + import dotenv import urllib3 from services.API import AirlockAPIWrapper from services.security import getAPI from utils.setup import get_base_directory, setup -from utils.TUI import run_AirlockTools +from utils.TUI import run_Loxide from utils.utils import irtang urllib3.disable_warnings( @@ -74,15 +75,16 @@ def main(): raise - api_key = getAPI(username, "AirlockTools") + api_key = getAPI(username, "Loxide") if api_key is None: - raise ValueError("API key for AirlockTools is missing.") + raise ValueError("API key for Loxide is missing.") api = AirlockAPIWrapper( base_url=str(os.getenv("URL")), api_key=api_key, ) - run_AirlockTools(api) + run_Loxide(api) + diff --git a/README.md b/README.md index d647cdc..8257c1c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# 🛡️ Airlock Tools +# 🛡️ Loxide -Python toolkit for secure, auditable, and automated airlock agent and policy management. Designed for enterprise environments, it supports advanced policy workflows, device tracking, and terminal-based interaction. +Python/Rust/Oxide toolkit for secure, auditable, and automated airlock agent and policy management. Designed for enterprise environments, it supports advanced policy workflows, device tracking, and terminal-based interaction. --- @@ -51,7 +51,7 @@ Python toolkit for secure, auditable, and automated airlock agent and policy man ## 📜 License -**AirlockTools** is licensed under the **GNU Affero General Public License v3.0**. +**Loxide** is licensed under the **GNU Affero General Public License v3.0**. You may copy, distribute, and modify the software under the terms of the AGPL-3.0 license. diff --git a/airlock_libs/airlock_libs.pyi b/airlock_libs/airlock_libs.pyi index 2e061f1..cf09a82 100644 --- a/airlock_libs/airlock_libs.pyi +++ b/airlock_libs/airlock_libs.pyi @@ -1,4 +1,5 @@ -from typing import Dict, List, Optional +from typing import Dict, List + def pull_policy_exec_histories(self, type: List[str], checkpoint: str, policy: List[str]) -> str: """Retrieve execution history logs.""" diff --git a/loading.png b/loading.png index 1dc81bd..a10998c 100644 Binary files a/loading.png and b/loading.png differ diff --git a/models/execution.py b/models/execution.py index 13281d1..57cf7b0 100644 --- a/models/execution.py +++ b/models/execution.py @@ -28,7 +28,6 @@ import pandas as pd import airlock_libs from services.API import AirlockAPIWrapper -from services.policyhandler import pullPolicyExechistories from utils.configmanager import get_protected_value, load_env_json from utils.utils import colorText, regulator diff --git a/services/policyhandler.py b/services/policyhandler.py index 5acc422..0ba34c7 100644 --- a/services/policyhandler.py +++ b/services/policyhandler.py @@ -177,8 +177,10 @@ def pullPolicyExechistories( def getPolicyInfo(api: AirlockAPIWrapper, policy, type, days): + import airlock_libs + executionhist_policy = pd.DataFrame() - exehist = pullPolicyExechistories(api, policy, type, days, True) + exehist = airlock_libs.pull_policy_exec_histories(api, policy.name, str(type), days) if exehist is not None: data = json.loads(exehist) executionhist_policy = pd.DataFrame(data["response"]["exechistories"]) diff --git a/utils/configmanager.py b/utils/configmanager.py index 62c2bdf..c2c5cdf 100644 --- a/utils/configmanager.py +++ b/utils/configmanager.py @@ -52,7 +52,7 @@ def load_protected_config() -> dict: except FileNotFoundError: logging.warning("⚠️ system_config.json not found. Using built-in defaults.") system_config = { - "APPNAME": "AirlockTools", + "APPNAME": "Loxide", "PATH_EXCLUSION_CONST": 4, "MIN_FILES_FOR_PATH": 4, "VT_THREAT_TOLERANCE": 4, diff --git a/utils/setup.py b/utils/setup.py index f7ba7f2..0a74398 100644 --- a/utils/setup.py +++ b/utils/setup.py @@ -31,15 +31,15 @@ def get_base_directory() -> Path: system = platform.system() home = Path.home() if system == 'Windows': - return Path(os.getenv('APPDATA', home / 'AppData' / 'Roaming')) / "AirlockTools" + return Path(os.getenv('APPDATA', home / 'AppData' / 'Roaming')) / "Loxide" elif system == 'Darwin': - return home / 'Library' / 'Application Support' / "AirlockTools" + return home / 'Library' / 'Application Support' / "Loxide" else: - return home / '.local' / 'share' / "AirlockTools" + return home / '.local' / 'share' / "Loxide" def configure_logging(log_dir: Path, log_level: str = "DEBUG"): - log_file = log_dir / "airlocktools.log" + log_file = log_dir / "Loxide.log" config = { "version": 1, # Required key for dictConfig format version @@ -82,7 +82,7 @@ def configure_logging(log_dir: Path, log_level: str = "DEBUG"): try: config["handlers"]["eventlog"] = { "class": "logging.handlers.NTEventLogHandler", - "appname": "AirlockTools", # Event log source name + "appname": "Loxide", # Event log source name "level": "CRITICAL", # Only log critical errors "formatter": "simple", # Use simple format } @@ -108,7 +108,7 @@ def load_system_config() -> dict: except FileNotFoundError: logging.warning("⚠️ system_config.json not found. Using built-in defaults.") return { - "APPNAME": "AirlockTools", + "APPNAME": "Loxide", "LOG_LEVEL": "DEBUG", "PATH_EXCLUSION_CONST": 4, "MIN_FILES_FOR_PATH": 4, diff --git a/utils/test.py b/utils/test.py new file mode 100644 index 0000000..e69de29 diff --git a/utils/tui.py b/utils/tui.py index 36deeda..ba332fe 100644 --- a/utils/tui.py +++ b/utils/tui.py @@ -366,7 +366,7 @@ class MainMenuScreen(Screen): # --------------------------------------------------------------------------- # 2) APP # --------------------------------------------------------------------------- -class AirlockTools(App): +class Loxide(App): CSS = """ #logo { width: 100%; @@ -447,7 +447,7 @@ def _run_legacy_job(func, args, kwargs) -> None: # --------------------------------------------------------------------------- # 4) PUBLIC ENTRYPOINT # --------------------------------------------------------------------------- -def run_AirlockTools(api: AirlockAPIWrapper) -> None: +def run_Loxide(api: AirlockAPIWrapper) -> None: global _PENDING_JOB while True: @@ -456,7 +456,7 @@ def run_AirlockTools(api: AirlockAPIWrapper) -> None: dotenv.load_dotenv(dotenv_path=env_path, override=True) _PENDING_JOB = None - app = AirlockTools(api) + app = Loxide(api) try: app.run() @@ -486,4 +486,4 @@ def run_AirlockTools(api: AirlockAPIWrapper) -> None: # --------------------------------------------------------------------------- if __name__ == "__main__": api = AirlockAPIWrapper() - run_AirlockTools(api) + run_Loxide(api)