-
-
Notifications
You must be signed in to change notification settings - Fork 35
Issue 2049 : Improve component search performance with JDBI #1867
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: main
Are you sure you want to change the base?
Changes from 18 commits
d302664
7c2af99
4462d12
ebb0f55
237fa56
512f7cd
be35f8b
ea6ef71
892234b
5e09d4f
7471c9f
6debb6e
6bfda9c
766238a
7489c27
4d08596
dd2f31f
647532a
5d5a56a
4103326
2d5c9d9
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,27 @@ | ||
| # This file is part of Dependency-Track. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Copyright (c) OWASP Foundation. All Rights Reserved. | ||
| type: object | ||
| properties: | ||
| name: | ||
| type: string | ||
| maxLength: 255 | ||
| version: | ||
| type: string | ||
| maxLength: 255 | ||
| uuid: | ||
| type: string | ||
| format: uuid |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # This file is part of Dependency-Track. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Copyright (c) OWASP Foundation. All Rights Reserved. | ||
| type: object | ||
| properties: | ||
| critical: | ||
| type: integer | ||
| format: int32 | ||
| high: | ||
| type: integer | ||
| format: int32 | ||
| medium: | ||
| type: integer | ||
| format: int32 | ||
| low: | ||
| type: integer | ||
| format: int32 | ||
| unassigned: | ||
| type: integer | ||
| format: int32 | ||
| vulnerabilities: | ||
| type: integer | ||
| format: int32 | ||
| suppressed: | ||
| type: integer | ||
| format: int32 | ||
| inherited_risk_score: | ||
| type: number | ||
| format: double | ||
| findings_total: | ||
| type: integer | ||
| format: int32 | ||
| findings_audited: | ||
| type: integer | ||
| format: int32 | ||
| findings_unaudited: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_fail: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_warn: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_info: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_total: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_audited: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_unaudited: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_security_total: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_security_audited: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_security_unaudited: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_license_total: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_license_audited: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_license_unaudited: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_operational_total: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_operational_audited: | ||
| type: integer | ||
| format: int32 | ||
| policy_violations_operational_unaudited: | ||
| type: integer | ||
| format: int32 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # This file is part of Dependency-Track. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Copyright (c) OWASP Foundation. All Rights Reserved. | ||
| type: object | ||
| properties: | ||
| name: | ||
| type: string | ||
| maxLength: 255 | ||
| version: | ||
| type: string | ||
| maxLength: 255 | ||
| group: | ||
| type: string | ||
| maxLength: 255 | ||
| classifier: | ||
| type: string | ||
| maxLength: 255 | ||
| hashes: | ||
| $ref: "./hashes.yaml" | ||
| cpe: | ||
| type: string | ||
| maxLength: 255 | ||
| purl: | ||
| type: string | ||
| maxLength: 1024 | ||
| swid_tag_id: | ||
| type: string | ||
| maxLength: 255 | ||
| internal: | ||
| type: boolean | ||
| copyright: | ||
| type: string | ||
| maxLength: 255 | ||
| license: | ||
| type: string | ||
| maxLength: 255 | ||
| license_expression: | ||
| type: string | ||
| maxLength: 255 | ||
| license_url: | ||
| type: string | ||
| maxLength: 255 | ||
| resolved_license: | ||
| $ref: "./license.yaml" | ||
| occurrence_count: | ||
| type: integer | ||
| format: int64 | ||
| minimum: 0 | ||
| last_inherited_risk_score: | ||
| type: number | ||
| format: double | ||
| uuid: | ||
| type: string | ||
| format: uuid |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # This file is part of Dependency-Track. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Copyright (c) OWASP Foundation. All Rights Reserved. | ||
| type: object | ||
| allOf: | ||
| - $ref: "./paginated-response.yaml" | ||
| properties: | ||
| items: | ||
| type: array | ||
| items: | ||
| $ref: "./list-project-components-response-item.yaml" | ||
| required: | ||
| - items |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -43,5 +43,114 @@ post: | |||||
| $ref: "../components/responses/generic-forbidden-error.yaml" | ||||||
| "409": | ||||||
| $ref: "../components/responses/generic-conflict-error.yaml" | ||||||
| default: | ||||||
| $ref: "../components/responses/generic-error.yaml" | ||||||
|
|
||||||
| get: | ||||||
| operationId: listComponents | ||||||
| summary: List all components | ||||||
| description: |- | ||||||
| Retrieves a list of all components that have the specified component identity. This resource accepts coordinates (group, name, version) or purl, cpe, or swidTagId. | ||||||
|
||||||
| Retrieves a list of all components that have the specified component identity. This resource accepts coordinates (group, name, version) or purl, cpe, or swidTagId. | |
| Retrieves a list of all components that have the specified component identity. This resource accepts coordinates (group, name, version), `purl`, `cpe`, `swidTagId`, `project_uuid`, or a combination of `hash_type` and `hash`. |
Copilot
AI
Apr 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The operation description says it retrieves components with the “specified component identity”, but the endpoint (and tests) allow calling /api/v2/components with no identity-related query params at all (listing all accessible components). Please either (a) update the description to reflect that all filters are optional and omitting them lists all components, or (b) enforce that at least one identity filter must be provided.
Uh oh!
There was an error while loading. Please reload this page.