-
Notifications
You must be signed in to change notification settings - Fork 3
[injector] feat(shodan): create new injector (#106) #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new Shodan injector for the OpenAEV platform, enabling security reconnaissance and vulnerability scanning through the Shodan API.
Changes:
- Complete implementation of a new Shodan injector with 7 security scanning contracts (Cloud Provider Asset Discovery, Critical Ports, CVE Enumeration, Domain Discovery, Host Enumeration, Custom Query, and CVE Specific Watchlist)
- Configuration management using Pydantic with support for environment variables, .env files, and YAML configuration
- Rich-formatted output rendering system for scan results with tables, trees, and JSON views
- Docker deployment setup with multi-stage builds and docker-compose configuration
Reviewed changes
Copilot reviewed 38 out of 49 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| shodan/shodan/services/client_api.py | Core API client for Shodan REST API with rate limiting, retry logic, and contract-specific query builders |
| shodan/shodan/services/utils.py | Rich-based output formatting utilities for rendering scan results with tables and trees |
| shodan/shodan/injector/openaev_shodan.py | Main injector orchestration logic handling message processing and output generation |
| shodan/shodan/contracts/*.py | Seven contract implementations defining fields, outputs, and trace configurations |
| shodan/shodan/models/configs/*.py | Pydantic-based configuration loaders with multi-source settings (env, yaml, .env) |
| shodan/pyproject.toml | Project metadata, dependencies, and tool configurations (black, isort, ruff, pytest) |
| shodan/Dockerfile | Multi-stage Docker build for Alpine-based deployment |
| shodan/docker-compose.yml | Container orchestration configuration with environment variable mapping |
| shodan/README.md | Comprehensive documentation covering deployment, configuration, and contract usage |
| shodan/tests/* | Empty test files (placeholders for future test implementation) |
|
Tests:
|
|
Thank you for your work on this PR @Megafredo! I noticed that there are currently no tests included for the Shodan injector. Are there plans to add tests as part of this PR, or will they be provided in a follow-up? |
de6281f to
ef612dc
Compare
|
After tests I've seen the following issue/misbehavior:
|
…, addition of the rate limiting and retry section in the README.
81b0b2f to
903d363
Compare
|
|
Safe to merge at any time. |

Proposed changes
Implementation of 7 contracts for the Shodan injector
Currently, only the manual target type is functional.
Testing Instructions
Related issues
Checklist
Further comments