mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-06-24 06:09:55 +02:00
refactor(deprecate models.schema):
This commit is contained in:
@@ -10,7 +10,7 @@ from rich.table import Table
|
||||
from tabulate import tabulate
|
||||
|
||||
from agentic_security.config import SettingsMixin # Importing the configuration mixin
|
||||
from agentic_security.models.schemas import Scan
|
||||
from agentic_security.primitives import Scan
|
||||
from agentic_security.probe_data import REGISTRY
|
||||
from agentic_security.routes.scan import streaming_response_generator
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
from agentic_security.primitives.models import (
|
||||
Settings,
|
||||
LLMInfo,
|
||||
Scan,
|
||||
ScanResult,
|
||||
Probe,
|
||||
Message,
|
||||
CompletionRequest,
|
||||
FileProbeResponse,
|
||||
Table,
|
||||
) # noqa
|
||||
@@ -11,7 +11,7 @@ from skopt import Optimizer
|
||||
from skopt.space import Real
|
||||
|
||||
from agentic_security.http_spec import Modality
|
||||
from agentic_security.models.schemas import Scan, ScanResult
|
||||
from agentic_security.primitives import Scan, ScanResult
|
||||
from agentic_security.probe_actor.cost_module import calculate_cost
|
||||
from agentic_security.probe_actor.refusal import refusal_heuristic
|
||||
from agentic_security.probe_data import audio_generator, image_generator, msj_data
|
||||
|
||||
@@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, MagicMock, Mock, patch
|
||||
import httpx
|
||||
import pytest
|
||||
|
||||
from agentic_security.models.schemas import Scan
|
||||
from agentic_security.primitives import Scan
|
||||
from agentic_security.probe_actor.fuzzer import (
|
||||
generate_prompts,
|
||||
perform_many_shot_scan,
|
||||
|
||||
@@ -3,7 +3,7 @@ import random
|
||||
from fastapi import APIRouter, File, Header, HTTPException, UploadFile
|
||||
from fastapi.responses import JSONResponse
|
||||
|
||||
from ..models.schemas import FileProbeResponse, Probe
|
||||
from ..primitives import FileProbeResponse, Probe
|
||||
from ..probe_actor.refusal import REFUSAL_MARKS
|
||||
from ..probe_data import REGISTRY
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from fastapi import APIRouter
|
||||
from loguru import logger
|
||||
|
||||
from ..core.app import get_current_run, get_tools_inbox
|
||||
from ..models.schemas import CompletionRequest, Settings
|
||||
from ..primitives import CompletionRequest, Settings
|
||||
from ..probe_actor.refusal import REFUSAL_MARKS
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@@ -3,7 +3,7 @@ from pathlib import Path
|
||||
from fastapi import APIRouter, Response
|
||||
from fastapi.responses import FileResponse, StreamingResponse
|
||||
|
||||
from ..models.schemas import Table
|
||||
from ..primitives import Table
|
||||
from ..report_chart import plot_security_report
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@@ -14,7 +14,7 @@ from fastapi.responses import StreamingResponse
|
||||
from ..core.app import get_stop_event, get_tools_inbox, set_current_run
|
||||
from ..dependencies import InMemorySecrets, get_in_memory_secrets
|
||||
from ..http_spec import LLMSpec
|
||||
from ..models.schemas import LLMInfo, Scan
|
||||
from ..primitives import LLMInfo, Scan
|
||||
from ..probe_actor import fuzzer
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@@ -7,7 +7,7 @@ from fastapi.templating import Jinja2Templates
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from starlette.responses import Response
|
||||
|
||||
from ..models.schemas import Settings
|
||||
from ..primitives import Settings
|
||||
|
||||
router = APIRouter()
|
||||
STATIC_DIR = Path(__file__).parent.parent / "static"
|
||||
|
||||
@@ -2,7 +2,7 @@ import sentry_sdk
|
||||
from loguru import logger
|
||||
from sentry_sdk.integrations.logging import ignore_logger
|
||||
|
||||
from ..models.schemas import Settings
|
||||
from ..primitives import Settings
|
||||
|
||||
|
||||
def setup(app):
|
||||
|
||||
@@ -6,7 +6,7 @@ import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from ..app import app
|
||||
from ..models.schemas import Probe
|
||||
from ..primitives import Probe
|
||||
from ..probe_actor.refusal import REFUSAL_MARKS
|
||||
from ..probe_data import REGISTRY
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import pytest
|
||||
from fastapi import HTTPException
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from ..models.schemas import Settings
|
||||
from ..primitives import Settings
|
||||
from .static import get_static_file, router
|
||||
|
||||
client = TestClient(router)
|
||||
|
||||
Reference in New Issue
Block a user