-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Overview
Implement comprehensive Scan Templates API module following v2.0 BaseAPI pattern for managing scan configuration templates.
Scope
- Full CRUD operations for scan templates
- Template discovery settings management
- Service and vulnerability check configuration
- Performance settings management
- Credential assignment to templates
- Helper methods for common workflows
- Integration with InsightVMClient
- Comprehensive docstrings with type hints
- Error handling
- Unit tests (when test framework ready)
API Endpoints
GET /api/3/scan_templates- List scan templatesGET /api/3/scan_templates/{id}- Get template detailsPOST /api/3/scan_templates- Create templatePUT /api/3/scan_templates/{id}- Update templateDELETE /api/3/scan_templates/{id}- Delete templateGET /api/3/scan_templates/{id}/discovery- Get discovery settingsPUT /api/3/scan_templates/{id}/discovery- Update discoveryGET /api/3/scan_templates/{id}/service_discovery- Get service discoveryPUT /api/3/scan_templates/{id}/service_discovery- Update service discovery
Implementation Checklist
- Create
src/rapid7/api/scan_templates.py - Implement ScanTemplateAPI class extending BaseAPI
- Add scan_templates sub-client to InsightVMClient
- Create documentation in
docs/SCAN_TEMPLATES_API.md - Update Memory Bank (activeContext.md, progress.md)
- Create feature branch:
feature/issue-{number}-scan-templates-api
Key Features
- Template Types: Discovery, full audit, policy, web
- Discovery Options: TCP/UDP port scanning, ICMP ping, service fingerprinting
- Performance: Parallel scans, packet rate, scan delay
- Vulnerability Checks: Enable/disable specific checks, categories
- Credentials: Assign authentication credentials to templates
- Helper Methods:
create_from_builtin(),clone_template()
Estimated Size
~450-500 lines of code
Definition of Done
- ScanTemplateAPI module implemented with all endpoints
- Integrated with InsightVMClient as
client.scan_templates - Documented with usage examples
- Memory Bank updated
- PR created and ready for review
References
- Context7 API Documentation:
/riza/rapid7-insightvm-api-docs - BaseAPI Pattern:
src/rapid7/api/base.py - Similar Implementation:
src/rapid7/api/sites.py
Reactions are currently unavailable