{"id":22305965,"url":"https://github.com/cyse7125-su24-team10/db-cve-processor","last_synced_at":"2026-04-17T03:03:05.295Z","repository":{"id":256814080,"uuid":"814742766","full_name":"cyse7125-su24-team10/db-cve-processor","owner":"cyse7125-su24-team10","description":"Builds Docker image for running Flyway-based PostgreSQL migrations as an init container in Kubernetes, ensuring proper schema setup and updates for CVE data management.","archived":false,"fork":false,"pushed_at":"2024-09-11T18:57:39.000Z","size":297,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-26T00:47:11.581Z","etag":null,"topics":["flyway-migrations","initcontainer","kubernetes","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyse7125-su24-team10.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-13T15:58:30.000Z","updated_at":"2024-09-12T16:44:16.000Z","dependencies_parsed_at":"2024-09-13T07:09:16.663Z","dependency_job_id":null,"html_url":"https://github.com/cyse7125-su24-team10/db-cve-processor","commit_stats":null,"previous_names":["cyse7125-su24-team10/db-cve-processor"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/cyse7125-su24-team10/db-cve-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyse7125-su24-team10%2Fdb-cve-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyse7125-su24-team10%2Fdb-cve-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyse7125-su24-team10%2Fdb-cve-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyse7125-su24-team10%2Fdb-cve-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyse7125-su24-team10","download_url":"https://codeload.github.com/cyse7125-su24-team10/db-cve-processor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyse7125-su24-team10%2Fdb-cve-processor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31913078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flyway-migrations","initcontainer","kubernetes","postgresql"],"created_at":"2024-12-03T19:13:44.194Z","updated_at":"2026-04-17T03:03:05.263Z","avatar_url":"https://github.com/cyse7125-su24-team10.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# db-cve-processor\n\n## Overview\nThis project uses Flyway to manage PostgreSQL database migrations for handling Common Vulnerabilities and Exposures (CVE) data and builds docker image.\n\n## Project Structure\n- `/migrations`: Contains SQL scripts for database schema and updates.\n- `Dockerfile`: Defines the Docker image for running Flyway migrations.\n- `flyway.conf`: Configuration file for database connection and migration settings.\n\n## Database Schema\n- Schema: `cve`\n- Table: `CVE`\n  - `id`: Unique CVE identifier\n  - `datatype`: Data type\n  - `dataversion`: Data version\n  - `cve_metadata`: JSONB column for CVE metadata\n  - `containers`: JSONB column for container info\n- Two GIN indexes are created on the JSONB columns for better query performance.\n\n## Setup and Configuration\n\n### Environment Variables\nSet the following variables:\n- `DB_HOST`: PostgreSQL host\n- `DB_PORT`: Database port\n- `DB_NAME`: Database name\n- `DB_USER`: Database user\n- `DB_PASSWORD`: User password\n- `DB_SCHEMA`: Schema name (cve)\n\n### Flyway Configuration\nThe `flyway.conf` file includes database connection details and migration script locations.\n\n## Running Migrations\n\n1. Build the Docker Image:\n   ```bash\n   docker build -t cve-migration . \n\n## Running Migrations\n\nTo run the migrations, follow these steps:\n\n1. **Build the Docker Image**: Use the provided Dockerfile to create a Docker image for the migration process.\n```bash\ndocker build -t cve-migration .\n```\n\n2. **Run the Docker Container**: Execute the Docker container with the necessary environment variables. You can use an `.env` file to manage these variables conveniently.\n\n```bash\ndocker run --env-file .env cve-migration\n```\n\n\nMake sure your `.env` file contains all the required environment variables.\n\n## Contributing\n\nIf you would like to contribute to this project.\n\n## License\n\nThis project is licensed under the [MIT License].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyse7125-su24-team10%2Fdb-cve-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyse7125-su24-team10%2Fdb-cve-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyse7125-su24-team10%2Fdb-cve-processor/lists"}