Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ciberwebscan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Defines package-level metadata.
"""

from __future__ import annotations

from importlib.metadata import PackageNotFoundError, version

try:
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Allows running with: python -m ciberwebscan
"""

from __future__ import annotations

from ciberwebscan.cli import main

if __name__ == "__main__":
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""CiberWebScan API"""

from __future__ import annotations
2 changes: 2 additions & 0 deletions src/ciberwebscan/api/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Provides request and response models for the REST API.
"""

from __future__ import annotations

from ciberwebscan.api.models.requests import (
AnalyzeRequest,
AttackRequest,
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/api/routes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
This package contains all FastAPI route handlers for the REST API.
"""

from __future__ import annotations

from . import analyze, attack, auth, config, download, health, quick, scrape

__all__ = [
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Simple command-line interface built with Typer (no Rich).
"""

from __future__ import annotations

from ciberwebscan.cli.app import app, main
from ciberwebscan.cli.output import (
print_error,
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/cli/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
CLI commands for CiberWebScan.
"""

from __future__ import annotations

from ciberwebscan.cli.commands.analyze import analyze_cmd
from ciberwebscan.cli.commands.attack import attack_cmd
from ciberwebscan.cli.commands.completion import completion_app
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Provides configuration models, defaults, and loading utilities.
"""

from __future__ import annotations

from ciberwebscan.config.models import (
AnalysisConfig,
AppConfig,
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/core/analyzers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
header security analysis.
"""

from __future__ import annotations

from .fingerprint import (
TechnologyFingerprinter,
fingerprint_technologies,
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/core/analyzers/cve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
>>> cves = lookup_cves("nginx", version="1.19")
"""

from __future__ import annotations

from ciberwebscan.core.analyzers.cve.aggregator import (
CVEAggregator,
lookup_cves,
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/core/analyzers/fingerprint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
and HTML content analysis.
"""

from __future__ import annotations

from .header_analyzer import analyze_headers
from .helpers import (
append_tech_with_version,
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/core/analyzers/headers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Provides security analysis for HTTP headers and cookies.
"""

from __future__ import annotations

from .cookies import CookieAnalyzer
from .security_headers import SecurityHeadersAnalyzer

Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/core/analyzers/ssl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
and security configurations.
"""

from __future__ import annotations

from .analyzer import (
SSLAnalysisResult,
SSLAnalyzer,
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/core/attacks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
explicit written authorization to test. Unauthorized testing is illegal.
"""

from __future__ import annotations

from .base import (
AttackConfig,
AttackContext,
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/core/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Provides HTTP client with retry, rate limiting, proxy and user-agent support.
"""

from __future__ import annotations

from ciberwebscan.core.client.http_client import HTTPClient, RateLimiter
from ciberwebscan.core.client.proxy import (
ProxyConfig,
Expand Down
4 changes: 3 additions & 1 deletion src/ciberwebscan/core/client/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
of a full compatibility layer while centralizing cross-cutting concerns.
"""

from __future__ import annotations

import logging
import random
import threading
Expand Down Expand Up @@ -613,7 +615,7 @@ def close(self) -> None:
"""Close the underlying HTTP client."""
self._client.close()

def __enter__(self) -> "HTTPClient":
def __enter__(self) -> HTTPClient:
return self

def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/core/scraping/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ async def scrape_spa():
})
"""

from __future__ import annotations

from typing import TYPE_CHECKING, Any

from .extractor import (
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
exporter.export_report(analysis_report)
"""

from __future__ import annotations

# Base classes and utilities
from ciberwebscan.export.base import (
BaseExporter,
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
Each service that produces results supports an optional export flag.
"""

from __future__ import annotations

from ciberwebscan.services.analyze_service import AnalyzeOptions, AnalyzeService
from ciberwebscan.services.attack_service import AttackOptions, AttackService
from ciberwebscan.services.base import (
Expand Down
2 changes: 2 additions & 0 deletions src/ciberwebscan/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""
This package contains utility functions and classes used across the CiberWebScan project.
"""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Tests for tests package."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Shared pytest fixtures for CiberWebScan tests.
"""

from __future__ import annotations

import pytest


Expand Down
2 changes: 2 additions & 0 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Tests for integration package."""

from __future__ import annotations
3 changes: 3 additions & 0 deletions tests/integration/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Integration tests for API module."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/integration/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Tests for CLI package."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Tests for unit package."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Unit tests for API module."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/api/routes/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Unit tests for API routes."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Tests for CiberWebScan CLI."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Tests for config package."""

from __future__ import annotations
3 changes: 3 additions & 0 deletions tests/unit/core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Tests for core package."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/core/analyzers/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Analyzers test package."""

from __future__ import annotations
3 changes: 3 additions & 0 deletions tests/unit/core/analyzers/cve/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""CVE analyzer test package."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/core/analyzers/fingerprint/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Unit tests for fingerprint module."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/core/analyzers/headers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""
Unit tests for header analyzers.
"""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/core/analyzers/ssl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""SSL analyzer test package."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/core/attacks/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Tests for attack simulation modules."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/core/attacks/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Pytest configuration and shared fixtures for attack module tests.
"""

from __future__ import annotations

from pathlib import Path
from unittest.mock import Mock

Expand Down
2 changes: 2 additions & 0 deletions tests/unit/core/client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""
Unit tests for ciberwebscan.core.client module.
"""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/core/scraping/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Unit tests for scraping module."""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/export/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""
Docstring para tests.unit.export
"""

from __future__ import annotations
2 changes: 2 additions & 0 deletions tests/unit/services/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Tests for services package."""

from __future__ import annotations
1 change: 1 addition & 0 deletions tests/unit/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Tests for utils module
from __future__ import annotations
Loading