Skip to content

Feature/dev api#4

Merged
HC-ONLINE merged 46 commits into
mainfrom
feature/dev-api
Apr 29, 2026
Merged

Feature/dev api#4
HC-ONLINE merged 46 commits into
mainfrom
feature/dev-api

Conversation

@HC-ONLINE
Copy link
Copy Markdown
Owner

Description

This PR implements a complete REST API for CiberWebScan using FastAPI, bringing the API from development to a functional Beta state. The implementation includes:

  • Full FastAPI application with middleware for logging and rate limiting
  • Authentication module with API key management endpoints
  • Comprehensive API endpoints:
    • /api/analyze - Security analysis with detailed configuration options
    • /api/attack - URL vulnerability testing with configurable payloads
    • /api/scrape - Single and batch URL scraping capabilities
    • /api/download - Token-based file download system with automatic cleanup
    • /api/config - Configuration management endpoints
    • /health and /health/ready - Health check endpoints
  • Download token generation, validation, and automatic cleanup system
  • Enhanced request/response models with export options and comprehensive validation
  • Full unit and integration test coverage for all endpoints
  • API command in CLI for server management
  • Enhanced documentation reflecting API Beta status

Follow-up Note

Currently, the quick command exists only in the CLI (ciberwebscan quick <url>) and performs combined scraping + analysis in a single operation. There is no equivalent common endpoint in the API, as the design separates concerns across /api/scrape and /api/analyze. Future improvements will evaluate:

  • Adding a convenience /api/quick endpoint that combines both operations
  • Ensuring feature parity between CLI and API interfaces
  • Improving API/CLI unified command architecture

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have followed the style guidelines of this project (Ruff & Pyright)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly

Testing

  • Full test suite passes with both dev and api optional dependencies
  • All API endpoints have corresponding unit tests
  • Integration tests cover authentication, download token lifecycle, and middleware behavior
  • CI/CD workflow updated to validate API functionality

HC-ONLINE and others added 16 commits April 16, 2026 10:02
…ctor cleanup scheduler tests for async support
Co-authored-by: Copilot <copilot@github.com>
…uration

Co-authored-by: Copilot <copilot@github.com>
@HC-ONLINE HC-ONLINE merged commit 53d9286 into main Apr 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant