-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add configurable values for exploit intelligence integration #1112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/3.y.z
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| {{/* | ||
| Exploit Intelligence configuration env-vars. | ||
|
|
||
| Arguments (dict): | ||
| * root - . | ||
| */}} | ||
| {{- define "trustification.exploit-intelligence.envVars" }} | ||
|
|
||
| {{- if .root.Values.exploitIntelligence.enabled }} | ||
|
|
||
| {{- $ei := .root.Values.exploitIntelligence }} | ||
|
|
||
| - name: EXPLOIT_INTELLIGENCE_URL | ||
| {{- include "trustification.common.requiredEnvVarValue" (dict "value" $ei.url "msg" "exploitIntelligence.url is required when exploitIntelligence.enabled is true") | nindent 2 }} | ||
|
|
||
| {{- with $ei.uiUrl }} | ||
| - name: EXPLOIT_INTELLIGENCE_UI_URL | ||
| {{- include "trustification.common.envVarValue" . | nindent 2 }} | ||
| {{- end }} | ||
|
|
||
| {{- with $ei.maxRetries }} | ||
| - name: EXPLOIT_INTELLIGENCE_MAX_RETRIES | ||
| value: {{ . | quote }} | ||
| {{- end }} | ||
|
|
||
| {{- with $ei.workerPollInterval }} | ||
| - name: EXPLOIT_INTELLIGENCE_WORKER_POLL_INTERVAL | ||
| value: {{ . | quote }} | ||
| {{- end }} | ||
|
|
||
| {{- with $ei.concurrency }} | ||
| - name: EXPLOIT_INTELLIGENCE_CONCURRENCY | ||
| value: {{ . | quote }} | ||
| {{- end }} | ||
|
|
||
| {{- with $ei.oidc }} | ||
|
|
||
| {{- with .clientId }} | ||
| - name: EXPLOIT_INTELLIGENCE_OIDC_CLIENT_ID | ||
| {{- include "trustification.common.envVarValue" . | nindent 2 }} | ||
| {{- end }} | ||
|
|
||
| {{- with .clientSecret }} | ||
| - name: EXPLOIT_INTELLIGENCE_OIDC_CLIENT_SECRET | ||
| {{- include "trustification.common.envVarValue" . | nindent 2 }} | ||
| {{- end }} | ||
|
|
||
| {{- with .issuerUrl }} | ||
| - name: EXPLOIT_INTELLIGENCE_OIDC_ISSUER_URL | ||
| {{- include "trustification.common.envVarValue" . | nindent 2 }} | ||
| {{- end }} | ||
|
|
||
| {{- with .refreshBefore }} | ||
| - name: EXPLOIT_INTELLIGENCE_OIDC_REFRESH_BEFORE | ||
| value: {{ . | quote }} | ||
| {{- end }} | ||
|
|
||
| {{- if .tlsInsecure }} | ||
| - name: EXPLOIT_INTELLIGENCE_OIDC_TLS_INSECURE | ||
| value: "true" | ||
| {{- end }} | ||
|
|
||
| {{- end }}{{/* with $ei.oidc */}} | ||
|
|
||
| {{- end }}{{/* if enabled */}} | ||
|
|
||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,9 @@ | |
| "oidc": { | ||
| "$ref": "#/definitions/Oidc" | ||
| }, | ||
| "exploitIntelligence": { | ||
| "$ref": "#/definitions/ExploitIntelligence" | ||
| }, | ||
| "readOnly": { | ||
| "type": "boolean", | ||
| "default": false, | ||
|
|
@@ -253,7 +256,7 @@ | |
| }, | ||
| "cacheTTL": { | ||
| "type": "string", | ||
| "description": "the time a cache is allowed to live (in s) before forcing a reload.\n" | ||
| "description": "Enable read-only mode. When true, the server rejects all mutating API\nrequests with 503 and the importer suspends all import jobs.\nthe time a cache is allowed to live (in s) before forcing a reload.\n" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated change but it seems like this file wasnt regenerated after changes were made to this field elsewhere |
||
| } | ||
| } | ||
| } | ||
|
|
@@ -453,6 +456,31 @@ | |
| } | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "if": { | ||
| "properties": { | ||
| "exploitIntelligence": { | ||
| "properties": { | ||
| "enabled": { | ||
| "const": true | ||
| } | ||
| }, | ||
| "required": [ | ||
| "enabled" | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "then": { | ||
| "properties": { | ||
| "exploitIntelligence": { | ||
| "required": [ | ||
| "url" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "definitions": { | ||
|
|
@@ -1158,6 +1186,85 @@ | |
| "description": "The number of HTTP workers of the Actix application.\n\nAlso see: <https://actix.rs/docs/server/#multi-threading>\n" | ||
| } | ||
| } | ||
| }, | ||
| "ExploitIntelligence": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "description": "Configuration for the Exploit Intelligence integration. When enabled, trustify can submit\nSBOMs and CVEs to an external EI client service (agent-morpheus-client) for automated\nvulnerability analysis and VEX document generation.\n", | ||
| "properties": { | ||
| "enabled": { | ||
| "type": "boolean", | ||
| "description": "Enable the Exploit Intelligence integration.\n", | ||
| "default": false | ||
| }, | ||
| "url": { | ||
| "$ref": "#/definitions/ValueOrRef", | ||
| "description": "Base URL of the EI client service (agent-morpheus-client).\n" | ||
| }, | ||
| "uiUrl": { | ||
| "$ref": "#/definitions/ValueOrRef", | ||
| "description": "Base URL of the EI web UI for deep-linking to reports. Fallsback to base URL of the EI client service if unset.\n" | ||
| }, | ||
| "maxRetries": { | ||
| "type": "integer", | ||
| "minimum": 0, | ||
| "description": "Maximum number of retry attempts before a job is marked as failed.\n" | ||
| }, | ||
| "workerPollInterval": { | ||
| "type": "string", | ||
| "description": "How often the background worker checks for new EI jobs (humantime, e.g. \"5s\").\n" | ||
| }, | ||
| "concurrency": { | ||
| "type": "integer", | ||
| "minimum": 1, | ||
| "description": "Number of concurrent worker loops processing EI jobs.\n" | ||
| }, | ||
| "oidc": { | ||
| "$ref": "#/definitions/ExploitIntelligenceOidc" | ||
| } | ||
| } | ||
| }, | ||
| "ExploitIntelligenceOidc": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "description": "OIDC credentials for authenticating with the EI service using client credentials flow.\nAll three of clientId, clientSecret, and issuerUrl must be set together.\n", | ||
| "dependencies": { | ||
| "clientId": [ | ||
| "clientSecret", | ||
| "issuerUrl" | ||
| ], | ||
| "clientSecret": [ | ||
| "clientId", | ||
| "issuerUrl" | ||
| ], | ||
| "issuerUrl": [ | ||
| "clientId", | ||
| "clientSecret" | ||
| ] | ||
| }, | ||
| "properties": { | ||
| "clientId": { | ||
| "$ref": "#/definitions/ValueOrRef", | ||
| "description": "OIDC client ID for EI service authentication.\n" | ||
| }, | ||
| "clientSecret": { | ||
| "$ref": "#/definitions/ValueOrRef", | ||
| "description": "OIDC client secret for EI service authentication.\n" | ||
| }, | ||
| "issuerUrl": { | ||
| "$ref": "#/definitions/ValueOrRef", | ||
| "description": "OIDC issuer URL for EI service authentication (client credentials flow with discovery).\n" | ||
| }, | ||
| "refreshBefore": { | ||
| "type": "string", | ||
| "description": "Duration an access token must still be valid before requesting a new one (humantime).\n" | ||
| }, | ||
| "tlsInsecure": { | ||
| "type": "boolean", | ||
| "default": false, | ||
| "description": "Allow insecure TLS connections with the EI OIDC issuer.\n" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,6 +67,9 @@ properties: | |
| oidc: | ||
| $ref: "#/definitions/Oidc" | ||
|
|
||
| exploitIntelligence: | ||
| $ref: "#/definitions/ExploitIntelligence" | ||
|
|
||
| readOnly: | ||
| type: boolean | ||
| default: false | ||
|
|
@@ -349,6 +352,19 @@ allOf: | |
| collector: | ||
| required: | ||
| - endpoint | ||
| - if: | ||
| properties: | ||
| exploitIntelligence: | ||
| properties: | ||
| enabled: | ||
| const: true | ||
| required: | ||
| - enabled | ||
| then: | ||
| properties: | ||
| exploitIntelligence: | ||
| required: | ||
| - url | ||
|
|
||
| # all the definitions | ||
|
|
||
|
|
@@ -910,3 +926,75 @@ definitions: | |
| The number of HTTP workers of the Actix application. | ||
|
|
||
| Also see: <https://actix.rs/docs/server/#multi-threading> | ||
|
|
||
| ExploitIntelligence: | ||
| type: object | ||
| additionalProperties: false | ||
| description: | | ||
| Configuration for the Exploit Intelligence integration. When enabled, trustify can submit | ||
| SBOMs and CVEs to an external EI client service (agent-morpheus-client) for automated | ||
| vulnerability analysis and VEX document generation. | ||
| properties: | ||
| enabled: | ||
| type: boolean | ||
| description: | | ||
| Enable the Exploit Intelligence integration. | ||
| default: false | ||
| url: | ||
| $ref: "#/definitions/ValueOrRef" | ||
| description: | | ||
| Base URL of the EI client service (agent-morpheus-client). | ||
| uiUrl: | ||
| $ref: "#/definitions/ValueOrRef" | ||
| description: | | ||
| Base URL of the EI web UI for deep-linking to reports. Fallsback to base URL of the EI client service if unset. | ||
| maxRetries: | ||
| type: integer | ||
| minimum: 0 | ||
| description: | | ||
| Maximum number of retry attempts before a job is marked as failed. | ||
| workerPollInterval: | ||
| type: string | ||
| description: | | ||
| How often the background worker checks for new EI jobs (humantime, e.g. "5s"). | ||
| concurrency: | ||
| type: integer | ||
| minimum: 1 | ||
| description: | | ||
| Number of concurrent worker loops processing EI jobs. | ||
| oidc: | ||
| $ref: "#/definitions/ExploitIntelligenceOidc" | ||
|
|
||
| ExploitIntelligenceOidc: | ||
| type: object | ||
| additionalProperties: false | ||
| description: | | ||
| OIDC credentials for authenticating with the EI service using client credentials flow. | ||
| All three of clientId, clientSecret, and issuerUrl must be set together. | ||
| dependencies: | ||
| clientId: [ "clientSecret", "issuerUrl" ] | ||
| clientSecret: [ "clientId", "issuerUrl" ] | ||
| issuerUrl: [ "clientId", "clientSecret" ] | ||
| properties: | ||
| clientId: | ||
| $ref: "#/definitions/ValueOrRef" | ||
| description: | | ||
|
Comment on lines
+968
to
+981
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (bug_risk): The OIDC description requires clientId/clientSecret/issuerUrl together, but the schema doesn’t enforce this relationship. The schema currently allows any subset of |
||
| OIDC client ID for EI service authentication. | ||
| clientSecret: | ||
| $ref: "#/definitions/ValueOrRef" | ||
| description: | | ||
| OIDC client secret for EI service authentication. | ||
| issuerUrl: | ||
| $ref: "#/definitions/ValueOrRef" | ||
| description: | | ||
| OIDC issuer URL for EI service authentication (client credentials flow with discovery). | ||
| refreshBefore: | ||
| type: string | ||
| description: | | ||
| Duration an access token must still be valid before requesting a new one (humantime). | ||
| tlsInsecure: | ||
| type: boolean | ||
| default: false | ||
| description: | | ||
| Allow insecure TLS connections with the EI OIDC issuer. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,9 @@ tracing: | |
|
|
||
| collector: {} | ||
|
|
||
| exploitIntelligence: | ||
| enabled: false | ||
|
|
||
| modules: | ||
| server: | ||
| enabled: true | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.