diff --git a/.tekton/on-pull-request.yaml b/.tekton/on-pull-request.yaml index 268db487..60d50aea 100644 --- a/.tekton/on-pull-request.yaml +++ b/.tekton/on-pull-request.yaml @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: - name: morpheus-client-on-pr + name: exploit-iq-client-on-pr annotations: # The event we are targeting as seen from the webhook payload # this can be an array too, i.e: [pull_request, push] @@ -28,7 +28,7 @@ spec: - name: image-expires-after value: 5d - name: output-image - value: quay.io/ecosystem-appeng/agent-morpheus-client:on-pr-{{revision}} + value: quay.io/ecosystem-appeng/exploit-iq-client:on-pr-{{revision}} - name: path-context value: . - name: dockerfile diff --git a/.tekton/on-push.yaml b/.tekton/on-push.yaml index 0b18182c..521a8141 100644 --- a/.tekton/on-push.yaml +++ b/.tekton/on-push.yaml @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: - name: morpheus-client-on-push + name: exploit-iq-client-on-push annotations: # The event we are targeting as seen from the webhook payload # this can be an array too, i.e: [pull_request, push] @@ -26,7 +26,7 @@ spec: - name: revision value: "{{ revision }}" - name: output-image - value: quay.io/ecosystem-appeng/agent-morpheus-client:latest + value: quay.io/ecosystem-appeng/exploit-iq-client:latest - name: path-context value: . - name: dockerfile diff --git a/.tekton/on-tag.yaml b/.tekton/on-tag.yaml index c3322cb8..b7a3c1d1 100644 --- a/.tekton/on-tag.yaml +++ b/.tekton/on-tag.yaml @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: - name: morpheus-client-on-tag-push + name: exploit-iq-client-on-tag-push annotations: # The event we are targeting as seen from the webhook payload # this can be an array too, i.e: [pull_request, push] @@ -26,7 +26,7 @@ spec: - name: revision value: "{{ revision }}" - name: output-image - value: quay.io/ecosystem-appeng/agent-morpheus-client + value: quay.io/ecosystem-appeng/exploit-iq-client - name: tag-name value: "{{git_tag}}" - name: path-context diff --git a/.tekton/tekton-tasks/maven-test-ci.yaml b/.tekton/tekton-tasks/maven-test-ci.yaml index c622de95..b2080ad5 100644 --- a/.tekton/tekton-tasks/maven-test-ci.yaml +++ b/.tekton/tekton-tasks/maven-test-ci.yaml @@ -1,5 +1,5 @@ --- -# Maven test for @QuarkusTest in CI: JDK + Syft base image (quay.io/exploit-iq/agent-morpheus-client-test-image). +# Maven test for @QuarkusTest in CI: JDK + Syft base image (quay.io/ecosystem-appeng/exploit-iq-test-image). apiVersion: tekton.dev/v1beta1 kind: Task metadata: @@ -10,7 +10,7 @@ metadata: component: exploit-iq-client spec: description: >- - Runs ./mvnw test with ephemeral Mongo; uses quay.io/exploit-iq/agent-morpheus-client-test-image (JDK + Syft). + Runs ./mvnw test with ephemeral Mongo; uses quay.io/ecosystem-appeng/exploit-iq-test-image (JDK + Syft). workspaces: - name: source description: Cloned repository (git-clone output) @@ -20,7 +20,7 @@ spec: description: Registry pull secret for Syft (directory with .dockerconfigjson) steps: - name: test - image: quay.io/exploit-iq/agent-morpheus-client-test-image:latest + image: quay.io/ecosystem-appeng/exploit-iq-test-image:latest workingDir: $(workspaces.source.path) env: - name: QUARKUS_MONGODB_DEVSERVICES_ENABLED diff --git a/.tekton/tekton-tasks/mongodb-ci.yaml b/.tekton/tekton-tasks/mongodb-ci.yaml index 4c4d7d88..3ddcc9eb 100644 --- a/.tekton/tekton-tasks/mongodb-ci.yaml +++ b/.tekton/tekton-tasks/mongodb-ci.yaml @@ -1,6 +1,6 @@ --- # Ephemeral MongoDB for @QuarkusTest in CI. Same image as prod (mongodb-community-server 8.0 UBI); -# mirrors deploy/agent_morpheus_client.yaml (db Deployment + Service); emptyDir instead of PVC. +# mirrors deploy/exploit-iq-client.yaml (db Deployment + Service); emptyDir instead of PVC. apiVersion: tekton.dev/v1beta1 kind: Task metadata: diff --git a/AGENTS.md b/AGENTS.md index cbb10311..0e8a554f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,7 +34,7 @@ Loading states MUST use PatternFly `Skeleton` components instead of `Spinner` co ## Development Workflow ### Code Organization -- Backend Java code: `src/main/java/com/redhat/ecosystemappeng/morpheus/` +- Backend Java code: `src/main/java/com/redhat/ecosystemappeng/exploitiq/` - Frontend TypeScript/React code: `src/main/webui` - Generated API client: `src/main/webui/src/services/generated-client/` (auto-generated from OpenAPI) - React hooks: `src/main/webui/src/hooks/` (use `useApi` for all API calls) diff --git a/README.md b/README.md index 06f7534b..70834bec 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,12 @@ See the License for the specific language governing permissions and limitations under the License. --> -# Red Hat Exploit Intelligence- client +# Red Hat ExploitIQ - client This project is a Quarkus + React web application implemented to interact with ExploitIQ service for sending requests to evaluate vulnerabilities on specific SBOMs. -For product documentation and deeper context, see the [Exploit Intelligence documentation](https://github.com/RHEcosystemAppEng/exploitiq-docs). +For product documentation and deeper context, see the [ExploitIQ documentation](https://github.com/RHEcosystemAppEng/exploitiq-docs). ## Development @@ -158,7 +158,7 @@ flowchart TB classDef ok fill:#bbf7d0,stroke:#15803d,stroke-width:2px,color:#14532d classDef caption fill:#f8fafc,stroke:#94a3b8,stroke-width:1px,color:#334155 - HEADER["Exploit Intelligence -
Analysis Pipeline
"] + HEADER["ExploitIQ -
Analysis Pipeline
"] class HEADER caption START([User request analysis]) @@ -178,7 +178,7 @@ flowchart TB SYFT_FAIL[[Syft failed
submission failure / excluded]] CYCLONE_VAL["Parse & validate CycloneDX
from Syft output"] CYCLONE_FAIL[[CycloneDX parse / validation failed
submission failure / excluded]] - TO_AGENT["Save report & submit for analysis
Morpheus queue"] + TO_AGENT["Save report & submit for analysis
ExploitIQ queue"] PER_CAPTION --> SYFT end @@ -199,7 +199,7 @@ flowchart TB SC_CYCLONE_ERR[[CycloneDX parse failed
immediate error to client]] end - subgraph AGENT["Shared — Submit & agent pipeline
(RequestQueueService → Morpheus)"] + subgraph AGENT["Shared — Submit & agent pipeline
(RequestQueueService → ExploitIQ)"] direction TB QUEUE_GATE["Is queue full?
active reports >= max active"] PEND_CAP[Pending queue
below max size?] diff --git a/deploy/agent_morpheus_client.yaml b/deploy/exploit-iq-client.yaml similarity index 72% rename from deploy/agent_morpheus_client.yaml rename to deploy/exploit-iq-client.yaml index 5d6266b4..97497d35 100644 --- a/deploy/agent_morpheus_client.yaml +++ b/deploy/exploit-iq-client.yaml @@ -2,20 +2,20 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: agent-morpheus-client-db + name: exploit-iq-client-db labels: - app: agent-morpheus-client-db + app: exploit-iq-client-db spec: strategy: type: Recreate replicas: 1 selector: matchLabels: - app: agent-morpheus-client-db + app: exploit-iq-client-db template: metadata: labels: - app: agent-morpheus-client-db + app: exploit-iq-client-db spec: containers: - name: mongodb @@ -31,14 +31,14 @@ spec: volumes: - name: data persistentVolumeClaim: - claimName: agent-morpheus-client-data + claimName: exploit-iq-client-data --- apiVersion: v1 kind: Service metadata: - name: agent-morpheus-client-db + name: exploit-iq-client-db labels: - app: agent-morpheus-client-db + app: exploit-iq-client-db spec: ports: - name: db @@ -46,43 +46,43 @@ spec: protocol: TCP targetPort: 27017 selector: - app: agent-morpheus-client-db + app: exploit-iq-client-db --- apiVersion: apps/v1 kind: Deployment metadata: - name: agent-morpheus-client + name: exploit-iq-client labels: - app: agent-morpheus-client + app: exploit-iq-client spec: strategy: type: Recreate replicas: 1 selector: matchLabels: - app: agent-morpheus-client + app: exploit-iq-client template: metadata: labels: - app: agent-morpheus-client + app: exploit-iq-client spec: containers: - - name: agent-morpheus-client - image: quay.io/ecosystem-appeng/agent-morpheus-client:latest + - name: exploit-iq-client + image: quay.io/ecosystem-appeng/exploit-iq-client:latest imagePullPolicy: Always ports: - name: http protocol: TCP containerPort: 8080 env: - - name: QUARKUS_REST-CLIENT_MORPHEUS_URL - value: http://agent-morpheus-rh:8080/scan + - name: QUARKUS_REST-CLIENT_EXPLOIT_IQ_URL + value: http://exploit-iq-agent:8080/scan - name: QUARKUS_MONGODB_HOSTS - value: agent-morpheus-client-db:27017 + value: exploit-iq-client-db:27017 - name: QUARKUS_MONGODB_DATABASE valueFrom: secretKeyRef: - name: agent-morpheus-client-secret + name: exploit-iq-client-secret key: mongodb.dbname - name: DOCKER_CONFIG value: /tmp/.docker @@ -111,9 +111,9 @@ spec: apiVersion: v1 kind: Service metadata: - name: agent-morpheus-client + name: exploit-iq-client labels: - app: agent-morpheus-client + app: exploit-iq-client spec: ports: - name: http @@ -121,23 +121,23 @@ spec: protocol: TCP targetPort: 8080 selector: - app: agent-morpheus-client + app: exploit-iq-client --- apiVersion: route.openshift.io/v1 kind: Route metadata: - name: agent-morpheus-client + name: exploit-iq-client spec: port: targetPort: 8080 to: kind: Service - name: agent-morpheus-client + name: exploit-iq-client --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: agent-morpheus-client-data + name: exploit-iq-client-data spec: accessModes: - ReadWriteOnce diff --git a/docs/analysis-pipeline-workflow.mmd b/docs/analysis-pipeline-workflow.mmd index 0fba803a..7b65f854 100644 --- a/docs/analysis-pipeline-workflow.mmd +++ b/docs/analysis-pipeline-workflow.mmd @@ -1,4 +1,4 @@ -%% Analysis pipeline / workflow — aligned with morpheus-client backend behavior. +%% Analysis pipeline / workflow — aligned with exploit-iq-client backend behavior. %% Product path: success / failed edge order (success left, failed right) where binary. %% %% Bold / line breaks: HTML in quoted labels (,
). Requires htmlLabels (init below). @@ -13,7 +13,7 @@ flowchart TB classDef ok fill:#bbf7d0,stroke:#15803d,stroke-width:2px,color:#14532d classDef caption fill:#f8fafc,stroke:#94a3b8,stroke-width:1px,color:#334155 - HEADER["Exploit Intelligence -
Analysis Pipeline
"] + HEADER["ExploitIQ -
Analysis Pipeline
"] class HEADER caption START([User request analysis]) @@ -33,7 +33,7 @@ flowchart TB SYFT_FAIL[[Syft failed
submission failure / excluded]] CYCLONE_VAL["Parse & validate CycloneDX
from Syft output"] CYCLONE_FAIL[[CycloneDX parse / validation failed
submission failure / excluded]] - TO_AGENT["Save report & submit for analysis
Morpheus queue"] + TO_AGENT["Save report & submit for analysis
ExploitIQ queue"] PER_CAPTION --> SYFT end @@ -54,7 +54,7 @@ flowchart TB SC_CYCLONE_ERR[[CycloneDX parse failed
immediate error to client]] end - subgraph AGENT["Shared — Submit & agent pipeline
(RequestQueueService → Morpheus)"] + subgraph AGENT["Shared — Submit & agent pipeline
(RequestQueueService → ExploitIQ)"] direction TB QUEUE_GATE["Is queue full?
active reports >= max active"] PEND_CAP[Pending queue
below max size?] diff --git a/docs/authentication.md b/docs/authentication.md index b810fcfc..7a29027b 100644 --- a/docs/authentication.md +++ b/docs/authentication.md @@ -471,4 +471,4 @@ Or run the testing script with debug flag: - [Quarkus Configuring Well-Known OpenID Connect Providers](https://quarkus.io/guides/security-openid-connect-providers) - [Keycloak Documentation](https://www.keycloak.org/documentation) - [GitHub OAuth Apps](https://docs.github.com/en/developers/apps/building-oauth-apps) -- [Google OAuth 2.0](https://developers.google.com/identity/protocols/oauth2) +- [Google OAuth 2.0](https://developers.google.com/identity/protocols/oauth2) \ No newline at end of file diff --git a/docs/configuration.md b/docs/configuration.md index 655ae128..d59b9051 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -18,13 +18,13 @@ limitations under the License. For detailed authentication configuration including OpenShift OAuth, Keycloak, and external identity providers (Google, GitHub, Azure AD), see the [Authentication Guide](./authentication.md). -## External Services (GitHub / Morpheus) +## External Services (GitHub / ExploitIQ) -Use the `rest-client` properties for updating the default the github and morpheus RestClient endpoints: +Use the `rest-client` properties for updating the default the github and ExploitIQ RestClient endpoints: ```properties quarkus.rest-client.github.url=https://api.github.com -quarkus.rest-client.morpheus.url=https://agent-morpheus:8080/scan +quarkus.rest-client.exploit-iq.url=https://exploit-iq:8080/scan ``` For development the external calls will be mocked using WireMock. The report behaviour @@ -49,25 +49,25 @@ In production it is expected that the following environment variables are provid ## Queue and timeout -In order to avoid overloading Morpheus, specially when a batch of requests should be processed, +In order to avoid overloading ExploitIQ, specially when a batch of requests should be processed, you can configure a maximum number of ongoing requests and a maximum number of waiting requests. Finally it is possible to define the timeout for an ongoing request. ```properties -morpheus.queue.max-active=5 #max number of ongoing requests -morpheus.queue.max-size=100 #max number of waiting requests -morpheus.queue.timeout=5m #duration of an ongoing request +exploit-iq.queue.max-active=5 #max number of ongoing requests +exploit-iq.queue.max-size=100 #max number of waiting requests +exploit-iq.queue.timeout=5m #duration of an ongoing request ``` Every 10 seconds the ongoing requests will be checked and expired if needed, then -the waiting queue will be updated and send new requests to Morpheus +the waiting queue will be updated and send new requests to ExploitIQ ## Pending Component Syncer timeout The Component Syncer is responsible for pre-processing component documents during product scanning. You can configure the timeout for the syncer to control how long the system waits for the component synchronization process to complete and send processed batch for analysis before timing out. ```properties -morpheus.syncer.timeout=1h # duration to wait for component syncer during pre-processing +exploit-iq.syncer.timeout=1h # duration to wait for component syncer during pre-processing ``` Set this value according to the expected processing time for your product. If the syncer does not finish within the configured timeout, any components still pending will be marked as expired. @@ -78,8 +78,8 @@ You can activate the purge for old reports. By default is disabled and unless th cron expression is provided it will not be executed. ```properties -morpheus.purge.cron=0 0 * * * ? #Run every midnight -morpheus.purge.after=7d #Remove reports older than 7 days +exploit-iq.purge.cron=0 0 * * * ? #Run every midnight +exploit-iq.purge.after=7d #Remove reports older than 7 days ``` ## Includes / Excludes diff --git a/docs/development.md b/docs/development.md index 642f9211..f9417c08 100644 --- a/docs/development.md +++ b/docs/development.md @@ -27,7 +27,7 @@ For authentication setup (Keycloak, external identity providers, testing), see t You can run your application in dev mode that enables live coding using: ```shell -./mvnw quarkus:dev -Dquarkus.rest-client.morpheus.url=https://agent-morpheus-route.com/scan +./mvnw quarkus:dev -Dquarkus.rest-client.exploit-iq.url=https://exploit-iq-route.com/scan ``` By default, this runs with **authentication disabled**. To enable Keycloak DevServices and OIDC: @@ -78,7 +78,7 @@ npm run dev:standalone ## Supplying application data -You can supply the application with data by sending Agent Morpheus output.json files from your local file system to the application using: +You can supply the application with data by sending ExploitIQ output.json files from your local file system to the application using: ```shell curl -i -X POST --header 'Content-type: application/json' http://localhost:8080/api/v1/reports -d @/path/to/file.json @@ -144,7 +144,7 @@ Or, if you don't have GraalVM installed, you can run the native executable build ./mvnw package -Dnative -Dquarkus.native.container-build=true ``` -You can then execute your native executable with: `./target/agent-morpheus-client-1.0.0-SNAPSHOT-runner` +You can then execute your native executable with: `./target/exploit-iq-client-1.0.0-SNAPSHOT-runner` ### Building with profiles diff --git a/docs/sbom-requirements.md b/docs/sbom-requirements.md index c7ccc46b..131bb704 100644 --- a/docs/sbom-requirements.md +++ b/docs/sbom-requirements.md @@ -14,7 +14,7 @@ limitations under the License. # SBOM Requirements -Exploit Intelligence supports two SBOM formats for analysis requests: +ExploitIQ supports two SBOM formats for analysis requests: | Format | Use case | |--------|----------| diff --git a/openspec/project.md b/openspec/project.md index c0736fba..ddd31b56 100644 --- a/openspec/project.md +++ b/openspec/project.md @@ -1,12 +1,13 @@ # Project Context ## Purpose -ExploitIQ Client is a Quarkus + React web application that interacts with the ExploitIQ (Agent Morpheus) service to evaluate vulnerabilities on Software Bill of Materials (SBOMs). The application allows users to: +ExploitIQ Client is a Quarkus + React web application that interacts with the ExploitIQ +service to evaluate vulnerabilities on Software Bill of Materials (SBOMs). The application allows users to: - Submit CycloneDX SBOMs and CVE for vulnerability analysis - Manage and view vulnerability analysis reports - Track products and components across multiple reports -The application serves as a client interface for the Agent Morpheus vulnerability analysis service, providing request queuing, report management, and a web-based UI for interacting with analysis results. +The application serves as a client interface for the ExploitIQ vulnerability analysis service, providing request queuing, report management, and a web-based UI for interacting with analysis results. ## Tech Stack @@ -37,7 +38,7 @@ The application serves as a client interface for the Agent Morpheus vulnerabilit ### Code Style #### Java -- Package structure: `com.redhat.ecosystemappeng.morpheus` +- Package structure: `com.redhat.ecosystemappeng.exploitiq` - Standard Java naming conventions (PascalCase for classes, camelCase for methods/variables) - REST endpoints in `rest/` package - Service layer in `service/` package @@ -67,7 +68,7 @@ The application serves as a client interface for the Agent Morpheus vulnerabilit - **API-First**: All communication via REST APIs documented with OpenAPI #### Code Organization -- Backend: `src/main/java/com/redhat/ecosystemappeng/morpheus/` +- Backend: `src/main/java/com/redhat/ecosystemappeng/exploitiq/` - `rest/` - REST endpoints - `service/` - Business logic services - `model/` - Data models @@ -97,16 +98,16 @@ The application serves as a client interface for the Agent Morpheus vulnerabilit #### Backend Testing - **Unit Tests**: JUnit5 for isolated component testing - - Location: `src/test/java/com/redhat/ecosystemappeng/morpheus/service/` + - Location: `src/test/java/com/redhat/ecosystemappeng/exploitiq/service/` - Framework: JUnit5 - Examples: `ReportServiceMetadataKeysTest` (tests utility methods without dependencies) - Execution: Maven Surefire plugin (`mvn test`) - **REST API tests** (HTTP / contract-style): JUnit5 + REST Assured + `@QuarkusTest` - - Location: `src/test/java/com/redhat/ecosystemappeng/morpheus/rest/` + - Location: `src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/` - **Treated as unit tests today**: they run under **Surefire** with **`mvn test` only** (not a separate `mvn verify` / Failsafe integration phase). - Default mode: in-process Quarkus test application (Dev Services, test `application.properties`, WireMock where configured). - - Optional **remote RestAssured target**: set Quarkus property `morpheus.rest-test.external-base-url` (e.g. `-Dmorpheus.rest-test.external-base-url=http://localhost:8080`) so the same test methods assert against a **running** instance while the test JVM still starts `@QuarkusTest` (see `src/test/README.md`). + - Optional **remote RestAssured target**: set Quarkus property `exploit-iq.rest-test.external-base-url` (e.g. `-Dexploit-iq.rest-test.external-base-url=http://localhost:8080`) so the same test methods assert against a **running** instance while the test JVM still starts `@QuarkusTest` (see `src/test/README.md`). - Examples: `ProductEndpointRestTest`, `UploadSpdxRestTest`, `GetProductsRestTest` - **Test Resources**: @@ -132,7 +133,7 @@ The application serves as a client interface for the Agent Morpheus vulnerabilit - Java code MUST pass linting checks - **Test Execution**: - Backend and REST API tests run with **`mvn test`** (Surefire). There is no separate Failsafe phase for the REST suite today. - - Optional: pass `-Dmorpheus.rest-test.external-base-url=...` with `mvn test` to point REST Assured at a live server for the same tests (see `src/test/README.md`). + - Optional: pass `-Dexploit-iq.rest-test.external-base-url=...` with `mvn test` to point REST Assured at a live server for the same tests (see `src/test/README.md`). ### Git Workflow - Branching strategy: Not explicitly documented (currently on `homepage` branch) @@ -179,11 +180,11 @@ Standard labels used to categorize vulnerability analysis results: #### Vulnerabilities - Additional vulnerability intelligence data -- Can be used as an Intel Source for Morpheus +- Can be used as an Intel Source for ExploitIQ - Include free-text descriptions and metadata ### Key Workflows -1. **Request Submission**: User submits SBOM + CVEs → Request queued → Sent to Morpheus → Callback received → Report completed +1. **Request Submission**: User submits SBOM + CVEs → Request queued → Sent to ExploitIQ → Callback received → Report completed 2. **Report Management**: View, filter, sort, retry, delete reports 3. **Product Tracking**: Reports grouped by product/image for analysis 4. **Metadata Management**: Add custom metadata including git source location and commit ID @@ -213,8 +214,8 @@ Standard labels used to categorize vulnerability analysis results: ## External Dependencies ### Services -- **Agent Morpheus/ExploitIQ Service**: Primary vulnerability analysis service - - Endpoint: Configurable via `quarkus.rest-client.morpheus.url` +- **ExploitIQ Service**: Primary vulnerability analysis service + - Endpoint: Configurable via `quarkus.rest-client.exploit-iq.url` - Handles SBOM analysis and CVE evaluation - Sends callback responses with analysis results @@ -232,7 +233,7 @@ Standard labels used to categorize vulnerability analysis results: ### Infrastructure - **MongoDB**: Primary data store for reports, products, vulnerabilities - - Database: `agent-morpheus-client` (configurable) + - Database: `exploit-iq-client` (configurable) - Uses Quarkus Panache for data access - **OpenShift OAuth**: Authentication and authorization diff --git a/openspec/specs/document-titles/spec.md b/openspec/specs/document-titles/spec.md index c60886d4..3f734cde 100644 --- a/openspec/specs/document-titles/spec.md +++ b/openspec/specs/document-titles/spec.md @@ -4,11 +4,11 @@ Define how the web UI sets `document.title` so tabs show where the user is. Implementation: `src/main/webui/src/pages/pageTitles.ts` and `useDocumentTitle`. ## Requirements ### Requirement: Format and single source -Tab titles SHALL be built only through `pageTitles.ts` helpers, applied with `useDocumentTitle`, and SHALL end with ` | Exploit Intelligence` (via `withAppTitle` / `DOCUMENT_TITLE_APP_NAME`). +Tab titles SHALL be built only through `pageTitles.ts` helpers, applied with `useDocumentTitle`, and SHALL end with ` | ExploitIQ` (via `withAppTitle` / `DOCUMENT_TITLE_APP_NAME`). #### Scenario: Conventions - **WHEN** any page sets the document title -- **THEN** it uses `pageTitles.ts` plus `useDocumentTitle` and the string ends with ` | Exploit Intelligence` +- **THEN** it uses `pageTitles.ts` plus `useDocumentTitle` and the string ends with ` | ExploitIQ` ### Requirement: Route-specific segments Titles SHALL follow the patterns implemented in `pageTitles.ts`, including: Home `Home`; reports list `Reports` vs `Reports — Single repositories`; product report `Report: {productName} / {cveId}` when loaded and `Loading Report: {productId} / {cveId}` while loading; repository report CVE plus image name/tag when loaded; CVE details `CVE: {id}` (uppercased), load errors with CVE id, invalid CVE with optional route segment; excluded components `Excluded components — {product} / {cveId}`; plus error/invalid variants defined in that file. @@ -25,11 +25,11 @@ Titles SHALL follow the patterns implemented in `pageTitles.ts`, including: Home When the repository report page loads successfully for an RPM package checker report (**`report.input.image.pipeline_mode`** is **`rpm_package_checker`**) and **`report.input.image.target_package`** is present, **`document.title`** SHALL include the CVE id and RPM package identity derived from **`target_package`**. The **name**, **version**, and **release`** portion **SHALL** be presented as **hyphenated N-V-R** (**`name-version-release`**) when all three are non-empty after trim (**not** as a space-separated triple). **Architecture** (**`arch`**) **SHALL** appear as a distinct segment in the title suffix (same delimiter pattern as **`pageTitles.ts`** uses for the non-RPM image **name**/**tag** suffix, e.g. em dash after CVE and separator between **N-V-R** and **arch** as implemented), so the tab title **aligns** with **repository-report-page** active-tail formatting. -Titles MUST still follow **`document-titles`** global conventions (constructed via **`pageTitles.ts`** / **`useDocumentTitle`** and the **`Exploit Intelligence`** suffix). +Titles MUST still follow **`document-titles`** global conventions (constructed via **`pageTitles.ts`** / **`useDocumentTitle`** and the **`ExploitIQ`** suffix). #### Scenario: Loaded RPM checker repository report title - **WHEN** the repository report page has resolved report data AND **`pipeline_mode`** is **`rpm_package_checker`** AND **`target_package`** has **name**, **version**, **release**, and **arch** populated after trim - **THEN** **`document.title`** includes **CVE id** and a suffix where **package coordinates use `name-version-release`** (hyphens) **and** **architecture** is visible **without** collapsing **name version release arch** into one space-separated Nevra string -- **AND** the suffix follows **`pageTitles.ts`** conventions with the **Exploit Intelligence** app suffix +- **AND** the suffix follows **`pageTitles.ts`** conventions with the **ExploitIQ** app suffix diff --git a/openspec/specs/feedback-report/spec.md b/openspec/specs/feedback-report/spec.md index 4eee3912..749d50e7 100644 --- a/openspec/specs/feedback-report/spec.md +++ b/openspec/specs/feedback-report/spec.md @@ -15,7 +15,7 @@ The Feedback card SHALL display the title "Feedback" and the subtitle "Your feed ### Requirement: Feedback Form Fields The card SHALL collect the following. Required fields SHALL be marked with an asterisk. The Submit Feedback button SHALL be disabled until all required fields are set, then enabled and primary. -- **Accuracy** (dropdown, required): “How accurate do you find ExploitIQ's assessment? *” — options: Very Accurate, Mostly Accurate, Somewhat Inaccurate, Incorrect. +- **Accuracy** (dropdown, required): “How accurate do you find the ExploitIQ's assessment? *” — options: Very Accurate, Mostly Accurate, Somewhat Inaccurate, Incorrect. - **Reasoning** (dropdown, required): “Is the reasoning and summary of findings clear, complete, and well-supported? *” — options: Yes, Mostly, Somewhat, No. - **Checklist** (dropdown, required): “Were the checklist questions and explanations easy to understand? *” — options: Yes, Mostly, Somewhat, No. - **Rating** (1–5, required): “Rate the response (1 = Poor, 5 = Excellent): *” diff --git a/openspec/specs/new-rpm-report-api/spec.md b/openspec/specs/new-rpm-report-api/spec.md index 349be33e..32c15b3b 100644 --- a/openspec/specs/new-rpm-report-api/spec.md +++ b/openspec/specs/new-rpm-report-api/spec.md @@ -4,7 +4,7 @@ Support RPM analysis ## Requirements ### Requirement: New RPM report REST endpoint -The system SHALL provide a REST endpoint at `POST /api/v1/reports/new-rpm-report` that accepts a JSON body with string fields `name`, `version`, `release`, `arch`, and **`cveId`** (matching the **`upload-spdx-api`** vulnerability ID property name). The endpoint SHALL validate that every listed field is present and non-empty (after trimming surrounding whitespace). The endpoint SHALL validate that **`arch`**, after trim, is exactly one of the allowed RPM architecture literals: **`x86_64`**, **`amd64`**, **`aarch64`**, **`arm64`**, **`ppc64le`**, **`s390x`** (same set as the Request Analysis RPM UI architecture control). The endpoint SHALL validate the CVE identifier using the official CVE regex pattern `^CVE-[0-9]{4}-[0-9]{4,19}$` (case handling SHALL match existing report upload endpoints). When validation fails, the endpoint SHALL return the same style of structured error response as **`POST /api/v1/products/upload-spdx`** for field-level failures: HTTP 400 with a JSON object whose top-level keys are **request field names** and whose values are **human-readable error strings** for each invalid or missing field (see the validation requirement below). The endpoint SHALL construct a Morpheus-compatible report `input` document, persist a new report record, and **always** enqueue or submit the report for Agent Morpheus analysis using the same mechanism as `POST /api/v1/reports/new` **with submission enabled**. The endpoint SHALL NOT accept a `submit` query parameter or support a persist-only mode. +The system SHALL provide a REST endpoint at `POST /api/v1/reports/new-rpm-report` that accepts a JSON body with string fields `name`, `version`, `release`, `arch`, and **`cveId`** (matching the **`upload-spdx-api`** vulnerability ID property name). The endpoint SHALL validate that every listed field is present and non-empty (after trimming surrounding whitespace). The endpoint SHALL validate that **`arch`**, after trim, is exactly one of the allowed RPM architecture literals: **`x86_64`**, **`amd64`**, **`aarch64`**, **`arm64`**, **`ppc64le`**, **`s390x`** (same set as the Request Analysis RPM UI architecture control). The endpoint SHALL validate the CVE identifier using the official CVE regex pattern `^CVE-[0-9]{4}-[0-9]{4,19}$` (case handling SHALL match existing report upload endpoints). When validation fails, the endpoint SHALL return the same style of structured error response as **`POST /api/v1/products/upload-spdx`** for field-level failures: HTTP 400 with a JSON object whose top-level keys are **request field names** and whose values are **human-readable error strings** for each invalid or missing field (see the validation requirement below). The endpoint SHALL construct a ExploitIQ-compatible report `input` document, persist a new report record, and **always** enqueue or submit the report for ExploitIQ analysis using the same mechanism as `POST /api/v1/reports/new` **with submission enabled**. The endpoint SHALL NOT accept a `submit` query parameter or support a persist-only mode. **Persistence rules:** - The stored report SHALL set `input.image.pipeline_mode` to the string `rpm_package_checker`. @@ -62,9 +62,9 @@ The new endpoint SHALL be documented in the application OpenAPI/Swagger specific - **THEN** the request and response types for `POST /api/v1/reports/new-rpm-report` are available to TypeScript consumers without manually duplicating DTO shapes - **AND** the generated type for **`arch`** reflects the documented enumeration of allowed RPM architectures -### Requirement: Morpheus `input.image` for rpm_package_checker +### Requirement: ExploitIQ `input.image` for rpm_package_checker -When the system builds the Morpheus `input` document for **`POST /api/v1/reports/new-rpm-report`**, the persisted **`report.input.image`** for **`rpm_package_checker`** SHALL include these mandatory fields for Agent Morpheus **`ImageInfoInput`** (upstream **`ImageInfoInput`** in the agent codebase’s **`input.py`**): +When the system builds the ExploitIQ `input` document for **`POST /api/v1/reports/new-rpm-report`**, the persisted **`report.input.image`** for **`rpm_package_checker`** SHALL include these mandatory fields for ExploitIQ **`ImageInfoInput`** (upstream **`ImageInfoInput`** in the agent codebase’s **`input.py`**): - **`pipeline_mode`**: literal **`rpm_package_checker`** - **`analysis_type`**: literal **`source`** (corresponding to **`AnalysisType.SOURCE`**) @@ -81,8 +81,8 @@ The public request body for **`new-rpm-report`** SHALL remain limited to **`name - **AND** **`report.input.image.analysis_type`** is **`source`** - **AND** **`report.input.image.target_package`** equals **`{ name, version, release, ecosystem: "rpm", arch }`** as specified in this capability spec -#### Scenario: Morpheus generate accepts rpm checker payload +#### Scenario: ExploitIQ generate accepts rpm checker payload -- **WHEN** the stored **`input`** for a successfully created RPM report is submitted to Agent Morpheus ingest / generate APIs that validate against **`AgentMorpheusInput`** / **`ImageInfoInput`** +- **WHEN** the stored **`input`** for a successfully created RPM report is submitted to ExploitIQ ingest / generate APIs that validate against **`ExploitIQInput`** / **`ImageInfoInput`** - **THEN** validation errors SHALL NOT occur for missing mandatory **`pipeline_mode`**, **`analysis_type`**, or **`target_package`** on **`image`** diff --git a/openspec/specs/repository-reports-table/spec.md b/openspec/specs/repository-reports-table/spec.md index 001153bb..d4025c41 100644 --- a/openspec/specs/repository-reports-table/spec.md +++ b/openspec/specs/repository-reports-table/spec.md @@ -29,7 +29,7 @@ The repository reports table SHALL display columns: **ID** (first column, width The ID column SHALL display `report.id` as a link to the report page (component route: `/reports/component/{cveId}/{report.id}`; product route: `/reports/product/{productId}/{cveId}/{report.id}`). The **Date Requested** column SHALL display `metadata.submitted_at` when present, in the format "DD Month YYYY, HH:MM:SS AM/PM"; when `metadata.submitted_at` is missing, the cell SHALL display "-". The **Date Completed** column SHALL display `report.completedAt` in the same format. All date fields SHALL use the format "DD Month YYYY, HH:MM:SS AM/PM" (e.g., "07 July 2025, 10:14:02 PM"). -The table SHALL display a single **Finding** column (no separate "Analysis state" or "ExploitIQ Status" column). The Finding cell SHALL show, per row: if the report's analysis state is **completed**, the ExploitIQ status (Vulnerable, Not vulnerable, or Uncertain) from the vulnerability justification; if the report's analysis state is **pending**, **queued**, or **sent**, "In progress" using the shared InProgressStatus component (grey outline label, InProgressIcon); if the report's analysis state is **expired** or **failed**, "Failed" using the shared FailedStatus component (grey filled label, ExclamationCircleIcon). Styling SHALL match the Finding column in the reports table for in-progress and failed states. +The table SHALL display a single **Finding** column (no separate "Analysis state" or "ExploitIQ Status" column). The Finding cell SHALL show, per row: if the report's analysis state is **completed**, the ExploitIQ Status (Vulnerable, Not vulnerable, or Uncertain) from the vulnerability justification; if the report's analysis state is **pending**, **queued**, or **sent**, "In progress" using the shared InProgressStatus component (grey outline label, InProgressIcon); if the report's analysis state is **expired** or **failed**, "Failed" using the shared FailedStatus component (grey filled label, ExclamationCircleIcon). Styling SHALL match the Finding column in the reports table for in-progress and failed states. #### Scenario: Repository reports table columns - **WHEN** a user views the repository reports table diff --git a/openspec/specs/ui-layout/spec.md b/openspec/specs/ui-layout/spec.md index 51599f8e..6c0ea17b 100644 --- a/openspec/specs/ui-layout/spec.md +++ b/openspec/specs/ui-layout/spec.md @@ -23,7 +23,7 @@ The application SHALL display consistent product branding in the page header. #### Scenario: Product name and icon display - **WHEN** a user views any page -- **THEN** the product name "Red Hat Trusted Profile Analyzer ExploitIQ" and icon are visible in the header +- **THEN** the product name "Red Hat ExploitIQ" and icon are visible in the header ### Requirement: Application Navigation The application SHALL provide consistent navigation routes using lowercase paths. All routes SHALL use lowercase letters to follow REST conventions and maintain consistency. diff --git a/pom.xml b/pom.xml index baab926f..a0cf627e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,8 +1,8 @@ 4.0.0 - com.redhat.ecosystemappeng.morpheus - agent-morpheus-client + com.redhat.ecosystemappeng.exploitiq + exploit-iq-client 1.0.0-SNAPSHOT diff --git a/scripts/test-auth.sh b/scripts/test-auth.sh index 71d1f3b0..65b31f40 100755 --- a/scripts/test-auth.sh +++ b/scripts/test-auth.sh @@ -532,7 +532,7 @@ scenario_devservices_github() { -Dquarkus.profile=external-idp \ "-Dquarkus.oidc.auth-server-url=${KC_BASE_URL}/realms/${KC_REALM}" \ "-Dquarkus.oidc.credentials.secret=${APP_CLIENT_SECRET}" \ - -Dmorpheus.syncer.health.url=http://localhost:8088/exploit-iq/component-syncer + -Dexploit-iq.syncer.health.url=http://localhost:8088/exploit-iq/component-syncer } scenario_external_keycloak() { @@ -609,7 +609,7 @@ scenario_external_keycloak() { -Dquarkus.keycloak.devservices.enabled=false \ -Dquarkus.oidc.tls.verification=none \ "-Dquarkus.rest-client.component-syncer.url=http://localhost:8088/exploit-iq/component-syncer" \ - -Dmorpheus.syncer.health.url=http://localhost:8088/exploit-iq/component-syncer + -Dexploit-iq.syncer.health.url=http://localhost:8088/exploit-iq/component-syncer fi } @@ -789,7 +789,7 @@ scenario_import_realm() { "-Dquarkus.oidc.credentials.secret=${APP_CLIENT_SECRET}" \ -Dquarkus.keycloak.devservices.enabled=false \ -Dquarkus.oidc.tls.verification=none \ - -Dmorpheus.syncer.health.url=http://localhost:8088/exploit-iq/component-syncer + -Dexploit-iq.syncer.health.url=http://localhost:8088/exploit-iq/component-syncer fi } diff --git a/src/main/docker/Dockerfile.jvm b/src/main/docker/Dockerfile.jvm index b8ca14d2..1b2d120f 100644 --- a/src/main/docker/Dockerfile.jvm +++ b/src/main/docker/Dockerfile.jvm @@ -7,11 +7,11 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/agent-morpheus-client-jvm . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/exploit-iq-client-jvm . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/agent-morpheus-client-jvm +# docker run -i --rm -p 8080:8080 quarkus/exploit-iq-client-jvm # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. @@ -20,7 +20,7 @@ # # Then run the container using : # -# docker run -i --rm -p 8080:8080 quarkus/agent-morpheus-client-jvm +# docker run -i --rm -p 8080:8080 quarkus/exploit-iq-client-jvm # # This image uses the `run-java.sh` script to run the application. # This scripts computes the command line to execute your Java application, and diff --git a/src/main/docker/Dockerfile.legacy-jar b/src/main/docker/Dockerfile.legacy-jar index 36f4a8bf..3f5e4556 100644 --- a/src/main/docker/Dockerfile.legacy-jar +++ b/src/main/docker/Dockerfile.legacy-jar @@ -7,11 +7,11 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/agent-morpheus-client-legacy-jar . +# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/exploit-iq-client-legacy-jar . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/agent-morpheus-client-legacy-jar +# docker run -i --rm -p 8080:8080 quarkus/exploit-iq-client-legacy-jar # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. @@ -20,7 +20,7 @@ # # Then run the container using : # -# docker run -i --rm -p 8080:8080 quarkus/agent-morpheus-client-legacy-jar +# docker run -i --rm -p 8080:8080 quarkus/exploit-iq-client-legacy-jar # # This image uses the `run-java.sh` script to run the application. # This scripts computes the command line to execute your Java application, and diff --git a/src/main/docker/Dockerfile.multi-stage b/src/main/docker/Dockerfile.multi-stage index 1e842305..0c917aeb 100644 --- a/src/main/docker/Dockerfile.multi-stage +++ b/src/main/docker/Dockerfile.multi-stage @@ -24,11 +24,11 @@ RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | ## Stage 2 : create the docker final image FROM registry.redhat.io/ubi9/ubi-minimal:9.7 -LABEL description="Red Hat Agent Morpheus - UI" -LABEL io.k8s.description="Red Hat Agent Morpheus - UI" -LABEL io.k8s.display-name="Agent Morpheus UI" -LABEL io.openshift.tags="agent morpheus ui" -LABEL summary="The Agent Morpheus UI allows interacting with the Agent Morpheus service" +LABEL description="Red Hat ExploitIQ - UI" +LABEL io.k8s.description="Red Hat ExploitIQ - UI" +LABEL io.k8s.display-name="ExploitIQ UI" +LABEL io.openshift.tags="ExploitIQ ui" +LABEL summary="The ExploitIQ UI allows interacting with the ExploitIQ service" WORKDIR /work/ COPY --from=build /code/target/*-runner /work/application diff --git a/src/main/docker/Dockerfile.native b/src/main/docker/Dockerfile.native index 5ce6d092..c4fdf590 100644 --- a/src/main/docker/Dockerfile.native +++ b/src/main/docker/Dockerfile.native @@ -7,11 +7,11 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/agent-morpheus-client . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/exploit-iq-client . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/agent-morpheus-client +# docker run -i --rm -p 8080:8080 quarkus/exploit-iq-client # ### FROM registry.redhat.io/ubi9/ubi-minimal:9.5 diff --git a/src/main/docker/Dockerfile.native-micro b/src/main/docker/Dockerfile.native-micro index 8c40c7c8..8f5f427b 100644 --- a/src/main/docker/Dockerfile.native-micro +++ b/src/main/docker/Dockerfile.native-micro @@ -10,11 +10,11 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/agent-morpheus-client . +# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/exploit-iq-client . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/agent-morpheus-client +# docker run -i --rm -p 8080:8080 quarkus/exploit-iq-client # ### FROM quay.io/quarkus/quarkus-micro-image:2.0 diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/client/ComponentSyncerService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/client/ComponentSyncerService.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/client/ComponentSyncerService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/client/ComponentSyncerService.java index 885f7693..7cc93156 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/client/ComponentSyncerService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/client/ComponentSyncerService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.client; +package com.redhat.ecosystemappeng.exploitiq.client; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/client/MorpheusService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/client/ExploitIqService.java similarity index 88% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/client/MorpheusService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/client/ExploitIqService.java index 43a34233..e1ebb070 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/client/MorpheusService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/client/ExploitIqService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.client; +package com.redhat.ecosystemappeng.exploitiq.client; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; @@ -24,10 +24,10 @@ import java.util.concurrent.CompletionStage; -@RegisterRestClient(configKey = "morpheus") +@RegisterRestClient(configKey = "exploit-iq") @Produces(MediaType.APPLICATION_JSON) -public interface MorpheusService { - +public interface ExploitIqService { + @POST CompletionStage submitAsync(String request); } diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/client/FeedbackApi.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/client/FeedbackApi.java similarity index 91% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/client/FeedbackApi.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/client/FeedbackApi.java index 849cf135..5de0eb47 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/client/FeedbackApi.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/client/FeedbackApi.java @@ -12,9 +12,9 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.client; +package com.redhat.ecosystemappeng.exploitiq.client; -import com.redhat.ecosystemappeng.morpheus.model.FeedbackDto; +import com.redhat.ecosystemappeng.exploitiq.model.FeedbackDto; import jakarta.ws.rs.*; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/client/GitHubService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/client/GitHubService.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/client/GitHubService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/client/GitHubService.java index 426b0a71..749a9981 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/client/GitHubService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/client/GitHubService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.client; +package com.redhat.ecosystemappeng.exploitiq.client; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/config/AppConfig.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/config/AppConfig.java similarity index 53% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/config/AppConfig.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/config/AppConfig.java index df62e239..af0afcb6 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/config/AppConfig.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/config/AppConfig.java @@ -12,9 +12,11 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.config; +package com.redhat.ecosystemappeng.exploitiq.config; +import java.time.Duration; import java.util.List; +import java.util.Optional; import io.smallrye.config.ConfigMapping; import io.smallrye.config.WithDefault; @@ -29,6 +31,13 @@ @ConfigMapping(prefix = "exploit-iq") public interface AppConfig { Image image(); + Optional queue(); + Optional credentialStore(); + Optional syncer(); + Optional syft(); + Optional engine(); + Optional database(); + Optional audit(); interface Image { Source source(); @@ -44,4 +53,69 @@ interface Source { List<@NotBlank @Pattern(regexp = "^[a-zA-Z0-9.:_/-]+$", message = "Invalid key format") String> commitIdKeys(); } } + + interface Queue { + @WithName("max-active") + int maxActive(); + + @WithName("max-size") + Optional maxSize(); + + Duration timeout(); + } + + interface CredentialStore { + @WithName("encryption-key") + Optional encryptionKey(); + } + + interface Syncer { + Duration timeout(); + + Optional health(); + + interface Health { + Optional url(); + + Duration timeout(); + } + } + + interface Syft { + Optional cache(); + + interface Cache { + Optional dir(); + } + } + + interface Engine { + Optional health(); + + interface Health { + Optional url(); + + Duration timeout(); + } + } + + interface Database { + Optional init(); + + interface Init { + boolean enabled(); + } + } + + interface Audit { + Optional listApi(); + + interface ListApi { + Optional blankList(); + + interface BlankList { + boolean error(); + } + } + } } \ No newline at end of file diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/dev/DatabaseInit.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/dev/DatabaseInit.java similarity index 92% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/dev/DatabaseInit.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/dev/DatabaseInit.java index 70cb5ae3..235841d5 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/dev/DatabaseInit.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/dev/DatabaseInit.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.dev; +package com.redhat.ecosystemappeng.exploitiq.dev; import java.io.File; import java.io.IOException; @@ -39,12 +39,12 @@ import jakarta.inject.Singleton; /** - * Registers only when {@code morpheus.database.init.enabled} is true at build time. + * Registers only when {@code exploit-iq.database.init.enabled} is true at build time. * {@code %dev} and {@code %test} set this in {@code application.properties}; production * builds leave it unset so this bean is not included. */ @Singleton -@IfBuildProperty(name = "morpheus.database.init.enabled", stringValue = "true") +@IfBuildProperty(name = "exploit-iq.database.init.enabled", stringValue = "true") public class DatabaseInit { private static final Logger LOGGER = Logger.getLogger(DatabaseInit.class); @@ -55,10 +55,10 @@ public class DatabaseInit { @ConfigProperty(name = "quarkus.mongodb.database") String dbName; - @ConfigProperty(name = "morpheus.repository.reports-path", defaultValue = "src/test/resources/devservices/reports") + @ConfigProperty(name = "exploit-iq.repository.reports-path", defaultValue = "src/test/resources/devservices/reports") String reportsPath; - @ConfigProperty(name = "morpheus.repository.products-path", defaultValue = "src/test/resources/devservices/products") + @ConfigProperty(name = "exploit-iq.repository.products-path", defaultValue = "src/test/resources/devservices/products") String productsPath; @Startup @@ -144,7 +144,7 @@ private void loadReports() { folder = new File(reportsPath); if (!folder.isDirectory()) { throw new IllegalArgumentException( - "The morpheus.repository.reports-path must be a valid directory: " + reportsPath); + "The exploit-iq.repository.reports-path must be a valid directory: " + reportsPath); } } diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/CveIdValidationException.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/CveIdValidationException.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/exception/CveIdValidationException.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/CveIdValidationException.java index 2a995b43..c2327aae 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/CveIdValidationException.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/CveIdValidationException.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.exception; +package com.redhat.ecosystemappeng.exploitiq.exception; /** * Exception thrown when CVE ID validation fails (e.g. missing, empty, or invalid format). diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/ForbiddenExceptionMapper.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/ForbiddenExceptionMapper.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/exception/ForbiddenExceptionMapper.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/ForbiddenExceptionMapper.java index 15b273ee..635de427 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/ForbiddenExceptionMapper.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/ForbiddenExceptionMapper.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.exception; +package com.redhat.ecosystemappeng.exploitiq.exception; import io.quarkus.security.ForbiddenException; import jakarta.ws.rs.core.Context; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/McpClientAlreadyExistsException.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/McpClientAlreadyExistsException.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/exception/McpClientAlreadyExistsException.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/McpClientAlreadyExistsException.java index 368f74ff..fe3217d1 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/McpClientAlreadyExistsException.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/McpClientAlreadyExistsException.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.exception; +package com.redhat.ecosystemappeng.exploitiq.exception; public class McpClientAlreadyExistsException extends RuntimeException { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationException.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationException.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationException.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationException.java index 8f3f9aed..6eed1137 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationException.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationException.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.exception; +package com.redhat.ecosystemappeng.exploitiq.exception; import java.util.List; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationIssueCode.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationIssueCode.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationIssueCode.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationIssueCode.java index ca0f4d1d..efe0c12a 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationIssueCode.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationIssueCode.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.exception; +package com.redhat.ecosystemappeng.exploitiq.exception; /** * Machine-readable SBOM validation issues returned to clients when metadata is incomplete. diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationMessages.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationMessages.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationMessages.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationMessages.java index 3c0b31d4..31fc23a4 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationMessages.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationMessages.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.exception; +package com.redhat.ecosystemappeng.exploitiq.exception; import java.util.List; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SyftExecutionException.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SyftExecutionException.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SyftExecutionException.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SyftExecutionException.java index 59f30661..4c6f7dae 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/SyftExecutionException.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/SyftExecutionException.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.exception; +package com.redhat.ecosystemappeng.exploitiq.exception; /** * Exception thrown when syft command execution fails. diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/ValidationException.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/ValidationException.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/exception/ValidationException.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/ValidationException.java index 1a7a9e9c..e1147b0e 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/exception/ValidationException.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/exception/ValidationException.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.exception; +package com.redhat.ecosystemappeng.exploitiq.exception; import java.util.Map; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/health/ComponentSyncerHealthCheck.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/health/ComponentSyncerHealthCheck.java similarity index 92% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/health/ComponentSyncerHealthCheck.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/health/ComponentSyncerHealthCheck.java index 0d099a96..cb76e4f1 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/health/ComponentSyncerHealthCheck.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/health/ComponentSyncerHealthCheck.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.health; +package com.redhat.ecosystemappeng.exploitiq.health; import io.smallrye.health.api.HealthGroup; import io.vertx.mutiny.ext.web.client.WebClient; @@ -31,10 +31,10 @@ public class ComponentSyncerHealthCheck implements HealthCheck { @Inject WebClient client; - @ConfigProperty(name = "morpheus.syncer.health.url") + @ConfigProperty(name = "exploit-iq.syncer.health.url") String componentSyncerHealthUrl; - @ConfigProperty(name = "morpheus.syncer.health.timeout") + @ConfigProperty(name = "exploit-iq.syncer.health.timeout") Duration componentSyncerHealthTimeout; // Intentionally send an invalid payload to check service availability, but // not to initiate job creation. diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/health/EngineHealthCheck.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/health/EngineHealthCheck.java similarity index 91% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/health/EngineHealthCheck.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/health/EngineHealthCheck.java index 105dd3c6..b86a1a17 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/health/EngineHealthCheck.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/health/EngineHealthCheck.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.health; +package com.redhat.ecosystemappeng.exploitiq.health; import io.vertx.mutiny.ext.web.client.WebClient; import jakarta.enterprise.context.ApplicationScoped; @@ -30,10 +30,10 @@ public class EngineHealthCheck implements HealthCheck { @Inject WebClient client; - @ConfigProperty(name = "morpheus.engine.health.url") + @ConfigProperty(name = "exploit-iq.engine.health.url") String engineHealthUrl; - @ConfigProperty(name = "morpheus.engine.health.timeout") + @ConfigProperty(name = "exploit-iq.engine.health.timeout") Duration engineHealthTimeout; private static final int EXPECTED_STATUS = 200; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/health/HealthUtils.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/health/HealthUtils.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/health/HealthUtils.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/health/HealthUtils.java index 9369cd92..5c7c4772 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/health/HealthUtils.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/health/HealthUtils.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.health; +package com.redhat.ecosystemappeng.exploitiq.health; import java.io.IOException; import java.net.ConnectException; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/metrics/AgentMorpheusBusinessInsights.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/metrics/ExploitIqBusinessInsights.java similarity index 92% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/metrics/AgentMorpheusBusinessInsights.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/metrics/ExploitIqBusinessInsights.java index 7b8c577a..166dfeaf 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/metrics/AgentMorpheusBusinessInsights.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/metrics/ExploitIqBusinessInsights.java @@ -12,13 +12,12 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.metrics; +package com.redhat.ecosystemappeng.exploitiq.metrics; import com.mongodb.client.MongoCollection; -import com.redhat.ecosystemappeng.morpheus.model.Report; -import com.redhat.ecosystemappeng.morpheus.repository.ReportRepositoryService; -import io.micrometer.core.instrument.MeterRegistry; +import com.redhat.ecosystemappeng.exploitiq.model.Report; +import com.redhat.ecosystemappeng.exploitiq.repository.ReportRepositoryService; import io.quarkus.scheduler.Scheduled; import jakarta.annotation.PostConstruct; import jakarta.annotation.Priority; @@ -31,18 +30,17 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.StreamSupport; -import static com.redhat.ecosystemappeng.morpheus.metrics.AgentMorpheusMetrics.JUSTIFICATIONS_ERRORS; -import static com.redhat.ecosystemappeng.morpheus.metrics.AgentMorpheusMetrics.STATE_ERRORS; +import static com.redhat.ecosystemappeng.exploitiq.metrics.ExploitIqMetrics.JUSTIFICATIONS_ERRORS; +import static com.redhat.ecosystemappeng.exploitiq.metrics.ExploitIqMetrics.STATE_ERRORS; import static java.util.stream.Collectors.groupingBy; @Singleton @Priority(1) -public class AgentMorpheusBusinessInsights { +public class ExploitIqBusinessInsights { // "false_positive": "false_positive", // "code_not_present": "code_not_present", diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/metrics/AgentMorpheusMetrics.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/metrics/ExploitIqMetrics.java similarity index 69% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/metrics/AgentMorpheusMetrics.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/metrics/ExploitIqMetrics.java index 1feeaa29..146e14b6 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/metrics/AgentMorpheusMetrics.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/metrics/ExploitIqMetrics.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.metrics; +package com.redhat.ecosystemappeng.exploitiq.metrics; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.FunctionCounter; @@ -31,23 +31,23 @@ @Startup @Priority(2) -public class AgentMorpheusMetrics { +public class ExploitIqMetrics { static final Set JUSTIFICATIONS_ERRORS = Set.of("uncertain","insufficient_intel"); static final Set STATE_ERRORS = Set.of("failed","unknown","expired"); private final MeterRegistry registry; - private final AgentMorpheusBusinessInsights agentMorpheusBusinessInsights; + private final ExploitIqBusinessInsights exploitIqBusinessInsights; - AgentMorpheusMetrics(MeterRegistry registry,AgentMorpheusBusinessInsights agentMorpheusBusinessInsights) { - this.agentMorpheusBusinessInsights = agentMorpheusBusinessInsights; - // Register counter metric as per agent morpheus justification label + ExploitIqMetrics(MeterRegistry registry, ExploitIqBusinessInsights exploitIqBusinessInsights) { + this.exploitIqBusinessInsights = exploitIqBusinessInsights; + // Register counter metric as per ExploitIQ justification label this.registry = registry; - ConcurrentMap justificationLabelsInSystem = agentMorpheusBusinessInsights.getJustificationLabelsInSystem(); + ConcurrentMap justificationLabelsInSystem = exploitIqBusinessInsights.getJustificationLabelsInSystem(); for (Map.Entry label : justificationLabelsInSystem.entrySet()) { - Gauge.builder(String.format("morpheus_results_label_%s_count", label.getKey()), - () -> agentMorpheusBusinessInsights.countJustificationLabels(label.getKey())) + Gauge.builder(String.format("exploit_iq_results_label_%s_count", label.getKey()), + () -> exploitIqBusinessInsights.countJustificationLabels(label.getKey())) .description(String.format("Counter of reports returned with result label=%s", label.getKey())) .baseUnit("operations") .tag("type", "business") @@ -58,10 +58,10 @@ public class AgentMorpheusMetrics { } - ConcurrentMap statesOfReports = agentMorpheusBusinessInsights.getStatesOfReports(); + ConcurrentMap statesOfReports = exploitIqBusinessInsights.getStatesOfReports(); for (Map.Entry state : statesOfReports.entrySet()) { - Gauge.builder(String.format("morpheus_reports_state_%s_total", state.getKey()), - () -> agentMorpheusBusinessInsights.countStateOfReports(state.getKey())) + Gauge.builder(String.format("exploit_iq_reports_state_%s_total", state.getKey()), + () -> exploitIqBusinessInsights.countStateOfReports(state.getKey())) .description(String.format("Counter of reports ended with state=%s", state.getKey())) .tag("type", "business") .tag("is_erroneous_result", STATE_ERRORS.contains(state.getKey()) ? "true" : "false" ) @@ -74,8 +74,8 @@ public class AgentMorpheusMetrics { @Startup @Produces public Gauge rateOfSuccessfulReports() { - return Gauge.builder("morpheus_rate_of_successful_reports", - () -> agentMorpheusBusinessInsights.calculateRateOfSuccessfulReports()) + return Gauge.builder("exploit_iq_rate_of_successful_reports", + () -> exploitIqBusinessInsights.calculateRateOfSuccessfulReports()) .description("rate of reports with state of completed or not failed/unknown") .tag("type", "business") .register(this.registry); @@ -84,8 +84,8 @@ public Gauge rateOfSuccessfulReports() { @Startup @Produces public Gauge rateOfSuccessfulResults() { - return Gauge.builder("morpheus_rate_of_successful_results", - () -> agentMorpheusBusinessInsights.calculateRateOfSuccessfulResults()) + return Gauge.builder("exploit_iq_rate_of_successful_results", + () -> exploitIqBusinessInsights.calculateRateOfSuccessfulResults()) .description("rate of reports with a concrete positive result of analysis , not uncertain or insufficient_intel") .tag("type", "business") .register(this.registry); diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/CredentialData.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/CredentialData.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/CredentialData.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/CredentialData.java index 6c8e4508..452bdd79 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/CredentialData.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/CredentialData.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import jakarta.ws.rs.BadRequestException; import java.util.Objects; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/CredentialType.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/CredentialType.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/CredentialType.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/CredentialType.java index 995ebe31..fd35bb6e 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/CredentialType.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/CredentialType.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ErrorResponse.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ErrorResponse.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ErrorResponse.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ErrorResponse.java index 3dc0f80b..1534bb42 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ErrorResponse.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ErrorResponse.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/FailedComponent.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/FailedComponent.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/FailedComponent.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/FailedComponent.java index 1468421a..e36e0eb0 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/FailedComponent.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/FailedComponent.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import org.eclipse.microprofile.openapi.annotations.media.Schema; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/FeedbackDto.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/FeedbackDto.java similarity index 98% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/FeedbackDto.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/FeedbackDto.java index fefed886..2dcb17fb 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/FeedbackDto.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/FeedbackDto.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/InlineCredential.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/InlineCredential.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/InlineCredential.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/InlineCredential.java index 938f6ff3..03cb9beb 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/InlineCredential.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/InlineCredential.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Justification.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Justification.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/Justification.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Justification.java index 1c773267..e106ad4a 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Justification.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Justification.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/MarkReportFailedRequest.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/MarkReportFailedRequest.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/MarkReportFailedRequest.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/MarkReportFailedRequest.java index fe2a1798..c8e3bff9 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/MarkReportFailedRequest.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/MarkReportFailedRequest.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/McpClientRegistration.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/McpClientRegistration.java similarity index 51% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/McpClientRegistration.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/McpClientRegistration.java index 7fb30e33..a034f26c 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/McpClientRegistration.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/McpClientRegistration.java @@ -12,10 +12,10 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; -import com.redhat.ecosystemappeng.morpheus.model.validation.ValidInstant; +import com.redhat.ecosystemappeng.exploitiq.model.validation.ValidInstant; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import org.eclipse.microprofile.openapi.annotations.media.Schema; @@ -26,23 +26,23 @@ @Schema(name = "McpClientRegistration", description = "MCP OAuth client registration for compliance auditing") @RegisterForReflection public record McpClientRegistration( - @NotBlank - @Schema(required = true, description = "Unique client identifier (UUID)") - String clientId, - @NotBlank - @Schema(required = true, description = "Client display name") - String clientName, - @NotNull - @Schema(required = true, description = "Registered OAuth redirect URIs") - List redirectUris, - @NotNull - @Schema(required = true, description = "OAuth grant types") - List grantTypes, - @NotBlank - @ValidInstant - @Schema(required = true, description = "Registration timestamp (ISO 8601)") - String registeredAt, - @NotNull - @Schema(required = true, description = "Full OAuth client information blob from MCP SDK DCR — contains redirect_uris, grant_types, token_endpoint_auth_method, scope, and other RFC 7591 client metadata (client_secret is stripped before persistence)") - Map clientData + @NotBlank + @Schema(required = true, description = "Unique client identifier (UUID)") + String clientId, + @NotBlank + @Schema(required = true, description = "Client display name") + String clientName, + @NotNull + @Schema(required = true, description = "Registered OAuth redirect URIs") + List redirectUris, + @NotNull + @Schema(required = true, description = "OAuth grant types") + List grantTypes, + @NotBlank + @ValidInstant + @Schema(required = true, description = "Registration timestamp (ISO 8601)") + String registeredAt, + @NotNull + @Schema(required = true, description = "Full OAuth client information blob from MCP SDK DCR — contains redirect_uris, grant_types, token_endpoint_auth_method, scope, and other RFC 7591 client metadata (client_secret is stripped before persistence)") + Map clientData ) {} \ No newline at end of file diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/NewRpmReportRequest.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/NewRpmReportRequest.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/NewRpmReportRequest.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/NewRpmReportRequest.java index c4c83b82..089ae9f1 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/NewRpmReportRequest.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/NewRpmReportRequest.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/OverviewMetricsDTO.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/OverviewMetricsDTO.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/OverviewMetricsDTO.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/OverviewMetricsDTO.java index f87b3812..47bef96a 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/OverviewMetricsDTO.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/OverviewMetricsDTO.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/PaginatedResult.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/PaginatedResult.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/PaginatedResult.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/PaginatedResult.java index 8bb7308c..2aa83c10 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/PaginatedResult.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/PaginatedResult.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import java.util.stream.Stream; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Pagination.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Pagination.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/Pagination.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Pagination.java index 835e3b68..5f31d300 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Pagination.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Pagination.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ParsedCycloneDx.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ParsedCycloneDx.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ParsedCycloneDx.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ParsedCycloneDx.java index 289b8e56..39355229 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ParsedCycloneDx.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ParsedCycloneDx.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import com.fasterxml.jackson.databind.JsonNode; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/PreProcessingRequest.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/PreProcessingRequest.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/PreProcessingRequest.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/PreProcessingRequest.java index 5496db3f..b039bcee 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/PreProcessingRequest.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/PreProcessingRequest.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Product.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Product.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/Product.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Product.java index 14d34034..563735e2 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Product.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Product.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import org.eclipse.microprofile.openapi.annotations.media.Schema; import org.eclipse.microprofile.openapi.annotations.enums.SchemaType; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ProductReportsSummary.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ProductReportsSummary.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ProductReportsSummary.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ProductReportsSummary.java index 3542289f..758d3372 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ProductReportsSummary.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ProductReportsSummary.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import java.util.Map; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ProductSummary.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ProductSummary.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ProductSummary.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ProductSummary.java index 8e2a4463..90574fdd 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ProductSummary.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ProductSummary.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Report.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Report.java similarity index 98% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/Report.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Report.java index 4ea86073..57465caa 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Report.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Report.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import java.util.Map; import java.util.Set; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportData.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportData.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportData.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportData.java index 33f58442..3cd68d85 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportData.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportData.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import com.fasterxml.jackson.databind.JsonNode; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportReceivedEvent.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportReceivedEvent.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportReceivedEvent.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportReceivedEvent.java index 71034652..2e7741f2 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportReceivedEvent.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportReceivedEvent.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportRequest.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportRequest.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportRequest.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportRequest.java index 8315283e..911e95fe 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportRequest.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportRequest.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import java.util.Collection; import java.util.Map; @@ -20,14 +20,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonView; import com.fasterxml.jackson.databind.JsonNode; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.SbomInfoType; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.SbomInfoType; import org.eclipse.microprofile.openapi.annotations.media.Schema; import org.eclipse.microprofile.openapi.annotations.enums.SchemaType; import io.quarkus.runtime.annotations.RegisterForReflection; import jakarta.validation.Valid; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.Image; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.Image; @Schema(name = "ReportRequest", description = "A single report request") @RegisterForReflection diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportRequestId.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportRequestId.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportRequestId.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportRequestId.java index b6a03bf6..5cf194ef 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportRequestId.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportRequestId.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import org.eclipse.microprofile.openapi.annotations.media.Schema; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportSseMessage.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportSseMessage.java similarity index 90% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportSseMessage.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportSseMessage.java index bf3f34c6..362878b8 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportSseMessage.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportSseMessage.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportWithStatus.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportWithStatus.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportWithStatus.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportWithStatus.java index 49c262b5..e104ae3a 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ReportWithStatus.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ReportWithStatus.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import com.fasterxml.jackson.databind.JsonNode; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/SortField.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/SortField.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/SortField.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/SortField.java index 58e4dfb0..fe2cbbdf 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/SortField.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/SortField.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import java.util.List; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/SortType.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/SortType.java similarity index 93% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/SortType.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/SortType.java index cd1281b8..59b26b15 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/SortType.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/SortType.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/TargetPackage.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/TargetPackage.java similarity index 91% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/TargetPackage.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/TargetPackage.java index b15ca38e..d48c24c9 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/TargetPackage.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/TargetPackage.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import org.eclipse.microprofile.openapi.annotations.media.Schema; @@ -20,7 +20,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -/** RPM package identity for Agent Morpheus RPM package checker pipeline. */ +/** RPM package identity for ExploitIQ agent RPM package checker pipeline. */ @Schema(name = "TargetPackage", description = "RPM target package descriptor for rpm_package_checker pipeline") @JsonInclude(JsonInclude.Include.NON_EMPTY) @RegisterForReflection diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/UserComments.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/UserComments.java similarity index 99% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/UserComments.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/UserComments.java index 81f427fe..54cc6012 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/UserComments.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/UserComments.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ValidationErrorResponse.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ValidationErrorResponse.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/ValidationErrorResponse.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ValidationErrorResponse.java index d393d96a..da8d6043 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/ValidationErrorResponse.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/ValidationErrorResponse.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import java.util.Map; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Views.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Views.java similarity index 93% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/Views.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Views.java index bf8cb977..fc49ff42 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/Views.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/Views.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; public class Views { public static class Public { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/VulnResult.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/VulnResult.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/VulnResult.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/VulnResult.java index 42061cc7..16c28216 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/VulnResult.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/VulnResult.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model; +package com.redhat.ecosystemappeng.exploitiq.model; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Batch.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Batch.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Batch.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Batch.java index 9033551f..ec5e9ce4 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Batch.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Batch.java @@ -12,21 +12,19 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.audit; +package com.redhat.ecosystemappeng.exploitiq.model.audit; -import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; import io.quarkus.runtime.annotations.RegisterForReflection; import jakarta.annotation.Nullable; import jakarta.validation.constraints.*; import org.eclipse.microprofile.openapi.annotations.media.Schema; -import java.time.Duration; import java.time.LocalDateTime; import java.util.List; -import static com.redhat.ecosystemappeng.morpheus.repository.JobRepositoryService.*; +import static com.redhat.ecosystemappeng.exploitiq.repository.JobRepositoryService.*; @RegisterForReflection public class Batch { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/BatchType.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/BatchType.java similarity index 93% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/BatchType.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/BatchType.java index 2e20ca11..d81d2a26 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/BatchType.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/BatchType.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.audit; +package com.redhat.ecosystemappeng.exploitiq.model.audit; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Eval.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Eval.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Eval.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Eval.java index c502a99d..803a9750 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Eval.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Eval.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.audit; +package com.redhat.ecosystemappeng.exploitiq.model.audit; import com.fasterxml.jackson.annotation.JsonProperty; import io.quarkus.runtime.annotations.RegisterForReflection; @@ -23,8 +23,8 @@ import java.time.LocalDateTime; -import static com.redhat.ecosystemappeng.morpheus.repository.JobRepositoryService.*; -import static com.redhat.ecosystemappeng.morpheus.service.audit.AuditService.REGEX_PATTERN_FOR_CVE; +import static com.redhat.ecosystemappeng.exploitiq.repository.JobRepositoryService.*; +import static com.redhat.ecosystemappeng.exploitiq.service.audit.AuditService.REGEX_PATTERN_FOR_CVE; @RegisterForReflection public class Eval { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Job.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Job.java similarity index 93% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Job.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Job.java index ce30492c..75341b91 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Job.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Job.java @@ -12,10 +12,9 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.audit; +package com.redhat.ecosystemappeng.exploitiq.model.audit; import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; import io.quarkus.runtime.annotations.RegisterForReflection; import jakarta.validation.constraints.PastOrPresent; @@ -25,9 +24,9 @@ import java.time.LocalDateTime; import java.util.Map; -import static com.redhat.ecosystemappeng.morpheus.repository.JobRepositoryService.*; -import static com.redhat.ecosystemappeng.morpheus.service.audit.AuditService.REGEX_ALLOWED_LANGUAGES; -import static com.redhat.ecosystemappeng.morpheus.service.audit.AuditService.REGEX_PATTERN_FOR_CVE; +import static com.redhat.ecosystemappeng.exploitiq.repository.JobRepositoryService.*; +import static com.redhat.ecosystemappeng.exploitiq.service.audit.AuditService.REGEX_ALLOWED_LANGUAGES; +import static com.redhat.ecosystemappeng.exploitiq.service.audit.AuditService.REGEX_PATTERN_FOR_CVE; @RegisterForReflection public class Job { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/LLMStage.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/LLMStage.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/LLMStage.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/LLMStage.java index 926923fa..59976b58 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/LLMStage.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/LLMStage.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.audit; +package com.redhat.ecosystemappeng.exploitiq.model.audit; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/MetricName.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/MetricName.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/MetricName.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/MetricName.java index 5a266a74..df34cf7e 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/MetricName.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/MetricName.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.audit; +package com.redhat.ecosystemappeng.exploitiq.model.audit; public enum MetricName { INTEL_SCORE_FIDELITY, diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Trace.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Trace.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Trace.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Trace.java index 3e487536..3e5011cb 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/audit/Trace.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/audit/Trace.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.audit; +package com.redhat.ecosystemappeng.exploitiq.model.audit; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -24,7 +24,7 @@ import java.time.LocalDateTime; import java.util.Map; -import static com.redhat.ecosystemappeng.morpheus.repository.JobRepositoryService.*; +import static com.redhat.ecosystemappeng.exploitiq.repository.JobRepositoryService.*; @RegisterForReflection public class Trace { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/Image.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/Image.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/Image.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/Image.java index ff40f323..54ab7b79 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/Image.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/Image.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.morpheus; +package com.redhat.ecosystemappeng.exploitiq.model.exploitiq; import java.util.Collection; @@ -27,7 +27,7 @@ import org.eclipse.microprofile.openapi.annotations.media.Schema; import org.eclipse.microprofile.openapi.annotations.enums.SchemaType; -import com.redhat.ecosystemappeng.morpheus.model.TargetPackage; +import com.redhat.ecosystemappeng.exploitiq.model.TargetPackage; @Schema(name = "Image", description = "Image data") @RegisterForReflection diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/PipelineMode.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/PipelineMode.java similarity index 89% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/PipelineMode.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/PipelineMode.java index 2a52bfc9..4c860567 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/PipelineMode.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/PipelineMode.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.morpheus; +package com.redhat.ecosystemappeng.exploitiq.model.exploitiq; import com.fasterxml.jackson.annotation.JsonValue; @@ -20,7 +20,7 @@ import org.eclipse.microprofile.openapi.annotations.media.Schema; -@Schema(name = "PipelineMode", description = "Morpheus agent pipeline mode") +@Schema(name = "PipelineMode", description = "ExploitIQ pipeline mode") @RegisterForReflection public enum PipelineMode { FULL_PIPELINE("full_pipeline"), diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/ReportInput.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/ReportInput.java similarity index 93% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/ReportInput.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/ReportInput.java index 22171d6c..c7c098c6 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/ReportInput.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/ReportInput.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.morpheus; +package com.redhat.ecosystemappeng.exploitiq.model.exploitiq; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/SbomInfoType.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/SbomInfoType.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/SbomInfoType.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/SbomInfoType.java index b547f1ee..a6dc369e 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/SbomInfoType.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/SbomInfoType.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.morpheus; +package com.redhat.ecosystemappeng.exploitiq.model.exploitiq; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/Scan.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/Scan.java similarity index 93% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/Scan.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/Scan.java index f008f913..b6e6b370 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/Scan.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/Scan.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.morpheus; +package com.redhat.ecosystemappeng.exploitiq.model.exploitiq; import java.util.Collection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/SourceInfo.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/SourceInfo.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/SourceInfo.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/SourceInfo.java index 59614896..663ba7db 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/SourceInfo.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/SourceInfo.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.morpheus; +package com.redhat.ecosystemappeng.exploitiq.model.exploitiq; import java.util.Collection; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/VulnId.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/VulnId.java similarity index 93% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/VulnId.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/VulnId.java index 60aacf70..850a6222 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/morpheus/VulnId.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/exploitiq/VulnId.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.morpheus; +package com.redhat.ecosystemappeng.exploitiq.model.exploitiq; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/validation/ValidInstant.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/validation/ValidInstant.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/validation/ValidInstant.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/validation/ValidInstant.java index 81c5da9e..70ac8fa5 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/validation/ValidInstant.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/validation/ValidInstant.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.validation; +package com.redhat.ecosystemappeng.exploitiq.model.validation; import jakarta.validation.Constraint; import jakarta.validation.Payload; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/validation/ValidInstantValidator.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/validation/ValidInstantValidator.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/model/validation/ValidInstantValidator.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/model/validation/ValidInstantValidator.java index 1fa61a80..0d19352a 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/model/validation/ValidInstantValidator.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/model/validation/ValidInstantValidator.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.model.validation; +package com.redhat.ecosystemappeng.exploitiq.model.validation; import jakarta.validation.ConstraintValidator; import jakarta.validation.ConstraintValidatorContext; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/AuditRepository.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/AuditRepository.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/repository/AuditRepository.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/AuditRepository.java index c1a2a0a4..d8bdd44d 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/AuditRepository.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/AuditRepository.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.repository; +package com.redhat.ecosystemappeng.exploitiq.repository; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/BatchRepositoryService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/BatchRepositoryService.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/repository/BatchRepositoryService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/BatchRepositoryService.java index 1eeacbe2..cfc61136 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/BatchRepositoryService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/BatchRepositoryService.java @@ -12,14 +12,14 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.repository; +package com.redhat.ecosystemappeng.exploitiq.repository; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoCollection; import com.mongodb.client.model.Filters; import com.mongodb.client.model.Indexes; import com.mongodb.client.model.Sorts; -import com.redhat.ecosystemappeng.morpheus.model.audit.BatchType; +import com.redhat.ecosystemappeng.exploitiq.model.audit.BatchType; import io.quarkus.runtime.annotations.RegisterForReflection; import jakarta.annotation.PostConstruct; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/EvalRepositoryService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/EvalRepositoryService.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/repository/EvalRepositoryService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/EvalRepositoryService.java index c015c1e4..52846cae 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/EvalRepositoryService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/EvalRepositoryService.java @@ -12,14 +12,14 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.repository; +package com.redhat.ecosystemappeng.exploitiq.repository; import com.fasterxml.jackson.core.JsonProcessingException; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoCollection; import com.mongodb.client.model.Filters; import com.mongodb.client.model.Indexes; -import com.redhat.ecosystemappeng.morpheus.model.audit.Eval; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Eval; import jakarta.annotation.PostConstruct; import jakarta.inject.Inject; import jakarta.inject.Singleton; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/JobRepositoryService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/JobRepositoryService.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/repository/JobRepositoryService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/JobRepositoryService.java index 9842ab42..5c950fc6 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/JobRepositoryService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/JobRepositoryService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.repository; +package com.redhat.ecosystemappeng.exploitiq.repository; import com.fasterxml.jackson.core.JsonProcessingException; import com.mongodb.client.MongoClient; @@ -20,8 +20,7 @@ import com.mongodb.client.model.Filters; import com.mongodb.client.model.Indexes; import com.mongodb.client.model.Sorts; -import com.redhat.ecosystemappeng.morpheus.model.audit.Job; -import com.redhat.ecosystemappeng.morpheus.service.audit.JobService; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Job; import io.quarkus.runtime.annotations.RegisterForReflection; import jakarta.annotation.PostConstruct; import jakarta.inject.Inject; @@ -36,7 +35,7 @@ import java.util.Objects; import java.util.stream.Collectors; -import static com.redhat.ecosystemappeng.morpheus.service.audit.AuditService.THRESHOLD_NUMBER_OF_DB_ITEMS_FOR_PARALLEL_PROCESSING; +import static com.redhat.ecosystemappeng.exploitiq.service.audit.AuditService.THRESHOLD_NUMBER_OF_DB_ITEMS_FOR_PARALLEL_PROCESSING; @Singleton @RegisterForReflection(targets = { Document.class }) diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/McpClientRepositoryService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/McpClientRepositoryService.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/repository/McpClientRepositoryService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/McpClientRepositoryService.java index 0baf796b..1c128e8c 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/McpClientRepositoryService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/McpClientRepositoryService.java @@ -12,15 +12,15 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.repository; +package com.redhat.ecosystemappeng.exploitiq.repository; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoCollection; import com.mongodb.client.model.Filters; import com.mongodb.client.model.IndexOptions; import com.mongodb.client.model.Indexes; -import com.redhat.ecosystemappeng.morpheus.model.McpClientRegistration; -import com.redhat.ecosystemappeng.morpheus.model.PaginatedResult; +import com.redhat.ecosystemappeng.exploitiq.model.McpClientRegistration; +import com.redhat.ecosystemappeng.exploitiq.model.PaginatedResult; import io.quarkus.runtime.annotations.RegisterForReflection; import jakarta.annotation.PostConstruct; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/ProductRepositoryService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/ProductRepositoryService.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/repository/ProductRepositoryService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/ProductRepositoryService.java index fd8a4f81..7b5b10a1 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/ProductRepositoryService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/ProductRepositoryService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.repository; +package com.redhat.ecosystemappeng.exploitiq.repository; import java.time.Instant; import java.util.ArrayList; @@ -34,10 +34,10 @@ import com.mongodb.client.model.Sorts; import com.mongodb.client.model.Updates; import org.bson.conversions.Bson; -import com.redhat.ecosystemappeng.morpheus.model.FailedComponent; -import com.redhat.ecosystemappeng.morpheus.model.Product; -import com.redhat.ecosystemappeng.morpheus.service.ReportSseBroadcaster; -import com.redhat.ecosystemappeng.morpheus.service.RepositoryConstants; +import com.redhat.ecosystemappeng.exploitiq.model.FailedComponent; +import com.redhat.ecosystemappeng.exploitiq.model.Product; +import com.redhat.ecosystemappeng.exploitiq.service.ReportSseBroadcaster; +import com.redhat.ecosystemappeng.exploitiq.service.RepositoryConstants; import io.quarkus.runtime.annotations.RegisterForReflection; import jakarta.enterprise.context.ApplicationScoped; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/ReportRepositoryService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/ReportRepositoryService.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/repository/ReportRepositoryService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/ReportRepositoryService.java index 42e47a88..cd818d31 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/ReportRepositoryService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/ReportRepositoryService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.repository; +package com.redhat.ecosystemappeng.exploitiq.repository; import java.time.Instant; import java.util.ArrayList; @@ -45,18 +45,18 @@ import com.mongodb.client.model.Sorts; import com.mongodb.client.model.UpdateOneModel; import com.mongodb.client.model.Updates; -import com.redhat.ecosystemappeng.morpheus.model.FailedComponent; -import com.redhat.ecosystemappeng.morpheus.model.Justification; -import com.redhat.ecosystemappeng.morpheus.model.PaginatedResult; -import com.redhat.ecosystemappeng.morpheus.model.Pagination; -import com.redhat.ecosystemappeng.morpheus.model.Product; -import com.redhat.ecosystemappeng.morpheus.model.ProductReportsSummary; -import com.redhat.ecosystemappeng.morpheus.model.Report; -import com.redhat.ecosystemappeng.morpheus.model.SortField; -import com.redhat.ecosystemappeng.morpheus.model.SortType; -import com.redhat.ecosystemappeng.morpheus.model.VulnResult; -import com.redhat.ecosystemappeng.morpheus.service.ReportSseBroadcaster; -import com.redhat.ecosystemappeng.morpheus.service.RepositoryConstants; +import com.redhat.ecosystemappeng.exploitiq.model.FailedComponent; +import com.redhat.ecosystemappeng.exploitiq.model.Justification; +import com.redhat.ecosystemappeng.exploitiq.model.PaginatedResult; +import com.redhat.ecosystemappeng.exploitiq.model.Pagination; +import com.redhat.ecosystemappeng.exploitiq.model.Product; +import com.redhat.ecosystemappeng.exploitiq.model.ProductReportsSummary; +import com.redhat.ecosystemappeng.exploitiq.model.Report; +import com.redhat.ecosystemappeng.exploitiq.model.SortField; +import com.redhat.ecosystemappeng.exploitiq.model.SortType; +import com.redhat.ecosystemappeng.exploitiq.model.VulnResult; +import com.redhat.ecosystemappeng.exploitiq.service.ReportSseBroadcaster; +import com.redhat.ecosystemappeng.exploitiq.service.RepositoryConstants; import io.quarkus.runtime.annotations.RegisterForReflection; import jakarta.annotation.PostConstruct; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/TraceRepositoryService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/TraceRepositoryService.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/repository/TraceRepositoryService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/TraceRepositoryService.java index 4156444d..4fb4ac11 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/repository/TraceRepositoryService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/repository/TraceRepositoryService.java @@ -12,14 +12,14 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.repository; +package com.redhat.ecosystemappeng.exploitiq.repository; import com.fasterxml.jackson.core.JsonProcessingException; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoCollection; import com.mongodb.client.model.Filters; import com.mongodb.client.model.Indexes; -import com.redhat.ecosystemappeng.morpheus.model.audit.Trace; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Trace; import jakarta.annotation.PostConstruct; import jakarta.inject.Inject; import jakarta.inject.Singleton; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/CredentialsEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/CredentialsEndpoint.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/CredentialsEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/CredentialsEndpoint.java index 062f80f9..6c809494 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/CredentialsEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/CredentialsEndpoint.java @@ -12,10 +12,10 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; -import com.redhat.ecosystemappeng.morpheus.service.UserService; -import com.redhat.ecosystemappeng.morpheus.service.UtilitiesService; +import com.redhat.ecosystemappeng.exploitiq.service.UserService; +import com.redhat.ecosystemappeng.exploitiq.service.UtilitiesService; import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType; import org.eclipse.microprofile.openapi.annotations.media.Content; @@ -27,9 +27,9 @@ import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.jboss.logging.Logger; -import com.redhat.ecosystemappeng.morpheus.model.ErrorResponse; -import com.redhat.ecosystemappeng.morpheus.service.CredentialStoreService; -import com.redhat.ecosystemappeng.morpheus.service.CredentialStorageException; +import com.redhat.ecosystemappeng.exploitiq.model.ErrorResponse; +import com.redhat.ecosystemappeng.exploitiq.service.CredentialStoreService; +import com.redhat.ecosystemappeng.exploitiq.service.CredentialStorageException; import jakarta.inject.Inject; import jakarta.ws.rs.GET; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/FeedbackResource.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/FeedbackResource.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/FeedbackResource.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/FeedbackResource.java index 87649799..65782acf 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/FeedbackResource.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/FeedbackResource.java @@ -12,10 +12,10 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; -import com.redhat.ecosystemappeng.morpheus.model.FeedbackDto; -import com.redhat.ecosystemappeng.morpheus.service.FeedbackService; +import com.redhat.ecosystemappeng.exploitiq.model.FeedbackDto; +import com.redhat.ecosystemappeng.exploitiq.service.FeedbackService; import jakarta.inject.Inject; import jakarta.ws.rs.*; import jakarta.ws.rs.core.MediaType; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ManagementProxyFilter.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ManagementProxyFilter.java similarity index 98% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ManagementProxyFilter.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ManagementProxyFilter.java index a327e4e0..12c913ef 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ManagementProxyFilter.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ManagementProxyFilter.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import io.smallrye.mutiny.Uni; import io.vertx.mutiny.core.Vertx; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/McpClientEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/McpClientEndpoint.java similarity index 61% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/McpClientEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/McpClientEndpoint.java index fe1948ef..b65ff0ab 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/McpClientEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/McpClientEndpoint.java @@ -12,15 +12,15 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; -import com.redhat.ecosystemappeng.morpheus.model.ErrorResponse; +import com.redhat.ecosystemappeng.exploitiq.model.ErrorResponse; import jakarta.validation.ConstraintViolation; import jakarta.validation.ConstraintViolationException; -import com.redhat.ecosystemappeng.morpheus.model.McpClientRegistration; -import com.redhat.ecosystemappeng.morpheus.model.PaginatedResult; -import com.redhat.ecosystemappeng.morpheus.exception.McpClientAlreadyExistsException; -import com.redhat.ecosystemappeng.morpheus.service.McpClientService; +import com.redhat.ecosystemappeng.exploitiq.model.McpClientRegistration; +import com.redhat.ecosystemappeng.exploitiq.model.PaginatedResult; +import com.redhat.ecosystemappeng.exploitiq.exception.McpClientAlreadyExistsException; +import com.redhat.ecosystemappeng.exploitiq.service.McpClientService; import jakarta.inject.Inject; import jakarta.validation.Valid; import jakarta.validation.constraints.Min; @@ -50,10 +50,10 @@ import org.jboss.resteasy.reactive.server.ServerExceptionMapper; @SecurityScheme( - securitySchemeName = "jwt", - type = SecuritySchemeType.HTTP, - scheme = "bearer", - bearerFormat = "jwt" + securitySchemeName = "jwt", + type = SecuritySchemeType.HTTP, + scheme = "bearer", + bearerFormat = "jwt" ) @SecurityRequirement(name = "jwt") @Path("mcp-clients") @@ -73,20 +73,20 @@ public McpClientEndpoint(McpClientService mcpClientService) { @POST @Consumes(MediaType.APPLICATION_JSON) @Operation( - summary = "Register an MCP client", - description = "Persists an OAuth client registration from the MCP server's Dynamic Client Registration flow." + summary = "Register an MCP client", + description = "Persists an OAuth client registration from the MCP server's Dynamic Client Registration flow." ) @APIResponses({ - @APIResponse( - responseCode = "201", - description = "Client registered successfully", - content = @Content( - mediaType = MediaType.APPLICATION_JSON, - schema = @Schema(implementation = McpClientRegistration.class) - ) - ), - @APIResponse(responseCode = "400", description = "Invalid registration data"), - @APIResponse(responseCode = "409", description = "Client with this ID already exists") + @APIResponse( + responseCode = "201", + description = "Client registered successfully", + content = @Content( + mediaType = MediaType.APPLICATION_JSON, + schema = @Schema(implementation = McpClientRegistration.class) + ) + ), + @APIResponse(responseCode = "400", description = "Invalid registration data"), + @APIResponse(responseCode = "409", description = "Client with this ID already exists") }) public Response register(@Valid McpClientRegistration registration) { McpClientRegistration saved = mcpClientService.register(registration); @@ -96,19 +96,19 @@ public Response register(@Valid McpClientRegistration registration) { @GET @Path("/{clientId}") @Operation( - summary = "Get MCP client by ID", - description = "Retrieves a registered MCP client by its client ID." + summary = "Get MCP client by ID", + description = "Retrieves a registered MCP client by its client ID." ) @APIResponses({ - @APIResponse( - responseCode = "200", - description = "Client found", - content = @Content( - mediaType = MediaType.APPLICATION_JSON, - schema = @Schema(implementation = McpClientRegistration.class) - ) - ), - @APIResponse(responseCode = "404", description = "Client not found") + @APIResponse( + responseCode = "200", + description = "Client found", + content = @Content( + mediaType = MediaType.APPLICATION_JSON, + schema = @Schema(implementation = McpClientRegistration.class) + ) + ), + @APIResponse(responseCode = "404", description = "Client not found") }) public Response getByClientId(@PathParam("clientId") String clientId) { McpClientRegistration registration = mcpClientService.getByClientId(clientId); @@ -120,35 +120,35 @@ public Response getByClientId(@PathParam("clientId") String clientId) { @GET @Operation( - summary = "List MCP clients", - description = "Lists all registered MCP clients with pagination. Used for compliance auditing." + summary = "List MCP clients", + description = "Lists all registered MCP clients with pagination. Used for compliance auditing." ) @APIResponses({ - @APIResponse( - responseCode = "200", - description = "Client list", - content = @Content(mediaType = MediaType.APPLICATION_JSON) - ) + @APIResponse( + responseCode = "200", + description = "Client list", + content = @Content(mediaType = MediaType.APPLICATION_JSON) + ) }) public Response list( @QueryParam("page") @DefaultValue("0") @Min(0) int page, @QueryParam("pageSize") @DefaultValue("100") @Min(1) int pageSize) { PaginatedResult result = mcpClientService.list(page, pageSize); return Response.ok(result.results) - .header("X-Total-Pages", result.totalPages) - .header("X-Total-Elements", result.totalElements) - .build(); + .header("X-Total-Pages", result.totalPages) + .header("X-Total-Elements", result.totalElements) + .build(); } @DELETE @Path("/{clientId}") @Operation( - summary = "Delete MCP client", - description = "Removes a registered MCP client. For administrative cleanup." + summary = "Delete MCP client", + description = "Removes a registered MCP client. For administrative cleanup." ) @APIResponses({ - @APIResponse(responseCode = "204", description = "Client deleted"), - @APIResponse(responseCode = "404", description = "Client not found") + @APIResponse(responseCode = "204", description = "Client deleted"), + @APIResponse(responseCode = "404", description = "Client not found") }) public Response delete(@PathParam("clientId") String clientId) { boolean deleted = mcpClientService.delete(clientId); @@ -161,33 +161,33 @@ public Response delete(@PathParam("clientId") String clientId) { @ServerExceptionMapper public Response mapAlreadyExistsException(McpClientAlreadyExistsException e) { return Response.status(Response.Status.CONFLICT) - .entity(new ErrorResponse(e.getMessage())) - .build(); + .entity(new ErrorResponse(e.getMessage())) + .build(); } @ServerExceptionMapper public Response mapNotFoundException(NotFoundException e) { return Response.status(Response.Status.NOT_FOUND) - .entity(new ErrorResponse(e.getMessage())) - .build(); + .entity(new ErrorResponse(e.getMessage())) + .build(); } @ServerExceptionMapper public Response mapConstraintViolationException(ConstraintViolationException e) { String message = e.getConstraintViolations().stream() - .map(ConstraintViolation::getMessage) - .findFirst() - .orElse("Invalid request"); + .map(ConstraintViolation::getMessage) + .findFirst() + .orElse("Invalid request"); return Response.status(Response.Status.BAD_REQUEST) - .entity(new ErrorResponse(message)) - .build(); + .entity(new ErrorResponse(message)) + .build(); } @ServerExceptionMapper public Response mapException(Exception e) { LOGGER.error("Unexpected error in McpClientEndpoint", e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR) - .entity(new ErrorResponse("An unexpected error occurred")) - .build(); + .entity(new ErrorResponse("An unexpected error occurred")) + .build(); } } \ No newline at end of file diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/NotificationSocket.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/NotificationSocket.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/NotificationSocket.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/NotificationSocket.java index 1778f656..1b0af322 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/NotificationSocket.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/NotificationSocket.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import org.jboss.logging.Logger; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/OverviewMetricsResource.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/OverviewMetricsResource.java similarity index 91% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/OverviewMetricsResource.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/OverviewMetricsResource.java index 94b59386..f092a0c9 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/OverviewMetricsResource.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/OverviewMetricsResource.java @@ -12,10 +12,10 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; -import com.redhat.ecosystemappeng.morpheus.model.OverviewMetricsDTO; -import com.redhat.ecosystemappeng.morpheus.service.OverviewMetricsService; +import com.redhat.ecosystemappeng.exploitiq.model.OverviewMetricsDTO; +import com.redhat.ecosystemappeng.exploitiq.service.OverviewMetricsService; import jakarta.inject.Inject; import jakarta.ws.rs.GET; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/PreProcessingEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/PreProcessingEndpoint.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/PreProcessingEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/PreProcessingEndpoint.java index b136ae3b..7407e80c 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/PreProcessingEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/PreProcessingEndpoint.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.media.Content; @@ -23,8 +23,8 @@ import org.eclipse.microprofile.openapi.annotations.parameters.RequestBody; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.model.ReportData; -import com.redhat.ecosystemappeng.morpheus.service.PreProcessingService; +import com.redhat.ecosystemappeng.exploitiq.model.ReportData; +import com.redhat.ecosystemappeng.exploitiq.service.PreProcessingService; import jakarta.inject.Inject; import jakarta.ws.rs.Consumes; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ProductEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ProductEndpoint.java similarity index 91% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ProductEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ProductEndpoint.java index 783fa373..7fbbaf60 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ProductEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ProductEndpoint.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import java.io.IOException; import java.io.InputStream; @@ -36,23 +36,23 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; -import com.redhat.ecosystemappeng.morpheus.config.AppConfig; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationIssueCode; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationException; -import com.redhat.ecosystemappeng.morpheus.exception.ValidationException; -import com.redhat.ecosystemappeng.morpheus.model.InlineCredential; -import com.redhat.ecosystemappeng.morpheus.model.ProductSummary; -import com.redhat.ecosystemappeng.morpheus.model.ReportData; -import com.redhat.ecosystemappeng.morpheus.service.CredentialProcessingService; -import com.redhat.ecosystemappeng.morpheus.service.CredentialStoreService; -import com.redhat.ecosystemappeng.morpheus.service.CredentialStorageException; -import com.redhat.ecosystemappeng.morpheus.repository.ProductRepositoryService; -import com.redhat.ecosystemappeng.morpheus.service.ProductService; -import com.redhat.ecosystemappeng.morpheus.service.ReportService; -import com.redhat.ecosystemappeng.morpheus.service.SbomReportService; -import com.redhat.ecosystemappeng.morpheus.service.UserService; -import com.redhat.ecosystemappeng.morpheus.service.UtilitiesService; -import com.redhat.ecosystemappeng.morpheus.service.RequestQueueExceededException; +import com.redhat.ecosystemappeng.exploitiq.config.AppConfig; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationIssueCode; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationException; +import com.redhat.ecosystemappeng.exploitiq.exception.ValidationException; +import com.redhat.ecosystemappeng.exploitiq.model.InlineCredential; +import com.redhat.ecosystemappeng.exploitiq.model.ProductSummary; +import com.redhat.ecosystemappeng.exploitiq.model.ReportData; +import com.redhat.ecosystemappeng.exploitiq.service.CredentialProcessingService; +import com.redhat.ecosystemappeng.exploitiq.service.CredentialStoreService; +import com.redhat.ecosystemappeng.exploitiq.service.CredentialStorageException; +import com.redhat.ecosystemappeng.exploitiq.repository.ProductRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.service.ProductService; +import com.redhat.ecosystemappeng.exploitiq.service.ReportService; +import com.redhat.ecosystemappeng.exploitiq.service.SbomReportService; +import com.redhat.ecosystemappeng.exploitiq.service.UserService; +import com.redhat.ecosystemappeng.exploitiq.service.UtilitiesService; +import com.redhat.ecosystemappeng.exploitiq.service.RequestQueueExceededException; import jakarta.inject.Inject; import jakarta.ws.rs.Consumes; @@ -81,7 +81,7 @@ public class ProductEndpoint { private static final Logger LOGGER = Logger.getLogger(ProductEndpoint.class); /** * Both keys constants must be aligned and in-sync with config keys definitions at AppConfig.java, - * {@link com.redhat.ecosystemappeng.morpheus.config.AppConfig} + * {@link com.redhat.ecosystemappeng.exploitiq.config.AppConfig} */ public static final String EXPLOIT_IQ_IMAGE_SOURCE_LOCATION_KEYS = "exploit-iq.image.source.location-keys"; public static final String EXPLOIT_IQ_IMAGE_SOURCE_COMMIT_ID_KEYS = "exploit-iq.image.source.commit-id-keys"; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ReportEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportEndpoint.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ReportEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportEndpoint.java index f933ec72..58962637 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ReportEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportEndpoint.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import java.io.IOException; @@ -23,7 +23,7 @@ import java.util.stream.Collectors; import java.util.Objects; -import com.redhat.ecosystemappeng.morpheus.tracing.TraceToMdc; +import com.redhat.ecosystemappeng.exploitiq.tracing.TraceToMdc; import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.enums.SchemaType; import org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType; @@ -41,25 +41,25 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.exception.ValidationException; -import com.redhat.ecosystemappeng.morpheus.model.MarkReportFailedRequest; -import com.redhat.ecosystemappeng.morpheus.model.NewRpmReportRequest; -import com.redhat.ecosystemappeng.morpheus.model.ReportData; -import com.redhat.ecosystemappeng.morpheus.model.ReportRequest; -import com.redhat.ecosystemappeng.morpheus.model.SortField; -import com.redhat.ecosystemappeng.morpheus.service.CredentialProcessingService; -import com.redhat.ecosystemappeng.morpheus.service.CredentialStorageException; -import com.redhat.ecosystemappeng.morpheus.service.PreProcessingService; -import com.redhat.ecosystemappeng.morpheus.service.ProductService; -import com.redhat.ecosystemappeng.morpheus.service.ReportService; -import com.redhat.ecosystemappeng.morpheus.service.RpmReportService; -import com.redhat.ecosystemappeng.morpheus.service.RequestQueueExceededException; -import com.redhat.ecosystemappeng.morpheus.service.UserService; -import com.redhat.ecosystemappeng.morpheus.service.UtilitiesService; -import com.redhat.ecosystemappeng.morpheus.model.Report; -import com.redhat.ecosystemappeng.morpheus.model.ReportRequestId; -import com.redhat.ecosystemappeng.morpheus.model.ReportWithStatus; -import com.redhat.ecosystemappeng.morpheus.model.ProductSummary; +import com.redhat.ecosystemappeng.exploitiq.exception.ValidationException; +import com.redhat.ecosystemappeng.exploitiq.model.MarkReportFailedRequest; +import com.redhat.ecosystemappeng.exploitiq.model.NewRpmReportRequest; +import com.redhat.ecosystemappeng.exploitiq.model.ReportData; +import com.redhat.ecosystemappeng.exploitiq.model.ReportRequest; +import com.redhat.ecosystemappeng.exploitiq.model.SortField; +import com.redhat.ecosystemappeng.exploitiq.service.CredentialProcessingService; +import com.redhat.ecosystemappeng.exploitiq.service.CredentialStorageException; +import com.redhat.ecosystemappeng.exploitiq.service.PreProcessingService; +import com.redhat.ecosystemappeng.exploitiq.service.ProductService; +import com.redhat.ecosystemappeng.exploitiq.service.ReportService; +import com.redhat.ecosystemappeng.exploitiq.service.RpmReportService; +import com.redhat.ecosystemappeng.exploitiq.service.RequestQueueExceededException; +import com.redhat.ecosystemappeng.exploitiq.service.UserService; +import com.redhat.ecosystemappeng.exploitiq.service.UtilitiesService; +import com.redhat.ecosystemappeng.exploitiq.model.Report; +import com.redhat.ecosystemappeng.exploitiq.model.ReportRequestId; +import com.redhat.ecosystemappeng.exploitiq.model.ReportWithStatus; +import com.redhat.ecosystemappeng.exploitiq.model.ProductSummary; import jakarta.inject.Inject; import jakarta.ws.rs.Consumes; @@ -152,7 +152,7 @@ public Response newRequest( @Parameter( description = "Whether to submit to ExploitIQ for analysis" ) - @QueryParam("submit") @DefaultValue("true") boolean sendToMorpheus, + @QueryParam("submit") @DefaultValue("true") boolean sendToExploitIq, @RequestBody( description = "Analysis report request data", required = true, @@ -181,7 +181,7 @@ public Response newRequest( credentialProcessingService.injectCredentialId(res.report(), credentialId); } - if (sendToMorpheus) { + if (sendToExploitIq) { reportService.submit(res.reportRequestId().id(), res.report()); } @@ -214,7 +214,7 @@ public Response newRequest( @Operation( summary = "Create analysis request for an RPM package", description = """ - Accepts RPM name, version, release, architecture, and a CVE id; builds a Morpheus input with \ + Accepts RPM name, version, release, architecture, and a CVE id; builds an ExploitIQ input with \ pipeline_mode rpm_package_checker and target_package, persists the report, and always submits \ it for analysis (same queue path as POST /reports/new with submit=true). Validation errors use \ the same field-mapped JSON shape as POST /products/upload-spdx (object \"errors\" mapping field names to messages).""") @@ -315,7 +315,7 @@ public Response retry( @POST @Operation( summary = "Receive analysis report", - description = "Receives a completed analysis report from Morpheus") + description = "Receives a completed analysis report from ExploitIQ") @APIResponses({ @APIResponse( responseCode = "202", @@ -625,7 +625,7 @@ public Response listProducts( @POST @Path("/{id}/submit") @Operation( - summary = "Submit to ExploitIQ for analysis", + summary = "Submit to ExploitIQ for analysis", description = "Submits analysis request to ExploitIQ for analysis") @APIResponses({ @APIResponse( diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ReportStreamResource.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportStreamResource.java similarity index 90% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ReportStreamResource.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportStreamResource.java index 7682c6ae..9693d01a 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/ReportStreamResource.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportStreamResource.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType; @@ -9,8 +9,8 @@ import org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement; import org.eclipse.microprofile.openapi.annotations.security.SecurityScheme; -import com.redhat.ecosystemappeng.morpheus.model.ReportSseMessage; -import com.redhat.ecosystemappeng.morpheus.service.ReportSseBroadcaster; +import com.redhat.ecosystemappeng.exploitiq.model.ReportSseMessage; +import com.redhat.ecosystemappeng.exploitiq.service.ReportSseBroadcaster; import io.smallrye.mutiny.Multi; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/TokenResource.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/TokenResource.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/TokenResource.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/TokenResource.java index ec3b65eb..6b6b39ab 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/TokenResource.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/TokenResource.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import jakarta.annotation.security.PermitAll; @@ -25,7 +25,7 @@ import jakarta.ws.rs.core.Response; import org.eclipse.microprofile.openapi.annotations.Operation; -import com.redhat.ecosystemappeng.morpheus.service.UserService; +import com.redhat.ecosystemappeng.exploitiq.service.UserService; @Path("/user") public class TokenResource { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/BaseAuditEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/BaseAuditEndpoint.java similarity index 98% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/BaseAuditEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/BaseAuditEndpoint.java index 3646c9d4..3483c028 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/BaseAuditEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/BaseAuditEndpoint.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest.audit; +package com.redhat.ecosystemappeng.exploitiq.rest.audit; import com.fasterxml.jackson.core.JsonProcessingException; import jakarta.ws.rs.NotFoundException; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/BatchEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/BatchEndpoint.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/BatchEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/BatchEndpoint.java index 4b823e35..d084d20f 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/BatchEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/BatchEndpoint.java @@ -12,12 +12,12 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest.audit; +package com.redhat.ecosystemappeng.exploitiq.rest.audit; -import com.redhat.ecosystemappeng.morpheus.model.audit.Batch; -import com.redhat.ecosystemappeng.morpheus.model.audit.BatchType; -import com.redhat.ecosystemappeng.morpheus.model.audit.Job; -import com.redhat.ecosystemappeng.morpheus.service.audit.BatchService; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Batch; +import com.redhat.ecosystemappeng.exploitiq.model.audit.BatchType; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Job; +import com.redhat.ecosystemappeng.exploitiq.service.audit.BatchService; import jakarta.inject.Inject; import jakarta.validation.Valid; import jakarta.validation.constraints.Pattern; @@ -43,7 +43,7 @@ import java.net.URI; import java.util.List; -import static com.redhat.ecosystemappeng.morpheus.service.audit.AuditService.REGEX_ALLOWED_LANGUAGES; +import static com.redhat.ecosystemappeng.exploitiq.service.audit.AuditService.REGEX_ALLOWED_LANGUAGES; @SecurityScheme(securitySchemeName = "jwt", type = SecuritySchemeType.HTTP, scheme = "bearer", bearerFormat = "jwt", description = "Please enter your JWT Token without Bearer") diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/EvalEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/EvalEndpoint.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/EvalEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/EvalEndpoint.java index 0338a6ab..01562bcb 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/EvalEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/EvalEndpoint.java @@ -12,10 +12,10 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest.audit; +package com.redhat.ecosystemappeng.exploitiq.rest.audit; -import com.redhat.ecosystemappeng.morpheus.model.audit.Eval; -import com.redhat.ecosystemappeng.morpheus.service.audit.EvalService; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Eval; +import com.redhat.ecosystemappeng.exploitiq.service.audit.EvalService; import jakarta.inject.Inject; import jakarta.validation.Valid; import jakarta.validation.constraints.NotEmpty; @@ -39,7 +39,7 @@ import java.util.List; -import static com.redhat.ecosystemappeng.morpheus.service.audit.AuditService.REGEX_PATTERN_FOR_CVE; +import static com.redhat.ecosystemappeng.exploitiq.service.audit.AuditService.REGEX_PATTERN_FOR_CVE; @SecurityScheme(securitySchemeName = "jwt", type = SecuritySchemeType.HTTP, scheme = "bearer", bearerFormat = "jwt", description = "Please enter your JWT Token without Bearer") diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/JobEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/JobEndpoint.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/JobEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/JobEndpoint.java index 33a74df0..10468194 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/JobEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/JobEndpoint.java @@ -12,11 +12,10 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest.audit; +package com.redhat.ecosystemappeng.exploitiq.rest.audit; -import com.redhat.ecosystemappeng.morpheus.model.*; -import com.redhat.ecosystemappeng.morpheus.model.audit.Job; -import com.redhat.ecosystemappeng.morpheus.service.audit.JobService; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Job; +import com.redhat.ecosystemappeng.exploitiq.service.audit.JobService; import jakarta.inject.Inject; import jakarta.validation.Valid; import jakarta.ws.rs.*; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/TraceEndpoint.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/TraceEndpoint.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/TraceEndpoint.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/TraceEndpoint.java index 635e8b38..3e4dff1e 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/rest/audit/TraceEndpoint.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/rest/audit/TraceEndpoint.java @@ -12,10 +12,10 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest.audit; +package com.redhat.ecosystemappeng.exploitiq.rest.audit; -import com.redhat.ecosystemappeng.morpheus.model.audit.Trace; -import com.redhat.ecosystemappeng.morpheus.service.audit.TraceService; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Trace; +import com.redhat.ecosystemappeng.exploitiq.service.audit.TraceService; import io.vertx.core.cli.annotations.Hidden; import jakarta.inject.Inject; import jakarta.validation.Valid; @@ -41,7 +41,7 @@ import java.util.List; -import static com.redhat.ecosystemappeng.morpheus.service.audit.AuditService.REGEX_PATTERN_FOR_CVE; +import static com.redhat.ecosystemappeng.exploitiq.service.audit.AuditService.REGEX_PATTERN_FOR_CVE; @SecurityScheme(securitySchemeName = "jwt", type = SecuritySchemeType.HTTP, scheme = "bearer", bearerFormat = "jwt", description = "Please enter your JWT Token without Bearer") diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/security/RoleMappingAugmentor.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/security/RoleMappingAugmentor.java similarity index 99% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/security/RoleMappingAugmentor.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/security/RoleMappingAugmentor.java index aa672518..205d7fe0 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/security/RoleMappingAugmentor.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/security/RoleMappingAugmentor.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.security; +package com.redhat.ecosystemappeng.exploitiq.security; import io.quarkus.runtime.LaunchMode; import io.quarkus.security.identity.AuthenticationRequestContext; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/ComponentProcessingService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ComponentProcessingService.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/ComponentProcessingService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ComponentProcessingService.java index 3300f566..09e8fa9b 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/ComponentProcessingService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ComponentProcessingService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.util.ArrayList; import java.util.List; @@ -24,14 +24,14 @@ import io.smallrye.context.api.ManagedExecutorConfig; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationException; -import com.redhat.ecosystemappeng.morpheus.exception.SyftExecutionException; -import com.redhat.ecosystemappeng.morpheus.model.FailedComponent; -import com.redhat.ecosystemappeng.morpheus.model.ParsedCycloneDx; -import com.redhat.ecosystemappeng.morpheus.model.ReportData; -import com.redhat.ecosystemappeng.morpheus.repository.ProductRepositoryService; -import com.redhat.ecosystemappeng.morpheus.repository.ReportRepositoryService; -import com.redhat.ecosystemappeng.morpheus.service.SpdxParsingService.ComponentInfo; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationException; +import com.redhat.ecosystemappeng.exploitiq.exception.SyftExecutionException; +import com.redhat.ecosystemappeng.exploitiq.model.FailedComponent; +import com.redhat.ecosystemappeng.exploitiq.model.ParsedCycloneDx; +import com.redhat.ecosystemappeng.exploitiq.model.ReportData; +import com.redhat.ecosystemappeng.exploitiq.repository.ProductRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.repository.ReportRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.service.SpdxParsingService.ComponentInfo; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/CredentialProcessingService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CredentialProcessingService.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/CredentialProcessingService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CredentialProcessingService.java index ab265ba4..6abc9430 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/CredentialProcessingService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CredentialProcessingService.java @@ -12,13 +12,13 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.util.UUID; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; -import com.redhat.ecosystemappeng.morpheus.model.InlineCredential; +import com.redhat.ecosystemappeng.exploitiq.model.InlineCredential; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/CredentialStorageException.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CredentialStorageException.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/CredentialStorageException.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CredentialStorageException.java index 9e25656e..dbacc5ac 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/CredentialStorageException.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CredentialStorageException.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; /** * Exception thrown when credential storage operations fail. diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/CredentialStoreService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CredentialStoreService.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/CredentialStoreService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CredentialStoreService.java index 1ed619cb..627de1ac 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/CredentialStoreService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CredentialStoreService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.nio.charset.StandardCharsets; import java.security.SecureRandom; @@ -27,8 +27,8 @@ import org.eclipse.microprofile.config.inject.ConfigProperty; import org.jboss.logging.Logger; -import com.redhat.ecosystemappeng.morpheus.model.CredentialType; -import com.redhat.ecosystemappeng.morpheus.model.InlineCredential; +import com.redhat.ecosystemappeng.exploitiq.model.CredentialType; +import com.redhat.ecosystemappeng.exploitiq.model.InlineCredential; import io.quarkus.runtime.annotations.RegisterForReflection; import io.quarkus.scheduler.Scheduled; @@ -56,8 +56,8 @@ public class CredentialStoreService { private final ConcurrentHashMap credentialStore = new ConcurrentHashMap<>(); private final SecretKey secretKey; public CredentialStoreService( - @ConfigProperty(name = "morpheus.queue.timeout") Duration timeout, - @ConfigProperty(name = "morpheus.credential-store.encryption-key") String encryptionKey) { + @ConfigProperty(name = "exploit-iq.queue.timeout") Duration timeout, + @ConfigProperty(name = "exploit-iq.credential-store.encryption-key") String encryptionKey) { this.credentialTTL = timeout; byte[] keyBytes = encryptionKey.getBytes(StandardCharsets.UTF_8); if (keyBytes.length < 32) { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/CycloneDxParsingService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CycloneDxParsingService.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/CycloneDxParsingService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CycloneDxParsingService.java index 18fe3960..9f3f3019 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/CycloneDxParsingService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/CycloneDxParsingService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.io.IOException; import java.io.InputStream; @@ -21,8 +21,8 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationException; -import com.redhat.ecosystemappeng.morpheus.model.ParsedCycloneDx; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationException; +import com.redhat.ecosystemappeng.exploitiq.model.ParsedCycloneDx; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/FeedbackService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/FeedbackService.java similarity index 91% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/FeedbackService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/FeedbackService.java index c098136a..0fb0d1ae 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/FeedbackService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/FeedbackService.java @@ -12,10 +12,10 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; -import com.redhat.ecosystemappeng.morpheus.client.FeedbackApi; -import com.redhat.ecosystemappeng.morpheus.model.FeedbackDto; +import com.redhat.ecosystemappeng.exploitiq.client.FeedbackApi; +import com.redhat.ecosystemappeng.exploitiq.model.FeedbackDto; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.json.JsonObject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/GenerateSbomService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/GenerateSbomService.java similarity index 92% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/GenerateSbomService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/GenerateSbomService.java index b7b4f969..1e66f813 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/GenerateSbomService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/GenerateSbomService.java @@ -12,9 +12,9 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; -import static com.redhat.ecosystemappeng.morpheus.service.ComponentProcessingService.SYFT_INVALID_SBOM_PREFIX; +import static com.redhat.ecosystemappeng.exploitiq.service.ComponentProcessingService.SYFT_INVALID_SBOM_PREFIX; import java.io.BufferedReader; import java.io.ByteArrayInputStream; @@ -27,9 +27,9 @@ import org.eclipse.microprofile.config.inject.ConfigProperty; import org.jboss.logging.Logger; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationException; -import com.redhat.ecosystemappeng.morpheus.exception.SyftExecutionException; -import com.redhat.ecosystemappeng.morpheus.model.ParsedCycloneDx; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationException; +import com.redhat.ecosystemappeng.exploitiq.exception.SyftExecutionException; +import com.redhat.ecosystemappeng.exploitiq.model.ParsedCycloneDx; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; @@ -41,7 +41,7 @@ public class GenerateSbomService { private static final int EXIT_CODE_SUCCESS = 0; private static final String SYFT_CACHE_DIR_ENV = "SYFT_CACHE_DIR"; - @ConfigProperty(name = "morpheus.syft.cache.dir") + @ConfigProperty(name = "exploit-iq.syft.cache.dir") String syftCacheDir; @Inject diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/McpClientService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/McpClientService.java similarity index 87% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/McpClientService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/McpClientService.java index 616b540a..5b3d2154 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/McpClientService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/McpClientService.java @@ -12,14 +12,14 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import com.mongodb.ErrorCategory; import com.mongodb.MongoWriteException; -import com.redhat.ecosystemappeng.morpheus.model.McpClientRegistration; -import com.redhat.ecosystemappeng.morpheus.model.PaginatedResult; -import com.redhat.ecosystemappeng.morpheus.exception.McpClientAlreadyExistsException; -import com.redhat.ecosystemappeng.morpheus.repository.McpClientRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.model.McpClientRegistration; +import com.redhat.ecosystemappeng.exploitiq.model.PaginatedResult; +import com.redhat.ecosystemappeng.exploitiq.exception.McpClientAlreadyExistsException; +import com.redhat.ecosystemappeng.exploitiq.repository.McpClientRepositoryService; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import org.jboss.logging.Logger; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/OverviewMetricsService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/OverviewMetricsService.java similarity index 98% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/OverviewMetricsService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/OverviewMetricsService.java index b04a4ae3..6e1812e4 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/OverviewMetricsService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/OverviewMetricsService.java @@ -12,9 +12,9 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; -import com.redhat.ecosystemappeng.morpheus.model.OverviewMetricsDTO; +import com.redhat.ecosystemappeng.exploitiq.model.OverviewMetricsDTO; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoCollection; import com.mongodb.client.model.Filters; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/PreProcessingService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/PreProcessingService.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/PreProcessingService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/PreProcessingService.java index e7f0ee16..81669c76 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/PreProcessingService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/PreProcessingService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.io.IOException; import java.io.InputStream; @@ -35,9 +35,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; -import com.redhat.ecosystemappeng.morpheus.client.ComponentSyncerService; -import com.redhat.ecosystemappeng.morpheus.model.ReportData; -import com.redhat.ecosystemappeng.morpheus.repository.ReportRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.client.ComponentSyncerService; +import com.redhat.ecosystemappeng.exploitiq.model.ReportData; +import com.redhat.ecosystemappeng.exploitiq.repository.ReportRepositoryService; import io.quarkus.scheduler.Scheduled; import jakarta.enterprise.context.ApplicationScoped; @@ -51,7 +51,7 @@ public class PreProcessingService { private final Map submitted = new ConcurrentHashMap<>(); private static final int BACKOFF_MULTIPLIER = 2; - @ConfigProperty(name = "morpheus.syncer.timeout", defaultValue = "1h") + @ConfigProperty(name = "exploit-iq.syncer.timeout", defaultValue = "1h") Duration timeout; @Inject diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/ProductService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ProductService.java similarity index 89% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/ProductService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ProductService.java index a202ff6c..29d51093 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/ProductService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ProductService.java @@ -12,14 +12,14 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.util.List; import org.jboss.logging.Logger; -import com.redhat.ecosystemappeng.morpheus.model.Product; -import com.redhat.ecosystemappeng.morpheus.repository.ProductRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.model.Product; +import com.redhat.ecosystemappeng.exploitiq.repository.ProductRepositoryService; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/ReportService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ReportService.java similarity index 92% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/ReportService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ReportService.java index c1ed0094..f8164715 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/ReportService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ReportService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -43,33 +43,32 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.redhat.ecosystemappeng.morpheus.client.GitHubService; -import com.redhat.ecosystemappeng.morpheus.config.AppConfig; -import com.redhat.ecosystemappeng.morpheus.model.PaginatedResult; -import com.redhat.ecosystemappeng.morpheus.model.Pagination; -import com.redhat.ecosystemappeng.morpheus.model.ParsedCycloneDx; -import com.redhat.ecosystemappeng.morpheus.model.Product; -import com.redhat.ecosystemappeng.morpheus.model.ProductReportsSummary; -import com.redhat.ecosystemappeng.morpheus.model.ProductSummary; -import com.redhat.ecosystemappeng.morpheus.model.Report; -import com.redhat.ecosystemappeng.morpheus.model.ReportData; -import com.redhat.ecosystemappeng.morpheus.model.ReportReceivedEvent; -import com.redhat.ecosystemappeng.morpheus.model.ReportRequest; -import com.redhat.ecosystemappeng.morpheus.model.ReportRequestId; -import com.redhat.ecosystemappeng.morpheus.model.ReportWithStatus; -import com.redhat.ecosystemappeng.morpheus.model.SortField; -import com.redhat.ecosystemappeng.morpheus.repository.ProductRepositoryService; -import com.redhat.ecosystemappeng.morpheus.repository.ReportRepositoryService; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationIssueCode; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationException; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.Image; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.ReportInput; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.Scan; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.SourceInfo; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.VulnId; - -import com.redhat.ecosystemappeng.morpheus.rest.NotificationSocket; +import com.redhat.ecosystemappeng.exploitiq.client.GitHubService; +import com.redhat.ecosystemappeng.exploitiq.config.AppConfig; +import com.redhat.ecosystemappeng.exploitiq.model.PaginatedResult; +import com.redhat.ecosystemappeng.exploitiq.model.Pagination; +import com.redhat.ecosystemappeng.exploitiq.model.ParsedCycloneDx; +import com.redhat.ecosystemappeng.exploitiq.model.Product; +import com.redhat.ecosystemappeng.exploitiq.model.ProductReportsSummary; +import com.redhat.ecosystemappeng.exploitiq.model.ProductSummary; +import com.redhat.ecosystemappeng.exploitiq.model.Report; +import com.redhat.ecosystemappeng.exploitiq.model.ReportData; +import com.redhat.ecosystemappeng.exploitiq.model.ReportReceivedEvent; +import com.redhat.ecosystemappeng.exploitiq.model.ReportRequest; +import com.redhat.ecosystemappeng.exploitiq.model.ReportRequestId; +import com.redhat.ecosystemappeng.exploitiq.model.ReportWithStatus; +import com.redhat.ecosystemappeng.exploitiq.model.SortField; +import com.redhat.ecosystemappeng.exploitiq.repository.ProductRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.repository.ReportRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationIssueCode; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationException; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.Image; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.ReportInput; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.Scan; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.SourceInfo; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.VulnId; + +import com.redhat.ecosystemappeng.exploitiq.rest.NotificationSocket; import io.quarkus.runtime.Startup; import io.quarkus.scheduler.Scheduler; @@ -78,7 +77,7 @@ import org.jboss.resteasy.reactive.ClientWebApplicationException; import jakarta.ws.rs.core.Response; -import static com.redhat.ecosystemappeng.morpheus.tracing.TextMapPropagatorImpl.getTraceIdFromContext; +import static com.redhat.ecosystemappeng.exploitiq.tracing.TextMapPropagatorImpl.getTraceIdFromContext; @ApplicationScoped public class ReportService { @@ -118,13 +117,13 @@ public class ReportService { @Inject ProductRepositoryService productRepository; - @ConfigProperty(name = "morpheus-ui.includes.path", defaultValue = "includes.json") + @ConfigProperty(name = "exploit-iq-ui.includes.path", defaultValue = "includes.json") String includesPath; - @ConfigProperty(name = "morpheus-ui.excludes.path", defaultValue = "excludes.json") + @ConfigProperty(name = "exploit-iq-ui.excludes.path", defaultValue = "excludes.json") String excludesPath; - @ConfigProperty(name = "morpheus-ui.ecosystem.default") + @ConfigProperty(name = "exploit-iq-ui.ecosystem.default") Optional defaultEcosystem; @Inject @@ -145,10 +144,10 @@ public class ReportService { private Map> includes; private Map> excludes; - @ConfigProperty(name = "morpheus.purge.cron") + @ConfigProperty(name = "exploit-iq.purge.cron") Optional purgeCron; - @ConfigProperty(name = "morpheus.purge.after", defaultValue = "7d") + @ConfigProperty(name = "exploit-iq.purge.after", defaultValue = "7d") Duration purgeAfter; @Startup @@ -354,7 +353,7 @@ public ReportRequestId receive(String report) { * @throws IOException if I/O operations fail */ public ReportData generateReport(ReportRequest request) throws JsonProcessingException, IOException { - LOGGER.info("Generating report data for Agent Morpheus"); + LOGGER.info("Generating report data for ExploitIQ"); var scan = buildScan(request); var image = buildImage(request); @@ -405,7 +404,7 @@ public void submit(String id, JsonNode report) throws JsonProcessingException, I String byUser = determineUser(report); repository.setAsSubmitted(id, byUser); queueService.queue(id, report); - LOGGER.infof("Request ID: %s, sent to Agent Morpheus for analysis", id); + LOGGER.infof("Request ID: %s, sent to ExploitIQ for analysis", id); } private String determineUser(JsonNode report) { @@ -592,7 +591,7 @@ private JsonNode buildSbomInfo(ReportRequest request) { sbomInfo.put("_type", request.sbomInfoType().toString()); switch (request.sbomInfoType()) { case CYCLONEDX_JSON: - throw new IllegalArgumentException("The Agent Morpheus Backend does not yet support cyclonedx+json"); + throw new IllegalArgumentException("The ExploitIQ Backend does not yet support cyclonedx+json"); case MANUAL: sbomInfo.set("packages", buildManualSbom(request.sbom())); break; @@ -798,7 +797,7 @@ public ReportData createCycloneDxReportData(ParsedCycloneDx parsedCycloneDx, Str null, // image null, // credential sbomJson, // sbom - com.redhat.ecosystemappeng.morpheus.model.morpheus.SbomInfoType.MANUAL, // sbomInfoType + com.redhat.ecosystemappeng.exploitiq.model.exploitiq.SbomInfoType.MANUAL, // sbomInfoType metadata, // metadata with product_id and sbom_name null, // sourceRepo null, // commitId diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/ReportSseBroadcaster.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ReportSseBroadcaster.java similarity index 91% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/ReportSseBroadcaster.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ReportSseBroadcaster.java index 96419aae..ca8573f7 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/ReportSseBroadcaster.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/ReportSseBroadcaster.java @@ -1,10 +1,10 @@ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.util.concurrent.CopyOnWriteArrayList; import org.jboss.logging.Logger; -import com.redhat.ecosystemappeng.morpheus.model.ReportSseMessage; +import com.redhat.ecosystemappeng.exploitiq.model.ReportSseMessage; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.subscription.MultiEmitter; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/RepositoryConstants.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RepositoryConstants.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/RepositoryConstants.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RepositoryConstants.java index 826cc07f..af041157 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/RepositoryConstants.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RepositoryConstants.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; public interface RepositoryConstants { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/RequestQueueExceededException.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RequestQueueExceededException.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/RequestQueueExceededException.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RequestQueueExceededException.java index ce91ce9e..5d111b60 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/RequestQueueExceededException.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RequestQueueExceededException.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; public class RequestQueueExceededException extends RuntimeException { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/RequestQueueService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RequestQueueService.java similarity index 78% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/RequestQueueService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RequestQueueService.java index 519362bd..371f9469 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/RequestQueueService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RequestQueueService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.time.Duration; import java.time.LocalDateTime; @@ -21,6 +21,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; import java.util.Objects; +import com.redhat.ecosystemappeng.exploitiq.client.ExploitIqService; import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.SpanKind; import io.opentelemetry.api.trace.Tracer; @@ -31,10 +32,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.client.MorpheusService; -import com.redhat.ecosystemappeng.morpheus.model.Pagination; -import com.redhat.ecosystemappeng.morpheus.model.Report; -import com.redhat.ecosystemappeng.morpheus.repository.ReportRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.client.ExploitIqService; +import com.redhat.ecosystemappeng.exploitiq.model.Pagination; +import com.redhat.ecosystemappeng.exploitiq.model.Report; +import com.redhat.ecosystemappeng.exploitiq.repository.ReportRepositoryService; import io.quarkus.scheduler.Scheduled; import jakarta.annotation.PostConstruct; @@ -46,8 +47,8 @@ import io.micrometer.core.instrument.Gauge; import org.jboss.logmanager.MDC; -import static com.redhat.ecosystemappeng.morpheus.tracing.TracingFieldsCustomizer.SPAN_ID; -import static com.redhat.ecosystemappeng.morpheus.tracing.TracingFieldsCustomizer.TRACE_ID; +import static com.redhat.ecosystemappeng.exploitiq.tracing.TracingFieldsCustomizer.SPAN_ID; +import static com.redhat.ecosystemappeng.exploitiq.tracing.TracingFieldsCustomizer.TRACE_ID; /** * This Service is not implemented to support a Clustered environment @@ -57,17 +58,17 @@ public class RequestQueueService { private static final Logger LOGGER = Logger.getLogger(RequestQueueService.class); - @ConfigProperty(name = "morpheus.queue.max-active", defaultValue = "5") + @ConfigProperty(name = "exploit-iq.queue.max-active", defaultValue = "5") Integer maxActive; - @ConfigProperty(name = "morpheus.queue.max-size", defaultValue = "500") + @ConfigProperty(name = "exploit-iq.queue.max-size", defaultValue = "500") Integer maxSize; - @ConfigProperty(name = "morpheus.queue.timeout", defaultValue = "5m") + @ConfigProperty(name = "exploit-iq.queue.timeout", defaultValue = "5m") Duration timeout; @RestClient - MorpheusService morpheusService; + ExploitIqService exploitIqService; @Inject ReportRepositoryService repository; @@ -84,10 +85,10 @@ public class RequestQueueService { @Inject public RequestQueueService(MeterRegistry meterRegistry) { - Gauge.builder("morpheus.request.queue.config.max-active", () -> maxActive).register(meterRegistry); - Gauge.builder("morpheus.request.queue.config.max-size", () -> maxSize).register(meterRegistry); - meterRegistry.gaugeCollectionSize("morpheus.request.queue.pending", Tags.empty(), pending); - meterRegistry.gaugeMapSize("morpheus.request.queue.active", Tags.empty(), active); + Gauge.builder("exploit-iq.request.queue.config.max-active", () -> maxActive).register(meterRegistry); + Gauge.builder("exploit-iq.request.queue.config.max-size", () -> maxSize).register(meterRegistry); + meterRegistry.gaugeCollectionSize("exploit-iq.request.queue.pending", Tags.empty(), pending); + meterRegistry.gaugeMapSize("exploit-iq.request.queue.active", Tags.empty(), active); } @Scheduled(every = "10s") @@ -163,13 +164,13 @@ public void queue(String id, JsonNode json) { private void submit(String id, JsonNode report) { try { - morpheusService.submitAsync(report.get("input").toPrettyString()); + exploitIqService.submitAsync(report.get("input").toPrettyString()); repository.setAsSent(id); active.put(id, LocalDateTime.now()); - LOGGER.debugf("Report %s sent to Morpheus", id); + LOGGER.debugf("Report %s sent to ExploitIQ", id); } catch (Exception e) { LOGGER.error("Unable to submit request", e); - repository.updateWithError(id, "morpheus-request-error", e.getMessage()); + repository.updateWithError(id, "exploit-iq-request-error", e.getMessage()); } } diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/RpmReportService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RpmReportService.java similarity index 79% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/RpmReportService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RpmReportService.java index 885ca9aa..daeb397a 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/RpmReportService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/RpmReportService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.io.IOException; import java.util.HashMap; @@ -23,24 +23,24 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; -import com.redhat.ecosystemappeng.morpheus.exception.ValidationException; -import com.redhat.ecosystemappeng.morpheus.model.NewRpmReportRequest; -import com.redhat.ecosystemappeng.morpheus.model.ReportData; -import com.redhat.ecosystemappeng.morpheus.model.ReportRequestId; -import com.redhat.ecosystemappeng.morpheus.model.TargetPackage; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.Image; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.PipelineMode; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.ReportInput; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.Scan; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.VulnId; -import com.redhat.ecosystemappeng.morpheus.validation.CveIdRules; -import com.redhat.ecosystemappeng.morpheus.validation.RpmArchitecture; +import com.redhat.ecosystemappeng.exploitiq.exception.ValidationException; +import com.redhat.ecosystemappeng.exploitiq.model.NewRpmReportRequest; +import com.redhat.ecosystemappeng.exploitiq.model.ReportData; +import com.redhat.ecosystemappeng.exploitiq.model.ReportRequestId; +import com.redhat.ecosystemappeng.exploitiq.model.TargetPackage; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.Image; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.PipelineMode; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.ReportInput; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.Scan; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.VulnId; +import com.redhat.ecosystemappeng.exploitiq.validation.CveIdRules; +import com.redhat.ecosystemappeng.exploitiq.validation.RpmArchitecture; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; /** - * Builds, persists, and submits Morpheus report requests for the RPM package checker pipeline. + * Builds, persists, and submits ExploitIQ report requests for the RPM package checker pipeline. */ @ApplicationScoped public class RpmReportService { @@ -59,7 +59,7 @@ private record ValidatedNewRpmReport(String name, String version, String release /** * Validates RPM report fields (upload-spdx-style aggregated {@link ValidationException}), - * builds Morpheus input with {@link PipelineMode#RPM_PACKAGE_CHECKER}, persists, and submits to the queue. + * builds ExploitIQ input with {@link PipelineMode#RPM_PACKAGE_CHECKER}, persists, and submits to the queue. */ public ReportData persistAndSubmitNewRpmReport(NewRpmReportRequest request) throws JsonProcessingException, IOException { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/SbomReportService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/SbomReportService.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/SbomReportService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/SbomReportService.java index c657b065..e52d131e 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/SbomReportService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/SbomReportService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.io.IOException; import java.io.InputStream; @@ -26,14 +26,14 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationException; -import com.redhat.ecosystemappeng.morpheus.exception.ValidationException; -import com.redhat.ecosystemappeng.morpheus.model.FailedComponent; -import com.redhat.ecosystemappeng.morpheus.model.ParsedCycloneDx; -import com.redhat.ecosystemappeng.morpheus.model.Product; -import com.redhat.ecosystemappeng.morpheus.model.ReportData; -import com.redhat.ecosystemappeng.morpheus.repository.ProductRepositoryService; -import com.redhat.ecosystemappeng.morpheus.validation.CveIdRules; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationException; +import com.redhat.ecosystemappeng.exploitiq.exception.ValidationException; +import com.redhat.ecosystemappeng.exploitiq.model.FailedComponent; +import com.redhat.ecosystemappeng.exploitiq.model.ParsedCycloneDx; +import com.redhat.ecosystemappeng.exploitiq.model.Product; +import com.redhat.ecosystemappeng.exploitiq.model.ReportData; +import com.redhat.ecosystemappeng.exploitiq.repository.ProductRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.validation.CveIdRules; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/SpdxParsingService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/SpdxParsingService.java similarity index 98% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/SpdxParsingService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/SpdxParsingService.java index 548ca0e6..56d9ba58 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/SpdxParsingService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/SpdxParsingService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import java.util.ArrayList; import java.util.List; @@ -23,7 +23,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationException; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationException; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/UserService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/UserService.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/UserService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/UserService.java index db893660..344d6302 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/UserService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/UserService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import io.quarkus.arc.properties.IfBuildProperty; import io.quarkus.oidc.UserInfo; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/UtilitiesService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/UtilitiesService.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/UtilitiesService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/UtilitiesService.java index 71329331..f88116de 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/UtilitiesService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/UtilitiesService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import jakarta.ws.rs.core.SecurityContext; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/AuditService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/AuditService.java similarity index 87% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/AuditService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/AuditService.java index 9e3d2b3c..88b53534 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/AuditService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/AuditService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service.audit; +package com.redhat.ecosystemappeng.exploitiq.service.audit; import org.eclipse.microprofile.config.inject.ConfigProperty; @@ -22,6 +22,6 @@ public class AuditService { public static final String REGEX_PATTERN_FOR_CVE = "CVE-\\d{4}-\\d{4,7}"; public static final String REGEX_ALLOWED_LANGUAGES = "go|python|c|javascript|java|all|\\s*"; - @ConfigProperty(name = "exploitiq.audit.list-api.blank-list.error", defaultValue = "false") + @ConfigProperty(name = "exploit-iq.audit.list-api.blank-list.error", defaultValue = "false") protected Boolean apiBlankListResultReturnsError; } diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/BatchService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/BatchService.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/BatchService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/BatchService.java index cbc563a1..0b7f619f 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/BatchService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/BatchService.java @@ -12,13 +12,13 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service.audit; +package com.redhat.ecosystemappeng.exploitiq.service.audit; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.model.audit.Batch; -import com.redhat.ecosystemappeng.morpheus.model.audit.BatchType; -import com.redhat.ecosystemappeng.morpheus.repository.BatchRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Batch; +import com.redhat.ecosystemappeng.exploitiq.model.audit.BatchType; +import com.redhat.ecosystemappeng.exploitiq.repository.BatchRepositoryService; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.validation.Valid; @@ -32,7 +32,7 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static com.redhat.ecosystemappeng.morpheus.repository.AuditRepository.ALL_LANGUAGES_BATCH_LANGUAGE_ID; +import static com.redhat.ecosystemappeng.exploitiq.repository.AuditRepository.ALL_LANGUAGES_BATCH_LANGUAGE_ID; @ApplicationScoped public class BatchService extends AuditService { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/EvalService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/EvalService.java similarity index 90% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/EvalService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/EvalService.java index c19061a4..5da4d5a9 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/EvalService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/EvalService.java @@ -12,13 +12,13 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service.audit; +package com.redhat.ecosystemappeng.exploitiq.service.audit; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.model.audit.Eval; -import com.redhat.ecosystemappeng.morpheus.model.audit.Job; -import com.redhat.ecosystemappeng.morpheus.repository.EvalRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Eval; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Job; +import com.redhat.ecosystemappeng.exploitiq.repository.EvalRepositoryService; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.validation.constraints.NotEmpty; @@ -32,8 +32,8 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static com.redhat.ecosystemappeng.morpheus.rest.audit.BaseAuditEndpoint.UNPROCESSABLE_ENTITY_HTTP_ERROR; -import static com.redhat.ecosystemappeng.morpheus.service.audit.AuditService.THRESHOLD_NUMBER_OF_DB_ITEMS_FOR_PARALLEL_PROCESSING; +import static com.redhat.ecosystemappeng.exploitiq.rest.audit.BaseAuditEndpoint.UNPROCESSABLE_ENTITY_HTTP_ERROR; +import static com.redhat.ecosystemappeng.exploitiq.service.audit.AuditService.THRESHOLD_NUMBER_OF_DB_ITEMS_FOR_PARALLEL_PROCESSING; @ApplicationScoped public class EvalService { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/JobService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/JobService.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/JobService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/JobService.java index 4d60fb50..f4a17305 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/JobService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/JobService.java @@ -12,13 +12,13 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service.audit; +package com.redhat.ecosystemappeng.exploitiq.service.audit; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.model.audit.Batch; -import com.redhat.ecosystemappeng.morpheus.model.audit.Job; -import com.redhat.ecosystemappeng.morpheus.repository.JobRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Batch; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Job; +import com.redhat.ecosystemappeng.exploitiq.repository.JobRepositoryService; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.ws.rs.NotFoundException; @@ -32,7 +32,7 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static com.redhat.ecosystemappeng.morpheus.rest.audit.BaseAuditEndpoint.UNPROCESSABLE_ENTITY_HTTP_ERROR; +import static com.redhat.ecosystemappeng.exploitiq.rest.audit.BaseAuditEndpoint.UNPROCESSABLE_ENTITY_HTTP_ERROR; @ApplicationScoped public class JobService extends AuditService { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/TraceService.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/TraceService.java similarity index 89% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/TraceService.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/TraceService.java index 1a57c259..28feb31c 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/audit/TraceService.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/audit/TraceService.java @@ -12,13 +12,13 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service.audit; +package com.redhat.ecosystemappeng.exploitiq.service.audit; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.model.audit.Job; -import com.redhat.ecosystemappeng.morpheus.model.audit.Trace; -import com.redhat.ecosystemappeng.morpheus.repository.TraceRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Job; +import com.redhat.ecosystemappeng.exploitiq.model.audit.Trace; +import com.redhat.ecosystemappeng.exploitiq.repository.TraceRepositoryService; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.validation.constraints.NotEmpty; @@ -32,8 +32,8 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static com.redhat.ecosystemappeng.morpheus.rest.audit.BaseAuditEndpoint.UNPROCESSABLE_ENTITY_HTTP_ERROR; -import static com.redhat.ecosystemappeng.morpheus.service.audit.AuditService.THRESHOLD_NUMBER_OF_DB_ITEMS_FOR_PARALLEL_PROCESSING; +import static com.redhat.ecosystemappeng.exploitiq.rest.audit.BaseAuditEndpoint.UNPROCESSABLE_ENTITY_HTTP_ERROR; +import static com.redhat.ecosystemappeng.exploitiq.service.audit.AuditService.THRESHOLD_NUMBER_OF_DB_ITEMS_FOR_PARALLEL_PROCESSING; @ApplicationScoped public class TraceService { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/jwt/JkwsRequestFilter.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/jwt/JkwsRequestFilter.java similarity index 98% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/service/jwt/JkwsRequestFilter.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/service/jwt/JkwsRequestFilter.java index a114063a..df12db8a 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/service/jwt/JkwsRequestFilter.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/service/jwt/JkwsRequestFilter.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.service.jwt; +package com.redhat.ecosystemappeng.exploitiq.service.jwt; import jakarta.annotation.PostConstruct; import jakarta.enterprise.context.ApplicationScoped; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TextMapPropagatorImpl.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TextMapPropagatorImpl.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TextMapPropagatorImpl.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TextMapPropagatorImpl.java index 4c5473be..89a246dd 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TextMapPropagatorImpl.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TextMapPropagatorImpl.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.tracing; +package com.redhat.ecosystemappeng.exploitiq.tracing; import io.opentelemetry.context.Context; import io.opentelemetry.context.ContextKey; @@ -27,7 +27,7 @@ import java.util.regex.Pattern; import java.util.Objects; -import static com.redhat.ecosystemappeng.morpheus.tracing.TracingFieldsCustomizer.TRACE_ID; +import static com.redhat.ecosystemappeng.exploitiq.tracing.TracingFieldsCustomizer.TRACE_ID; public class TextMapPropagatorImpl implements TextMapPropagator { diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TraceToMdc.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TraceToMdc.java similarity index 95% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TraceToMdc.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TraceToMdc.java index fc07e34e..88806b43 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TraceToMdc.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TraceToMdc.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.tracing; +package com.redhat.ecosystemappeng.exploitiq.tracing; import jakarta.interceptor.InterceptorBinding; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TraceToMdcInterceptor.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TraceToMdcInterceptor.java similarity index 89% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TraceToMdcInterceptor.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TraceToMdcInterceptor.java index 8491c783..ca7d9d10 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TraceToMdcInterceptor.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TraceToMdcInterceptor.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.tracing; +package com.redhat.ecosystemappeng.exploitiq.tracing; import io.opentelemetry.context.Context; import jakarta.annotation.Priority; @@ -20,7 +20,7 @@ import jakarta.interceptor.Interceptor; import jakarta.interceptor.InvocationContext; import org.jboss.logmanager.MDC; -import static com.redhat.ecosystemappeng.morpheus.tracing.TracingFieldsCustomizer.TRACE_ID; +import static com.redhat.ecosystemappeng.exploitiq.tracing.TracingFieldsCustomizer.TRACE_ID; @TraceToMdc @Priority(100) diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TracingFieldsCustomizer.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TracingFieldsCustomizer.java similarity index 96% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TracingFieldsCustomizer.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TracingFieldsCustomizer.java index f0265b1e..5e0e29f6 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/tracing/TracingFieldsCustomizer.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/tracing/TracingFieldsCustomizer.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.tracing; +package com.redhat.ecosystemappeng.exploitiq.tracing; import io.opentelemetry.context.ContextKey; import io.opentelemetry.context.propagation.TextMapPropagator; diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/validation/CveIdRules.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/validation/CveIdRules.java similarity index 94% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/validation/CveIdRules.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/validation/CveIdRules.java index 4108b505..b7c3538f 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/validation/CveIdRules.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/validation/CveIdRules.java @@ -12,12 +12,12 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.validation; +package com.redhat.ecosystemappeng.exploitiq.validation; import java.util.Map; import java.util.regex.Pattern; -import com.redhat.ecosystemappeng.morpheus.exception.CveIdValidationException; +import com.redhat.ecosystemappeng.exploitiq.exception.CveIdValidationException; /** * Single place for official CVE id validation (SPDX/CycloneDX uploads, RPM report API, etc.). diff --git a/src/main/java/com/redhat/ecosystemappeng/morpheus/validation/RpmArchitecture.java b/src/main/java/com/redhat/ecosystemappeng/exploitiq/validation/RpmArchitecture.java similarity index 97% rename from src/main/java/com/redhat/ecosystemappeng/morpheus/validation/RpmArchitecture.java rename to src/main/java/com/redhat/ecosystemappeng/exploitiq/validation/RpmArchitecture.java index 52bb6890..7a9bfaf4 100644 --- a/src/main/java/com/redhat/ecosystemappeng/morpheus/validation/RpmArchitecture.java +++ b/src/main/java/com/redhat/ecosystemappeng/exploitiq/validation/RpmArchitecture.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.validation; +package com.redhat.ecosystemappeng.exploitiq.validation; import java.util.Map; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index db277dc4..f6b14593 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -15,8 +15,8 @@ client.global.github.api-key=${GITHUB_TOKEN:""} quarkus.rest-client.github.url=https://api.github.com quarkus.rest-client.github.headers.User-Agent=exploit-iq -quarkus.rest-client.morpheus.url=https://agent-morpheus:8080/generate -%dev.quarkus.rest-client.morpheus.url=http://localhost:26466/generate +quarkus.rest-client.exploit-iq.url=https://exploit-iq:8080/generate +%dev.quarkus.rest-client.exploit-iq.url=http://localhost:26466/generate %dev.NAMESPACE=local-dev quarkus.rest-client.component-syncer.url=http://job-sink.knative-eventing.svc.cluster.local/${NAMESPACE}/component-syncer %dev.quarkus.rest-client.component-syncer.url=http://localhost:8088/${NAMESPACE:exploit-iq}/component-syncer @@ -41,7 +41,7 @@ quarkus.mongodb.credentials.auth-source=exploit-iq-client quarkus.native.resources.includes=includes.json,excludes.json,preProcessingTemplate.json quarkus.http.limits.max-body-size=300M -quarkus.rest-client.morpheus.read-timeout=300000 +quarkus.rest-client.exploit-iq.read-timeout=300000 quarkus.http.limits.max-form-attribute-size=10K @@ -146,12 +146,12 @@ quarkus.http.auth.permission.default.policy=role-policy # quarkus.log.category."io.quarkus.oidc".level=DEBUG # quarkus.log.category."io.quarkus.oidc".min-level=DEBUG -%dev.quarkus.log.category."com.redhat.ecosystemappeng.morpheus".level=DEBUG +%dev.quarkus.log.category."com.redhat.ecosystemappeng.exploitiq".level=DEBUG %dev.quarkus.keycloak.devservices.realm-path=src/test/resources/devservices/keycloak-realm.json %dev.quarkus.wiremock.devservices.reload=true %dev.quarkus.wiremock.devservices.files-mapping=src/test/resources/devservices/wiremock #%dev.quarkus.rest-client.github.url=https://api.github.com -#%dev.quarkus.rest-client.morpheus.url=http://localhost:${quarkus.wiremock.devservices.port}/morpheus/scan +#%dev.quarkus.rest-client.exploit-iq.url=http://localhost:${quarkus.wiremock.devservices.port}/exploit-iq/scan %dev.quarkus.oidc.credentials.secret=example-credentials # Dev: Auth disabled by default. Enable with: # -Dquarkus.oidc.enabled=true -Dquarkus.keycloak.devservices.enabled=true @@ -175,36 +175,36 @@ quarkus.micrometer.binder.http-server.ignore-patterns=^(?!/reports).*$ quarkus.log.console.format=%d{HH:mm:ss} %-5p traceId=%X{traceId}, parentId=%X{parentId}, spanId=%X{spanId}, sampled=%X{sampled} [%c{2.}] (%t) %s%e%n # Queue settings -morpheus.queue.max-active=20 -morpheus.queue.timeout=2h +exploit-iq.queue.max-active=20 +exploit-iq.queue.timeout=2h -# Credential TTL automatically uses morpheus.queue.timeout (see CredentialStoreService) +# Credential TTL automatically uses exploit-iq.queue.timeout (see CredentialStoreService) # This ensures credentials survive queue wait before Agent execution -morpheus.credential-store.encryption-key=${CREDENTIAL_ENCRYPTION_KEY} +exploit-iq.credential-store.encryption-key=${CREDENTIAL_ENCRYPTION_KEY} # Development override (hardcoded key for dev/test purposes) -%dev.morpheus.credential-store.encryption-key=${CREDENTIAL_ENCRYPTION_KEY:dev-test-key-must-be-32bytes-long!} +%dev.exploit-iq.credential-store.encryption-key=${CREDENTIAL_ENCRYPTION_KEY:dev-test-key-must-be-32bytes-long!} # Component Syncer settings -morpheus.syncer.timeout=2h +exploit-iq.syncer.timeout=2h -morpheus.syncer.health.url=http://job-sink.knative-eventing.svc.cluster.local/${NAMESPACE}/component-syncer -%dev.morpheus.syncer.health.url=http://localhost:8088/${NAMESPACE:exploit-iq}/component-syncer -morpheus.syncer.health.timeout=2000ms +exploit-iq.syncer.health.url=http://job-sink.knative-eventing.svc.cluster.local/${NAMESPACE}/component-syncer +%dev.exploit-iq.syncer.health.url=http://localhost:8088/${NAMESPACE:exploit-iq}/component-syncer +exploit-iq.syncer.health.timeout=2000ms # Syft settings -morpheus.syft.cache.dir=${SYFT_CACHE_DIR:/work/.cache/syft} +exploit-iq.syft.cache.dir=${SYFT_CACHE_DIR:/work/.cache/syft} # Feedback API settings -quarkus.rest-client.feedback-api.url=http://morpheus-feedback-api:5001 +quarkus.rest-client.feedback-api.url=http://exploit-iq-feedback-api:5001 %dev.quarkus.rest-client.feedback-api.url=http://localhost:5001 # Engine settings -morpheus.engine.health.url=http://exploit-iq:8080/health -%dev.morpheus.engine.health.url=http://localhost:26466/health -morpheus.engine.health.timeout=2000ms +exploit-iq.engine.health.url=http://exploit-iq:8080/health +%dev.exploit-iq.engine.health.url=http://localhost:26466/health +exploit-iq.engine.health.timeout=2000ms # Seed Mongo from devservices JSON in dev (always on for this profile) -%dev.morpheus.database.init.enabled=true +%dev.exploit-iq.database.init.enabled=true diff --git a/src/main/resources/preProcessingTemplate.json b/src/main/resources/preProcessingTemplate.json index 13442078..a7813528 100644 --- a/src/main/resources/preProcessingTemplate.json +++ b/src/main/resources/preProcessingTemplate.json @@ -1,7 +1,7 @@ { "specversion": "1.0", "id": "", - "source": "agent.morpheus.client", + "source": "exploit-iq.client", "type": "component.analysis", "datacontenttype": "application/json", "data": [] diff --git a/src/main/webui/index.html b/src/main/webui/index.html index 16354a72..a04f3571 100644 --- a/src/main/webui/index.html +++ b/src/main/webui/index.html @@ -17,7 +17,7 @@ - Exploit Intelligence + ExploitIQ
diff --git a/src/main/webui/openapi.json b/src/main/webui/openapi.json index 8e04c896..7897fd23 100644 --- a/src/main/webui/openapi.json +++ b/src/main/webui/openapi.json @@ -531,7 +531,7 @@ } }, "PipelineMode": { - "description": "Morpheus agent pipeline mode", + "description": "ExploitIQ pipeline mode", "type": "string", "enum": [ "full_pipeline", @@ -2945,7 +2945,7 @@ }, "post": { "summary": "Receive analysis report", - "description": "Receives a completed analysis report from Morpheus", + "description": "Receives a completed analysis report from ExploitIQ", "requestBody": { "content": { "application/json": { @@ -3269,7 +3269,7 @@ "/api/v1/reports/new-rpm-report": { "post": { "summary": "Create analysis request for an RPM package", - "description": "Accepts RPM name, version, release, architecture, and a CVE id; builds a Morpheus input with pipeline_mode rpm_package_checker and target_package, persists the report, and always submits it for analysis (same queue path as POST /reports/new with submit=true). Validation errors use the same field-mapped JSON shape as POST /products/upload-spdx (object \"errors\" mapping field names to messages).", + "description": "Accepts RPM name, version, release, architecture, and a CVE id; builds an ExploitIQ input with pipeline_mode rpm_package_checker and target_package, persists the report, and always submits it for analysis (same queue path as POST /reports/new with submit=true). Validation errors use the same field-mapped JSON shape as POST /products/upload-spdx (object \"errors\" mapping field names to messages).", "requestBody": { "description": "RPM package coordinates and CVE identifier", "content": { diff --git a/src/main/webui/package-lock.json b/src/main/webui/package-lock.json index 529cfb0a..ddc8e32c 100644 --- a/src/main/webui/package-lock.json +++ b/src/main/webui/package-lock.json @@ -1,11 +1,11 @@ { - "name": "agent-morpheus-client-webui", + "name": "exploit-iq-client-webui", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "agent-morpheus-client-webui", + "name": "exploit-iq-client-webui", "version": "1.0.0", "dependencies": { "@patternfly/react-charts": "^8.5.1", diff --git a/src/main/webui/package.json b/src/main/webui/package.json index a557e0f2..192a3727 100644 --- a/src/main/webui/package.json +++ b/src/main/webui/package.json @@ -1,5 +1,5 @@ { - "name": "agent-morpheus-client-webui", + "name": "exploit-iq-client-webui", "version": "1.0.0", "type": "module", "scripts": { diff --git a/src/main/webui/src/components/PageHeader.tsx b/src/main/webui/src/components/PageHeader.tsx index 37fbc37c..156f2652 100644 --- a/src/main/webui/src/components/PageHeader.tsx +++ b/src/main/webui/src/components/PageHeader.tsx @@ -158,7 +158,7 @@ const PageHeader: React.FC = ({ isSidebarOpen, onSidebarToggle - + diff --git a/src/main/webui/src/generated-client/models/PipelineMode.ts b/src/main/webui/src/generated-client/models/PipelineMode.ts index 81de02eb..122cf3a4 100644 --- a/src/main/webui/src/generated-client/models/PipelineMode.ts +++ b/src/main/webui/src/generated-client/models/PipelineMode.ts @@ -3,6 +3,6 @@ /* tslint:disable */ /* eslint-disable */ /** - * Morpheus agent pipeline mode + * ExploitIq agent pipeline mode */ export type PipelineMode = 'full_pipeline' | 'rpm_package_checker'; diff --git a/src/main/webui/src/generated-client/services/ReportEndpointService.ts b/src/main/webui/src/generated-client/services/ReportEndpointService.ts index 90958d27..e987281d 100644 --- a/src/main/webui/src/generated-client/services/ReportEndpointService.ts +++ b/src/main/webui/src/generated-client/services/ReportEndpointService.ts @@ -42,7 +42,7 @@ export class ReportEndpointService { } /** * Receive analysis report - * Receives a completed analysis report from Morpheus + * Receives a completed analysis report from ExploitIq * @returns ReportRequestId Report received * @throws ApiError */ @@ -241,7 +241,7 @@ export class ReportEndpointService { } /** * Create analysis request for an RPM package - * Accepts RPM name, version, release, architecture, and a CVE id; builds a Morpheus input with pipeline_mode rpm_package_checker and target_package, persists the report, and always submits it for analysis (same queue path as POST /reports/new with submit=true). Validation errors use the same field-mapped JSON shape as POST /products/upload-spdx (object "errors" mapping field names to messages). + * Accepts RPM name, version, release, architecture, and a CVE id; builds an ExploitIq input with pipeline_mode rpm_package_checker and target_package, persists the report, and always submits it for analysis (same queue path as POST /reports/new with submit=true). Validation errors use the same field-mapped JSON shape as POST /products/upload-spdx (object "errors" mapping field names to messages). * @returns ReportData Analysis request accepted * @throws ApiError */ diff --git a/src/main/webui/src/types/FullReport.ts b/src/main/webui/src/types/FullReport.ts index 39bceae6..27613c0d 100644 --- a/src/main/webui/src/types/FullReport.ts +++ b/src/main/webui/src/types/FullReport.ts @@ -42,7 +42,7 @@ export interface Justification { reason?: string; } -/** RPM NEVRA persisted under Morpheus `input.image.target_package`. */ +/** RPM NEVRA persisted under ExploitIQ `input.image.target_package`. */ export interface RpmTargetPackage { name?: string; version?: string; diff --git a/src/main/webui/src/utils/rpmReport.ts b/src/main/webui/src/utils/rpmReport.ts index ff58339c..18fc7b8e 100644 --- a/src/main/webui/src/utils/rpmReport.ts +++ b/src/main/webui/src/utils/rpmReport.ts @@ -12,7 +12,7 @@ import type { FullReport, RpmTargetPackage } from "../types/FullReport"; -/** Persisted Morpheus discriminant for RPM vulnerability checks (`new-rpm-report-api`). */ +/** Persisted ExploitIq discriminant for RPM vulnerability checks (`new-rpm-report-api`). */ export const RPM_PIPELINE_MODE = "rpm_package_checker" as const; export function isRpmPackageCheckerReport( diff --git a/src/test/README.md b/src/test/README.md index aa442856..0546df24 100644 --- a/src/test/README.md +++ b/src/test/README.md @@ -13,7 +13,7 @@ Then run `./mvnw test` (or your usual Maven test invocation). Without this, test ## REST API tests (`@QuarkusTest` + REST Assured) -The package `com.redhat.ecosystemappeng.morpheus.rest` holds HTTP-level tests for the backend. They are **JUnit 5** classes annotated with **`@QuarkusTest`** and use **REST Assured** for requests and assertions. +The package `com.redhat.ecosystemappeng.exploitiq.rest` holds HTTP-level tests for the backend. They are **JUnit 5** classes annotated with **`@QuarkusTest`** and use **REST Assured** for requests and assertions. ### Two ways to run the same tests @@ -21,14 +21,14 @@ The package `com.redhat.ecosystemappeng.morpheus.rest` holds HTTP-level tests fo - Run: `./mvnw test` (or a narrower `-Dtest=…`). - **RestAssured** uses the URL Quarkus assigns to the **test application** started in the same JVM. -- Typical stack: test `application.properties`, Mongo Dev Services, WireMock for outbound clients (e.g. Morpheus, GitHub), seeded data where enabled. +- Typical stack: test `application.properties`, Mongo Dev Services, WireMock for outbound clients (e.g. ExploitIQ, GitHub), seeded data where enabled. - **Use when:** fast feedback, CI, no separate server needed. #### 2. Optional — RestAssured pointed at a **running** server -- Set Quarkus config **`morpheus.rest-test.external-base-url`** to the base URL of an already-running app (no trailing slash required), for example: - - **Maven:** `./mvnw test -Dmorpheus.rest-test.external-base-url=http://localhost:8080` - - **`src/test/resources/application.properties`:** `%test.morpheus.rest-test.external-base-url=http://localhost:8080` +- Set Quarkus config **`exploit-iq.rest-test.external-base-url`** to the base URL of an already-running app (no trailing slash required), for example: + - **Maven:** `./mvnw test -Dexploit-iq.rest-test.external-base-url=http://localhost:8080` + - **`src/test/resources/application.properties`:** `%test.exploit-iq.rest-test.external-base-url=http://localhost:8080` - **`@BeforeEach`**, tests call `RestApiTestFixture.configureRestAssuredIfExternal()`, which sets `RestAssured.baseURI` when that property is non-blank. - The **`@QuarkusTest` application still starts** in the test JVM; HTTP calls go to the **remote** base URL. That lets you reuse the **same** test code against e.g. `quarkus dev`, a container, or a shared environment. @@ -36,7 +36,7 @@ The package `com.redhat.ecosystemappeng.morpheus.rest` holds HTTP-level tests fo - **One suite, two targets:** identical assertions exercise both the isolated test stack and a **real deployment** (local or staging), without maintaining a duplicate “integration only” test project. - **End-to-end confidence:** catch wiring, configuration, data, and infrastructure issues that only appear outside the trimmed test profile, while keeping a single source of truth for API behavior. -- **Practical workflow:** run default tests in CI; occasionally run with `morpheus.rest-test.external-base-url` after a release candidate or config change to validate the running service matches expectations. +- **Practical workflow:** run default tests in CI; occasionally run with `exploit-iq.rest-test.external-base-url` after a release candidate or config change to validate the running service matches expectations. ### Other helpers @@ -48,7 +48,7 @@ For project-wide conventions (Surefire vs Failsafe, quality gates), see `openspe ## CI test pipeline image -The Tekton task **`.tekton/tekton-tasks/maven-test-ci.yaml`** runs **`./mvnw test`** inside **`quay.io/exploit-iq/agent-morpheus-client-test-image:latest`**. That image bundles **JDK 21** (UBI OpenJDK) and **Syft** on `PATH`, using the same Syft install approach as **`src/main/docker/Dockerfile.multi-stage`** (install on Mandrel builder, copy `/tmp/syft` into the runtime layer) so `install.sh` has `gzip`/`tar` available. +The Tekton task **`.tekton/tekton-tasks/maven-test-ci.yaml`** runs **`./mvnw test`** inside **`quay.io/ecosystem-appeng/exploit-iq-test-image:latest`**. That image bundles **JDK 21** (UBI OpenJDK) and **Syft** on `PATH`, using the same Syft install approach as **`src/main/docker/Dockerfile.multi-stage`** (install on Mandrel builder, copy `/tmp/syft` into the runtime layer) so `install.sh` has `gzip`/`tar` available. Pipelines expect that image tag to exist in Quay before `maven-test` can succeed. @@ -58,10 +58,10 @@ From the **repository root** (requires access to `registry.redhat.io`; use `dock ```bash docker build -f src/test/docker/Dockerfile \ - -t quay.io/exploit-iq/agent-morpheus-client-test-image:latest \ + -t quay.io/ecosystem-appeng/exploit-iq-test-image:latest \ src/test/docker -docker push quay.io/exploit-iq/agent-morpheus-client-test-image:latest +docker push quay.io/ecosystem-appeng/exploit-iq-test-image:latest ``` For pushes to a **private** registry, point **`DOCKER_CONFIG`** at a directory that contains **`config.json`** (see Docker documentation); that directory must be the config **folder**, not the file path. diff --git a/src/test/docker/Dockerfile b/src/test/docker/Dockerfile index 8256c2f0..03b27e5d 100644 --- a/src/test/docker/Dockerfile +++ b/src/test/docker/Dockerfile @@ -1,6 +1,6 @@ # JDK 21 + Syft for Tekton maven-test and local CI. # Syft installation mirrors src/main/docker/Dockerfile.multi-stage (mandrel stage + COPY /tmp/syft). -# Build (repo root): docker build -f src/test/docker/Dockerfile -t quay.io/exploit-iq/agent-morpheus-client-test-image:latest src/test/docker +# Build (repo root): docker build -f src/test/docker/Dockerfile -t quay.io/ecosystem-appeng/exploit-iq-test-image:latest src/test/docker # # Why mandrel for syft only: anchore install.sh unpacks a .tar.gz and needs gzip; ubi9/openjdk-21 # slim variants may not ship gzip, which causes "tar (child): gzip: Cannot exec". @@ -10,7 +10,7 @@ RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | FROM registry.redhat.io/ubi9/openjdk-21:latest -LABEL org.opencontainers.image.title="agent-morpheus-client-test-image" +LABEL org.opencontainers.image.title="exploit-iq-client-test-image" LABEL org.opencontainers.image.description="UBI OpenJDK 21 with Syft (same install path as Dockerfile.multi-stage)" LABEL app="exploit-iq" LABEL component="exploit-iq-client" diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationMessagesTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationMessagesTest.java similarity index 96% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationMessagesTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationMessagesTest.java index f78f2047..792c49c1 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/exception/SbomValidationMessagesTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/exception/SbomValidationMessagesTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package com.redhat.ecosystemappeng.morpheus.exception; +package com.redhat.ecosystemappeng.exploitiq.exception; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/repository/ReportRepositoryServiceTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/repository/ReportRepositoryServiceTest.java similarity index 94% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/repository/ReportRepositoryServiceTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/repository/ReportRepositoryServiceTest.java index e59d3207..320fcea5 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/repository/ReportRepositoryServiceTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/repository/ReportRepositoryServiceTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package com.redhat.ecosystemappeng.morpheus.repository; +package com.redhat.ecosystemappeng.exploitiq.repository; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/GetProductsRestTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/GetProductsRestTest.java similarity index 99% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/rest/GetProductsRestTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/GetProductsRestTest.java index f96ad008..a3b5afb7 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/GetProductsRestTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/GetProductsRestTest.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import static org.hamcrest.Matchers.*; diff --git a/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/McpClientEndpointRestTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/McpClientEndpointRestTest.java new file mode 100644 index 00000000..664c81cc --- /dev/null +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/McpClientEndpointRestTest.java @@ -0,0 +1,360 @@ +package com.redhat.ecosystemappeng.exploitiq.rest; + +import static org.hamcrest.Matchers.*; + +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; +import io.restassured.http.ContentType; + +@QuarkusTest +public class McpClientEndpointRestTest { + + private final List createdClientIds = new ArrayList<>(); + + @BeforeEach + void restAssuredBase() { + RestApiTestFixture.configureRestAssuredIfExternal(); + } + + @AfterEach + void cleanupClients() { + for (String clientId : createdClientIds) { + try { + RestAssured.given() + .when() + .delete("/api/v1/mcp-clients/" + clientId); + } catch (Exception ignored) { + } + } + createdClientIds.clear(); + } + + private Map buildRegistration(String clientId, String clientName) { + return Map.of( + "clientId", clientId, + "clientName", clientName, + "redirectUris", List.of("http://localhost:3000/callback"), + "grantTypes", List.of("authorization_code"), + "registeredAt", Instant.now().toString(), + "clientData", Map.of("scope", "openid", "token_endpoint_auth_method", "client_secret_post") + ); + } + + @Test + void testRegisterAndGetClient() { + String clientId = "test-" + UUID.randomUUID(); + createdClientIds.add(clientId); + Map registration = buildRegistration(clientId, "Test Client"); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(registration) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(201) + .contentType(ContentType.JSON) + .body("clientId", equalTo(clientId)) + .body("clientName", equalTo("Test Client")) + .body("redirectUris", hasItem("http://localhost:3000/callback")) + .body("grantTypes", hasItem("authorization_code")); + + RestAssured.given() + .when() + .get("/api/v1/mcp-clients/" + clientId) + .then() + .statusCode(200) + .contentType(ContentType.JSON) + .body("clientId", equalTo(clientId)) + .body("clientName", equalTo("Test Client")) + .body("clientData.scope", equalTo("openid")); + } + + @Test + void testRegisterDuplicateReturns409() { + String clientId = "dup-" + UUID.randomUUID(); + createdClientIds.add(clientId); + Map registration = buildRegistration(clientId, "Dup Client"); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(registration) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(201); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(registration) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(409) + .body("error", containsString("already exists")); + } + + @Test + void testRegisterWithMissingClientIdReturns400() { + Map registration = Map.of( + "clientName", "Bad Client", + "redirectUris", List.of(), + "grantTypes", List.of(), + "registeredAt", Instant.now().toString(), + "clientData", Map.of() + ); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(registration) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(400); + } + + @Test + void testGetNonExistentClientReturns404() { + RestAssured.given() + .when() + .get("/api/v1/mcp-clients/nonexistent-client-" + UUID.randomUUID()) + .then() + .statusCode(404) + .body("error", containsString("not found")); + } + + @Test + void testDeleteNonExistentClientReturns404() { + RestAssured.given() + .when() + .delete("/api/v1/mcp-clients/nonexistent-client-" + UUID.randomUUID()) + .then() + .statusCode(404) + .body("error", containsString("not found")); + } + + @Test + void testListClients() { + String clientId1 = "list-a-" + UUID.randomUUID(); + String clientId2 = "list-b-" + UUID.randomUUID(); + createdClientIds.add(clientId1); + createdClientIds.add(clientId2); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(buildRegistration(clientId1, "List Client A")) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(201); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(buildRegistration(clientId2, "List Client B")) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(201); + + RestAssured.given() + .when() + .queryParam("page", 0) + .queryParam("pageSize", 100) + .get("/api/v1/mcp-clients") + .then() + .statusCode(200) + .contentType(ContentType.JSON) + .header("X-Total-Elements", notNullValue()) + .body("clientId", hasItems(clientId1, clientId2)); + } + + @Test + void testListClientsPagination() { + String clientId1 = "page-a-" + UUID.randomUUID(); + String clientId2 = "page-b-" + UUID.randomUUID(); + createdClientIds.add(clientId1); + createdClientIds.add(clientId2); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(buildRegistration(clientId1, "Page Client A")) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(201); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(buildRegistration(clientId2, "Page Client B")) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(201); + + RestAssured.given() + .when() + .queryParam("page", 0) + .queryParam("pageSize", 1) + .get("/api/v1/mcp-clients") + .then() + .statusCode(200) + .header("X-Total-Elements", notNullValue()) + .header("X-Total-Pages", notNullValue()) + .body("size()", equalTo(1)); + } + + @Test + void testRegisterWithBlankClientIdReturns400() { + Map registration = Map.of( + "clientId", " ", + "clientName", "Blank Id Client", + "redirectUris", List.of(), + "grantTypes", List.of(), + "registeredAt", Instant.now().toString(), + "clientData", Map.of() + ); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(registration) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(400); + } + + @Test + void testRegisterWithMissingClientNameReturns400() { + Map registration = Map.of( + "clientId", "no-name-" + UUID.randomUUID(), + "redirectUris", List.of(), + "grantTypes", List.of(), + "registeredAt", Instant.now().toString(), + "clientData", Map.of() + ); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(registration) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(400); + } + + @Test + void testRegisterWithMissingRegisteredAtReturns400() { + Map registration = Map.of( + "clientId", "no-date-" + UUID.randomUUID(), + "clientName", "No Date Client", + "redirectUris", List.of(), + "grantTypes", List.of(), + "clientData", Map.of() + ); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(registration) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(400); + } + + @Test + void testRegisterWithMissingClientDataReturns400() { + Map registration = Map.of( + "clientId", "no-data-" + UUID.randomUUID(), + "clientName", "No Data Client", + "redirectUris", List.of(), + "grantTypes", List.of(), + "registeredAt", Instant.now().toString() + ); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(registration) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(400); + } + + @Test + void testRegisterWithMalformedRegisteredAtReturns400() { + Map registration = Map.of( + "clientId", "bad-date-" + UUID.randomUUID(), + "clientName", "Bad Date Client", + "redirectUris", List.of(), + "grantTypes", List.of(), + "registeredAt", "not-a-date", + "clientData", Map.of() + ); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(registration) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(400); + } + + @Test + void testListWithNegativePageReturns400() { + RestAssured.given() + .when() + .queryParam("page", -1) + .queryParam("pageSize", 10) + .get("/api/v1/mcp-clients") + .then() + .statusCode(400); + } + + @Test + void testListWithZeroPageSizeReturns400() { + RestAssured.given() + .when() + .queryParam("page", 0) + .queryParam("pageSize", 0) + .get("/api/v1/mcp-clients") + .then() + .statusCode(400); + } + + @Test + void testDeleteClient() { + String clientId = "del-" + UUID.randomUUID(); + createdClientIds.add(clientId); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(buildRegistration(clientId, "Delete Me")) + .when() + .post("/api/v1/mcp-clients") + .then() + .statusCode(201); + + RestAssured.given() + .when() + .delete("/api/v1/mcp-clients/" + clientId) + .then() + .statusCode(204); + + RestAssured.given() + .when() + .get("/api/v1/mcp-clients/" + clientId) + .then() + .statusCode(404); + } +} \ No newline at end of file diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/NewRpmReportRestTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/NewRpmReportRestTest.java similarity index 96% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/rest/NewRpmReportRestTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/NewRpmReportRestTest.java index 56458a80..a64bbdeb 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/NewRpmReportRestTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/NewRpmReportRestTest.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import java.util.HashMap; import java.util.Map; @@ -21,8 +21,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import com.redhat.ecosystemappeng.morpheus.exception.CveIdValidationException; -import com.redhat.ecosystemappeng.morpheus.model.morpheus.PipelineMode; +import com.redhat.ecosystemappeng.exploitiq.exception.CveIdValidationException; +import com.redhat.ecosystemappeng.exploitiq.model.exploitiq.PipelineMode; import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/ProductEndpointRestTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/ProductEndpointRestTest.java similarity index 99% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/rest/ProductEndpointRestTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/ProductEndpointRestTest.java index 66ae49f9..7d77f23f 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/ProductEndpointRestTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/ProductEndpointRestTest.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import static org.hamcrest.Matchers.*; diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/ReportEndpointFailedRestTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportEndpointFailedRestTest.java similarity index 97% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/rest/ReportEndpointFailedRestTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportEndpointFailedRestTest.java index d7a42e2c..5f0510fc 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/ReportEndpointFailedRestTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportEndpointFailedRestTest.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import static org.hamcrest.Matchers.*; diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/ReportListInputTypeRestTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportListInputTypeRestTest.java similarity index 99% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/rest/ReportListInputTypeRestTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportListInputTypeRestTest.java index b812dabd..cff1543a 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/ReportListInputTypeRestTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/ReportListInputTypeRestTest.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import static org.hamcrest.Matchers.equalTo; diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/RestApiTestFixture.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/RestApiTestFixture.java similarity index 90% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/rest/RestApiTestFixture.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/RestApiTestFixture.java index c8ef7f9f..7d323175 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/RestApiTestFixture.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/RestApiTestFixture.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import java.time.Duration; import java.util.List; @@ -15,15 +15,15 @@ *

* Optional remote base URL for RestAssured: Quarkus config key * {@value #CONFIG_KEY_EXTERNAL_BASE_URL} (e.g. set in {@code src/test/resources/application.properties} - * as {@code %test.morpheus.rest-test.external-base-url} or on the Maven command line as - * {@code -Dmorpheus.rest-test.external-base-url=http://localhost:8080}). When unset or blank, + * as {@code %test.exploit-iq.rest-test.external-base-url} or on the Maven command line as + * {@code -Dexploit-iq.rest-test.external-base-url=http://localhost:8080}). When unset or blank, * {@link #configureRestAssuredIfExternal()} does nothing so Quarkus keeps the default in-process test URL. */ public final class RestApiTestFixture { /** Quarkus / MicroProfile config key for RestAssured base URI during REST tests. */ - public static final String CONFIG_KEY_EXTERNAL_BASE_URL = "morpheus.rest-test.external-base-url"; - public static final String CONFIG_KEY_SPDX_TIMEOUT = "morpheus.rest-test.spdx-timeout"; + public static final String CONFIG_KEY_EXTERNAL_BASE_URL = "exploit-iq.rest-test.external-base-url"; + public static final String CONFIG_KEY_SPDX_TIMEOUT = "exploit-iq.rest-test.spdx-timeout"; private static final Duration DEFAULT_SPDX_TIMEOUT = Duration.ofMinutes(10); private RestApiTestFixture() { diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/UploadCycloneDxRestTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/UploadCycloneDxRestTest.java similarity index 99% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/rest/UploadCycloneDxRestTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/UploadCycloneDxRestTest.java index 8d2e8da7..036a0765 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/UploadCycloneDxRestTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/UploadCycloneDxRestTest.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import static org.hamcrest.Matchers.*; diff --git a/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/UploadSpdxMockedSyftRestTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/UploadSpdxMockedSyftRestTest.java new file mode 100644 index 00000000..a2edaf41 --- /dev/null +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/UploadSpdxMockedSyftRestTest.java @@ -0,0 +1,89 @@ +package com.redhat.ecosystemappeng.exploitiq.rest; + +import static org.hamcrest.Matchers.*; + +import java.io.File; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.redhat.ecosystemappeng.exploitiq.model.ParsedCycloneDx; +import com.redhat.ecosystemappeng.exploitiq.service.GenerateSbomService; + +import io.quarkus.test.InjectMock; +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; +import io.restassured.http.ContentType; + +/** + * SPDX upload tests that mock {@link GenerateSbomService} to avoid real syft/registry calls. + */ +@QuarkusTest +public class UploadSpdxMockedSyftRestTest { + + private static final String SPDX_WITH_UNSUPPORTED = "src/test/resources/devservices/spdx-sboms/spdx-with-unsupported-component.json"; + private static final String CYCLONEDX_FIXTURE = "src/test/resources/devservices/cyclonedx-sboms/nmstate-rhel8-operator.json"; + private static final String TEST_VULN_ID = "CVE-2021-4238"; + + @InjectMock + GenerateSbomService generateSbomService; + + @BeforeEach + void setUp() throws Exception { + RestApiTestFixture.configureRestAssuredIfExternal(); + + ObjectMapper mapper = new ObjectMapper(); + JsonNode sbomJson = mapper.readTree(new File(CYCLONEDX_FIXTURE)); + JsonNode component = sbomJson.get("metadata").get("component"); + + ParsedCycloneDx mockSbom = new ParsedCycloneDx( + sbomJson, + component.get("name").asText(), + component.has("version") ? component.get("version").asText() : null, + component.has("description") ? component.get("description").asText() : null, + component.has("type") ? component.get("type").asText() : null, + component.has("purl") ? component.get("purl").asText() : null, + component.has("bom-ref") ? component.get("bom-ref").asText() : null); + + Mockito.when(generateSbomService.generate(Mockito.anyString())) + .thenReturn(mockSbom); + } + + @Test + void testUpload_SpdxWithUnsupportedComponent_RecordsInSubmissionFailures() { + File sbomFile = new File(SPDX_WITH_UNSUPPORTED); + + String productId = RestAssured.given() + .contentType(ContentType.MULTIPART) + .multiPart("cveId", TEST_VULN_ID) + .multiPart("file", sbomFile) + .when() + .post("/api/v1/products/upload-spdx") + .then() + .statusCode(202) + .contentType(ContentType.JSON) + .body("productId", notNullValue()) + .extract() + .path("productId"); + + Assertions.assertNotNull(productId, "Product ID should not be null"); + RestApiTestFixture.awaitSpdxProductProcessingComplete(productId); + + RestAssured.given() + .when() + .get("/api/v1/products/" + productId) + .then() + .statusCode(200) + .contentType(ContentType.JSON) + .body("data.submittedCount", equalTo(2)) + .body("data.submissionFailures", notNullValue()) + .body("data.submissionFailures", hasSize(1)) + .body("data.submissionFailures[0].name", equalTo("maven-lib")) + .body("data.submissionFailures[0].version", equalTo("2.0")) + .body("data.submissionFailures[0].error", containsString("Expects a container image purl with format pkg:oci/name@sha256:hash?repository_url=...&tag=...")); + } +} \ No newline at end of file diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/UploadSpdxRestTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/UploadSpdxRestTest.java similarity index 97% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/rest/UploadSpdxRestTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/UploadSpdxRestTest.java index 62eacc71..aaf6b399 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/UploadSpdxRestTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/rest/UploadSpdxRestTest.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.rest; +package com.redhat.ecosystemappeng.exploitiq.rest; import static org.hamcrest.Matchers.*; @@ -8,7 +8,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import com.redhat.ecosystemappeng.morpheus.service.SpdxParsingService; +import com.redhat.ecosystemappeng.exploitiq.service.SpdxParsingService; import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; @@ -36,7 +36,7 @@ void restAssuredBase() { private static final int GITOPS_119_EXPECTED_SUBMISSION_FAILURE_COUNT = 1; /** - * Successful Morpheus-backed reports after async processing: + * Successful exploit-iq-backed reports after async processing: * {@link #GITOPS_119_EXPECTED_SUBMITTED_COUNT} submitted = * {@link #GITOPS_119_EXPECTED_REPORT_COUNT} reports + {@link #GITOPS_119_EXPECTED_SUBMISSION_FAILURE_COUNT} failure(s). */ diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/service/ReportServiceCredentialInjectionOrderTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/service/ReportServiceCredentialInjectionOrderTest.java similarity index 90% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/service/ReportServiceCredentialInjectionOrderTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/service/ReportServiceCredentialInjectionOrderTest.java index 8850c0d5..62015c8f 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/service/ReportServiceCredentialInjectionOrderTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/service/ReportServiceCredentialInjectionOrderTest.java @@ -1,13 +1,13 @@ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; -import com.redhat.ecosystemappeng.morpheus.model.ParsedCycloneDx; -import com.redhat.ecosystemappeng.morpheus.model.Product; -import com.redhat.ecosystemappeng.morpheus.model.ReportData; -import com.redhat.ecosystemappeng.morpheus.model.ReportRequestId; -import com.redhat.ecosystemappeng.morpheus.repository.ProductRepositoryService; +import com.redhat.ecosystemappeng.exploitiq.model.ParsedCycloneDx; +import com.redhat.ecosystemappeng.exploitiq.model.Product; +import com.redhat.ecosystemappeng.exploitiq.model.ReportData; +import com.redhat.ecosystemappeng.exploitiq.model.ReportRequestId; +import com.redhat.ecosystemappeng.exploitiq.repository.ProductRepositoryService; import io.quarkus.test.InjectMock; import io.quarkus.test.component.QuarkusComponentTest; import jakarta.inject.Inject; @@ -80,7 +80,7 @@ void submitCycloneDx_injectsCredentialBeforeSave() throws Exception { inOrder.verify(productRepository).save(any(Product.class), any()); inOrder.verify(reportService).submit(any(), any(JsonNode.class)); }, "credentialId must be injected BEFORE saveReport() and submit(), " + - "otherwise it is not persisted in MongoDB and not included in the Morpheus payload"); + "otherwise it is not persisted in MongoDB and not included in the ExploitIQ payload"); } @Test diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/service/ReportServiceMetadataKeysTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/service/ReportServiceMetadataKeysTest.java similarity index 97% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/service/ReportServiceMetadataKeysTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/service/ReportServiceMetadataKeysTest.java index 1c549bb3..e8a0d714 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/service/ReportServiceMetadataKeysTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/service/ReportServiceMetadataKeysTest.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import static org.junit.jupiter.api.Assertions.*; diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/service/SpdxParsingServiceTest.java b/src/test/java/com/redhat/ecosystemappeng/exploitiq/service/SpdxParsingServiceTest.java similarity index 94% rename from src/test/java/com/redhat/ecosystemappeng/morpheus/service/SpdxParsingServiceTest.java rename to src/test/java/com/redhat/ecosystemappeng/exploitiq/service/SpdxParsingServiceTest.java index 64034b0c..9a84eb1c 100644 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/service/SpdxParsingServiceTest.java +++ b/src/test/java/com/redhat/ecosystemappeng/exploitiq/service/SpdxParsingServiceTest.java @@ -1,4 +1,4 @@ -package com.redhat.ecosystemappeng.morpheus.service; +package com.redhat.ecosystemappeng.exploitiq.service; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -8,7 +8,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.exception.SbomValidationException; +import com.redhat.ecosystemappeng.exploitiq.exception.SbomValidationException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/McpClientEndpointRestTest.java b/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/McpClientEndpointRestTest.java deleted file mode 100644 index 85ee1f0a..00000000 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/McpClientEndpointRestTest.java +++ /dev/null @@ -1,360 +0,0 @@ -package com.redhat.ecosystemappeng.morpheus.rest; - -import static org.hamcrest.Matchers.*; - -import java.time.Instant; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import io.quarkus.test.junit.QuarkusTest; -import io.restassured.RestAssured; -import io.restassured.http.ContentType; - -@QuarkusTest -public class McpClientEndpointRestTest { - - private final List createdClientIds = new ArrayList<>(); - - @BeforeEach - void restAssuredBase() { - RestApiTestFixture.configureRestAssuredIfExternal(); - } - - @AfterEach - void cleanupClients() { - for (String clientId : createdClientIds) { - try { - RestAssured.given() - .when() - .delete("/api/v1/mcp-clients/" + clientId); - } catch (Exception ignored) { - } - } - createdClientIds.clear(); - } - - private Map buildRegistration(String clientId, String clientName) { - return Map.of( - "clientId", clientId, - "clientName", clientName, - "redirectUris", List.of("http://localhost:3000/callback"), - "grantTypes", List.of("authorization_code"), - "registeredAt", Instant.now().toString(), - "clientData", Map.of("scope", "openid", "token_endpoint_auth_method", "client_secret_post") - ); - } - - @Test - void testRegisterAndGetClient() { - String clientId = "test-" + UUID.randomUUID(); - createdClientIds.add(clientId); - Map registration = buildRegistration(clientId, "Test Client"); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(registration) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(201) - .contentType(ContentType.JSON) - .body("clientId", equalTo(clientId)) - .body("clientName", equalTo("Test Client")) - .body("redirectUris", hasItem("http://localhost:3000/callback")) - .body("grantTypes", hasItem("authorization_code")); - - RestAssured.given() - .when() - .get("/api/v1/mcp-clients/" + clientId) - .then() - .statusCode(200) - .contentType(ContentType.JSON) - .body("clientId", equalTo(clientId)) - .body("clientName", equalTo("Test Client")) - .body("clientData.scope", equalTo("openid")); - } - - @Test - void testRegisterDuplicateReturns409() { - String clientId = "dup-" + UUID.randomUUID(); - createdClientIds.add(clientId); - Map registration = buildRegistration(clientId, "Dup Client"); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(registration) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(201); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(registration) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(409) - .body("error", containsString("already exists")); - } - - @Test - void testRegisterWithMissingClientIdReturns400() { - Map registration = Map.of( - "clientName", "Bad Client", - "redirectUris", List.of(), - "grantTypes", List.of(), - "registeredAt", Instant.now().toString(), - "clientData", Map.of() - ); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(registration) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(400); - } - - @Test - void testGetNonExistentClientReturns404() { - RestAssured.given() - .when() - .get("/api/v1/mcp-clients/nonexistent-client-" + UUID.randomUUID()) - .then() - .statusCode(404) - .body("error", containsString("not found")); - } - - @Test - void testDeleteNonExistentClientReturns404() { - RestAssured.given() - .when() - .delete("/api/v1/mcp-clients/nonexistent-client-" + UUID.randomUUID()) - .then() - .statusCode(404) - .body("error", containsString("not found")); - } - - @Test - void testListClients() { - String clientId1 = "list-a-" + UUID.randomUUID(); - String clientId2 = "list-b-" + UUID.randomUUID(); - createdClientIds.add(clientId1); - createdClientIds.add(clientId2); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(buildRegistration(clientId1, "List Client A")) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(201); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(buildRegistration(clientId2, "List Client B")) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(201); - - RestAssured.given() - .when() - .queryParam("page", 0) - .queryParam("pageSize", 100) - .get("/api/v1/mcp-clients") - .then() - .statusCode(200) - .contentType(ContentType.JSON) - .header("X-Total-Elements", notNullValue()) - .body("clientId", hasItems(clientId1, clientId2)); - } - - @Test - void testListClientsPagination() { - String clientId1 = "page-a-" + UUID.randomUUID(); - String clientId2 = "page-b-" + UUID.randomUUID(); - createdClientIds.add(clientId1); - createdClientIds.add(clientId2); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(buildRegistration(clientId1, "Page Client A")) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(201); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(buildRegistration(clientId2, "Page Client B")) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(201); - - RestAssured.given() - .when() - .queryParam("page", 0) - .queryParam("pageSize", 1) - .get("/api/v1/mcp-clients") - .then() - .statusCode(200) - .header("X-Total-Elements", notNullValue()) - .header("X-Total-Pages", notNullValue()) - .body("size()", equalTo(1)); - } - - @Test - void testRegisterWithBlankClientIdReturns400() { - Map registration = Map.of( - "clientId", " ", - "clientName", "Blank Id Client", - "redirectUris", List.of(), - "grantTypes", List.of(), - "registeredAt", Instant.now().toString(), - "clientData", Map.of() - ); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(registration) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(400); - } - - @Test - void testRegisterWithMissingClientNameReturns400() { - Map registration = Map.of( - "clientId", "no-name-" + UUID.randomUUID(), - "redirectUris", List.of(), - "grantTypes", List.of(), - "registeredAt", Instant.now().toString(), - "clientData", Map.of() - ); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(registration) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(400); - } - - @Test - void testRegisterWithMissingRegisteredAtReturns400() { - Map registration = Map.of( - "clientId", "no-date-" + UUID.randomUUID(), - "clientName", "No Date Client", - "redirectUris", List.of(), - "grantTypes", List.of(), - "clientData", Map.of() - ); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(registration) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(400); - } - - @Test - void testRegisterWithMissingClientDataReturns400() { - Map registration = Map.of( - "clientId", "no-data-" + UUID.randomUUID(), - "clientName", "No Data Client", - "redirectUris", List.of(), - "grantTypes", List.of(), - "registeredAt", Instant.now().toString() - ); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(registration) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(400); - } - - @Test - void testRegisterWithMalformedRegisteredAtReturns400() { - Map registration = Map.of( - "clientId", "bad-date-" + UUID.randomUUID(), - "clientName", "Bad Date Client", - "redirectUris", List.of(), - "grantTypes", List.of(), - "registeredAt", "not-a-date", - "clientData", Map.of() - ); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(registration) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(400); - } - - @Test - void testListWithNegativePageReturns400() { - RestAssured.given() - .when() - .queryParam("page", -1) - .queryParam("pageSize", 10) - .get("/api/v1/mcp-clients") - .then() - .statusCode(400); - } - - @Test - void testListWithZeroPageSizeReturns400() { - RestAssured.given() - .when() - .queryParam("page", 0) - .queryParam("pageSize", 0) - .get("/api/v1/mcp-clients") - .then() - .statusCode(400); - } - - @Test - void testDeleteClient() { - String clientId = "del-" + UUID.randomUUID(); - createdClientIds.add(clientId); - - RestAssured.given() - .contentType(ContentType.JSON) - .body(buildRegistration(clientId, "Delete Me")) - .when() - .post("/api/v1/mcp-clients") - .then() - .statusCode(201); - - RestAssured.given() - .when() - .delete("/api/v1/mcp-clients/" + clientId) - .then() - .statusCode(204); - - RestAssured.given() - .when() - .get("/api/v1/mcp-clients/" + clientId) - .then() - .statusCode(404); - } -} diff --git a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/UploadSpdxMockedSyftRestTest.java b/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/UploadSpdxMockedSyftRestTest.java deleted file mode 100644 index f8542cd3..00000000 --- a/src/test/java/com/redhat/ecosystemappeng/morpheus/rest/UploadSpdxMockedSyftRestTest.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.redhat.ecosystemappeng.morpheus.rest; - -import static org.hamcrest.Matchers.*; - -import java.io.File; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.mockito.Mockito; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.ecosystemappeng.morpheus.model.ParsedCycloneDx; -import com.redhat.ecosystemappeng.morpheus.service.GenerateSbomService; - -import io.quarkus.test.InjectMock; -import io.quarkus.test.junit.QuarkusTest; -import io.restassured.RestAssured; -import io.restassured.http.ContentType; - -/** - * SPDX upload tests that mock {@link GenerateSbomService} to avoid real syft/registry calls. - */ -@QuarkusTest -public class UploadSpdxMockedSyftRestTest { - - private static final String SPDX_WITH_UNSUPPORTED = "src/test/resources/devservices/spdx-sboms/spdx-with-unsupported-component.json"; - private static final String CYCLONEDX_FIXTURE = "src/test/resources/devservices/cyclonedx-sboms/nmstate-rhel8-operator.json"; - private static final String TEST_VULN_ID = "CVE-2021-4238"; - - @InjectMock - GenerateSbomService generateSbomService; - - @BeforeEach - void setUp() throws Exception { - RestApiTestFixture.configureRestAssuredIfExternal(); - - ObjectMapper mapper = new ObjectMapper(); - JsonNode sbomJson = mapper.readTree(new File(CYCLONEDX_FIXTURE)); - JsonNode component = sbomJson.get("metadata").get("component"); - - ParsedCycloneDx mockSbom = new ParsedCycloneDx( - sbomJson, - component.get("name").asText(), - component.has("version") ? component.get("version").asText() : null, - component.has("description") ? component.get("description").asText() : null, - component.has("type") ? component.get("type").asText() : null, - component.has("purl") ? component.get("purl").asText() : null, - component.has("bom-ref") ? component.get("bom-ref").asText() : null); - - Mockito.when(generateSbomService.generate(Mockito.anyString())) - .thenReturn(mockSbom); - } - - @Test - void testUpload_SpdxWithUnsupportedComponent_RecordsInSubmissionFailures() { - File sbomFile = new File(SPDX_WITH_UNSUPPORTED); - - String productId = RestAssured.given() - .contentType(ContentType.MULTIPART) - .multiPart("cveId", TEST_VULN_ID) - .multiPart("file", sbomFile) - .when() - .post("/api/v1/products/upload-spdx") - .then() - .statusCode(202) - .contentType(ContentType.JSON) - .body("productId", notNullValue()) - .extract() - .path("productId"); - - Assertions.assertNotNull(productId, "Product ID should not be null"); - RestApiTestFixture.awaitSpdxProductProcessingComplete(productId); - - RestAssured.given() - .when() - .get("/api/v1/products/" + productId) - .then() - .statusCode(200) - .contentType(ContentType.JSON) - .body("data.submittedCount", equalTo(2)) - .body("data.submissionFailures", notNullValue()) - .body("data.submissionFailures", hasSize(1)) - .body("data.submissionFailures[0].name", equalTo("maven-lib")) - .body("data.submissionFailures[0].version", equalTo("2.0")) - .body("data.submissionFailures[0].error", containsString("Expects a container image purl with format pkg:oci/name@sha256:hash?repository_url=...&tag=...")); - } -} diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index df7c228b..316dc1cb 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -1,22 +1,22 @@ # In-process REST tests (@QuarkusTest): Mongo Dev Services, seed data, auth off (see RoleMappingAugmentor). # Optional: point REST tests at a running app (RestAssured base URI). Example: -# %test.morpheus.rest-test.external-base-url=http://localhost:8080 -# Or: mvn test -Dmorpheus.rest-test.external-base-url=http://localhost:8080 +# %test.exploit-iq.rest-test.external-base-url=http://localhost:8080 +# Or: mvn test -Dexploit-iq.rest-test.external-base-url=http://localhost:8080 # No OTLP collector in tests — disable default OTLP export (avoids VertxGrpcSender → localhost:4317 warnings). %test.quarkus.otel.exporter.otlp.enabled=false -%test.morpheus.database.init.enabled=true +%test.exploit-iq.database.init.enabled=true %test.NAMESPACE=exploit-iq %test.quarkus.oidc.enabled=false -%test.morpheus.credential-store.encryption-key=dev-test-key-must-be-32bytes-long! +%test.exploit-iq.credential-store.encryption-key=dev-test-key-must-be-32bytes-long! %test.quarkus.quinoa.enabled=false %test.quarkus.mongodb.devservices.image-name=docker.io/mongodb/mongodb-community-server:8.0.3-ubi8 %test.quarkus.wiremock.devservices.reload=true %test.quarkus.wiremock.devservices.files-mapping=src/test/resources/devservices/wiremock # WireMock dev service logs full request/response bodies at INFO; raise level to avoid huge test logs. %test.quarkus.log.category."io.quarkiverse.wiremock.devservice.WireMockServer".level=ERROR -# Morpheus REST client → WireMock (no real agent in @QuarkusTest); stub is mappings/morpheus-generate.json -%test.quarkus.rest-client.morpheus.url=http://localhost:${quarkus.wiremock.devservices.port}/generate +# ExploitIQ REST client → WireMock (no real agent in @QuarkusTest); stub is mappings/exploit-iq-generate.json +%test.quarkus.rest-client.exploit-iq.url=http://localhost:${quarkus.wiremock.devservices.port}/generate # GitHub REST client → WireMock (stub mappings/github.json matches /repos/.../languages like api.github.com) %test.quarkus.rest-client.github.url=http://localhost:${quarkus.wiremock.devservices.port} -# Default timeout for async SPDX processing wait in REST tests. -%test.morpheus.rest-test.spdx-timeout=10m +# Default timeout for async SPDX processing wait in REST tests (test-only config, not part of exploit-iq namespace). +%test.test.rest.spdx-timeout=10m diff --git a/src/test/resources/devservices/reports/test-sbom-report-3-report-2.json b/src/test/resources/devservices/reports/test-sbom-report-3-report-2.json index be2b51ab..5ca4603b 100644 --- a/src/test/resources/devservices/reports/test-sbom-report-3-report-2.json +++ b/src/test/resources/devservices/reports/test-sbom-report-3-report-2.json @@ -2928,8 +2928,8 @@ }, "info": { "vdb": { - "code_vdb_path": "/morpheus-data/vdbs/code/9bd0c29c6857086b", - "doc_vdb_path": "/morpheus-data/vdbs/doc/beed003ae65a070d" + "code_vdb_path": "/exploit-iq-data/vdbs/code/9bd0c29c6857086b", + "doc_vdb_path": "/exploit-iq-data/vdbs/doc/beed003ae65a070d" }, "intel": [ { diff --git a/src/test/resources/devservices/reports/test-sbom-report-5-report-2.json b/src/test/resources/devservices/reports/test-sbom-report-5-report-2.json index 2c1b882a..d4464629 100644 --- a/src/test/resources/devservices/reports/test-sbom-report-5-report-2.json +++ b/src/test/resources/devservices/reports/test-sbom-report-5-report-2.json @@ -2763,8 +2763,8 @@ }, "info": { "vdb": { - "code_vdb_path": "/morpheus-data/vdbs/code/1c72f35adf7fbae9", - "doc_vdb_path": "/morpheus-data/vdbs/doc/b9103c68ee4af680" + "code_vdb_path": "/exploit-iq-data/vdbs/code/1c72f35adf7fbae9", + "doc_vdb_path": "/exploit-iq-data/vdbs/doc/b9103c68ee4af680" }, "intel": [ { diff --git a/src/test/resources/devservices/reports/test-sbom-report-6-report-2.json b/src/test/resources/devservices/reports/test-sbom-report-6-report-2.json index e6d5961e..12495a1e 100644 --- a/src/test/resources/devservices/reports/test-sbom-report-6-report-2.json +++ b/src/test/resources/devservices/reports/test-sbom-report-6-report-2.json @@ -2671,7 +2671,7 @@ "metadata": { "product_id": "product-6", "user": "vbelouso@redhat.com", - "source": "morpheus-parser", + "source": "exploit-iq-parser", "batch_id": "mp-10i7ly", "requested_at": "2025-01-20T14:46:58.335Z", "submitted_at": "2025-01-20T15:46:58.335583Z", diff --git a/src/test/resources/devservices/reports/test-sbom-report-7-report-1.json b/src/test/resources/devservices/reports/test-sbom-report-7-report-1.json index 146b9a1f..5a8d6451 100644 --- a/src/test/resources/devservices/reports/test-sbom-report-7-report-1.json +++ b/src/test/resources/devservices/reports/test-sbom-report-7-report-1.json @@ -5,7 +5,7 @@ "metadata": { "product_id": "product-7", "user": "vbelouso@redhat.com", - "source": "morpheus-parser", + "source": "exploit-iq-parser", "batch_id": "mp-10i7ly", "requested_at": "2025-01-20T14:46:58.335Z", "submitted_at": "2025-01-20T15:46:58.335583Z", @@ -2130,8 +2130,8 @@ }, "info": { "vdb": { - "code_vdb_path": "/morpheus-data/vdbs/code/234dc59bcd709aad", - "doc_vdb_path": "/morpheus-data/vdbs/doc/d12523272b4cfe13" + "code_vdb_path": "/exploit-iq-data/vdbs/code/234dc59bcd709aad", + "doc_vdb_path": "/exploit-iq-data/vdbs/doc/d12523272b4cfe13" }, "intel": [ { diff --git a/src/test/resources/devservices/reports/test-sbom-report-7-report-2.json b/src/test/resources/devservices/reports/test-sbom-report-7-report-2.json index 16820b77..cd19fcc1 100644 --- a/src/test/resources/devservices/reports/test-sbom-report-7-report-2.json +++ b/src/test/resources/devservices/reports/test-sbom-report-7-report-2.json @@ -5,7 +5,7 @@ "metadata": { "product_id": "product-7", "user": "vbelouso@redhat.com", - "source": "morpheus-parser", + "source": "exploit-iq-parser", "batch_id": "mp-10i7ly", "requested_at": "2025-01-20T14:46:58.335Z", "submitted_at": "2025-01-20T15:46:58.335583Z", @@ -2130,8 +2130,8 @@ }, "info": { "vdb": { - "code_vdb_path": "/morpheus-data/vdbs/code/234dc59bcd709aad", - "doc_vdb_path": "/morpheus-data/vdbs/doc/d12523272b4cfe13" + "code_vdb_path": "/exploit-iq-data/vdbs/code/234dc59bcd709aad", + "doc_vdb_path": "/exploit-iq-data/vdbs/doc/d12523272b4cfe13" }, "intel": [ { diff --git a/src/test/resources/devservices/reports/test-sbom-report-8-report-2.json b/src/test/resources/devservices/reports/test-sbom-report-8-report-2.json index 3565fa8a..f43c59a0 100644 --- a/src/test/resources/devservices/reports/test-sbom-report-8-report-2.json +++ b/src/test/resources/devservices/reports/test-sbom-report-8-report-2.json @@ -2900,7 +2900,7 @@ "metadata": { "product_id": "product-8", "user": "vbelouso@redhat.com", - "source": "morpheus-parser", + "source": "exploit-iq-parser", "batch_id": "mp-i3mtoj", "requested_at": "2025-01-20T14:46:58.335Z", "submitted_at": "2025-01-20T15:46:58.335583Z", diff --git a/src/test/resources/devservices/reports/test-sbom-report-9-report-1.json b/src/test/resources/devservices/reports/test-sbom-report-9-report-1.json index c419cada..3e353eb0 100644 --- a/src/test/resources/devservices/reports/test-sbom-report-9-report-1.json +++ b/src/test/resources/devservices/reports/test-sbom-report-9-report-1.json @@ -3043,7 +3043,7 @@ "metadata": { "product_id": "product-9", "user": "vbelouso@redhat.com", - "source": "morpheus-parser", + "source": "exploit-iq-parser", "batch_id": "mp-dnxbrn", "requested_at": "2025-01-20T14:46:58.335Z", "submitted_at": "2025-01-20T15:46:58.335583Z", diff --git a/src/test/resources/devservices/wiremock/mappings/morpheus-generate.json b/src/test/resources/devservices/wiremock/mappings/exploit-iq-generate.json similarity index 100% rename from src/test/resources/devservices/wiremock/mappings/morpheus-generate.json rename to src/test/resources/devservices/wiremock/mappings/exploit-iq-generate.json