Add NeuVector Data to PostgreSQL and Implement Compliance-Scan Endpoint
Description:
Integrate NeuVector security scan data into PostgreSQL and develop a compliance-scan API endpoint to retrieve and process this data for compliance reporting.
Tasks:
-
Database Schema Update
- Define a new table for storing NeuVector compliance scan results.
- Fields may include:
-
id(UUID, Primary Key) -
namespace(VARCHAR) -
policy_name(VARCHAR) -
severity(VARCHAR) -
status(VARCHAR - Pass/Fail) -
timestamp(TIMESTAMP) -
raw_data(JSONB - for detailed scan information)
-
- Implement necessary indexes for performance optimization.
-
Ingest NeuVector Data
- Normalize and insert compliance scan data into PostgreSQL.
- Implement error handling and logging.
-
Create Compliance-Scan API Endpoint
- Develop a new
GET /api/v1/compliance-scanendpoint. - Support filtering by
namespace,severity, andtimestamp. - Query the PostgreSQL database to fetch and return compliance scan results.
- Develop a new
-
Testing & Validation
- Write unit tests for data ingestion and API queries.
-
Documentation
- Document database schema changes and API usage.
- Provide examples of API requests and expected responses.
Acceptance Criteria:
- NeuVector compliance scan data is stored in PostgreSQL.
-
GET /api/v1/compliance-scanreturns correct scan results with filters. - Unit and integration tests validate data ingestion and API behavior.
- Documentation is complete and published.
Edited by Manuel Ucles