Skip to content

Commit 211edb3

Browse files
committed
feat!: drop onguard integration in favour of tpa
Signed-off-by: Ruben Romero Montes <[email protected]>
1 parent 313c975 commit 211edb3

33 files changed

+9068
-17408
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
## Required parameters
1313

1414
- `api.tpa.host` The host of the Trusted Profile Analyzer service. Used as a Vulnerability Provider.
15-
- `api.onguard.host` The host where the [ONGuard](https://github.com/trustification/onguard) service is deployed
15+
- `api.tpa.token` The TPA token for default authentication to use when the `ex-tpa-token` header is not provided
1616
- `api.snyk.token` Snyk API token for default authentication when the Snyk integration is enabled
1717

1818
## OpenAPI and SwaggerUI
@@ -25,7 +25,6 @@
2525
Currently these are the available providers that will provide a vulnerability report for your components or full dependency graph.
2626

2727
- TPA ([`Trusted Profile Analyzer`](https://www.trustification.io/))
28-
- OSV ([ONGuard](https://github.com/trustification/onguard))
2928
- Snyk (`snyk`)
3029
- OSS Index (`oss-index`)
3130

@@ -37,7 +36,7 @@ Providers should be defined as a multi-valued list in the `providers` Query Para
3736

3837
The supported Package URL types depends on each external provider.
3938

40-
- TPA, OSV and OSS Index don't have any limitation on the type used.
39+
- TPA and OSS Index don't have any limitation on the type used.
4140
- Snyk: Given the limitations of the API endpoint currently being used only supports the following PackageURL types:
4241
- Maven (`maven`)
4342
- Gradle (`gradle`)

dashboards/grafana-dashboard-exhort.configmap.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ data:
10211021
"uid": "${datasource}"
10221022
},
10231023
"editorMode": "code",
1024-
"expr": "histogram_quantile(0.90, sum by (le) (rate(camel_route_policy_seconds_bucket{routeId=\"osvRequest\"}[2m])))",
1024+
"expr": "histogram_quantile(0.90, sum by (le) (rate(camel_route_policy_seconds_bucket{routeId=\"tpaRequest\"}[2m])))",
10251025
"legendFormat": "0.90",
10261026
"range": true,
10271027
"refId": "A"
@@ -1032,7 +1032,7 @@ data:
10321032
"uid": "${datasource}"
10331033
},
10341034
"editorMode": "code",
1035-
"expr": "histogram_quantile(0.95, sum by (le) (rate(camel_route_policy_seconds_bucket{routeId=\"osvRequest\"}[2m])))",
1035+
"expr": "histogram_quantile(0.95, sum by (le) (rate(camel_route_policy_seconds_bucket{routeId=\"tpaRequest\"}[2m])))",
10361036
"hide": false,
10371037
"legendFormat": "0.95",
10381038
"range": true,
@@ -1044,14 +1044,14 @@ data:
10441044
"uid": "${datasource}"
10451045
},
10461046
"editorMode": "code",
1047-
"expr": "histogram_quantile(0.99, sum by (le) (rate(camel_route_policy_seconds_bucket{routeId=\"osvRequest\"}[2m])))",
1047+
"expr": "histogram_quantile(0.99, sum by (le) (rate(camel_route_policy_seconds_bucket{routeId=\"tpaRequest\"}[2m])))",
10481048
"hide": false,
10491049
"legendFormat": "0.99",
10501050
"range": true,
10511051
"refId": "C"
10521052
}
10531053
],
1054-
"title": "ONGuard latency",
1054+
"title": "TPA latency",
10551055
"type": "timeseries"
10561056
},
10571057
{

src/main/java/com/redhat/exhort/config/metrics/CustomMetrics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class CustomMetrics {
4242
"snykValidateToken",
4343
"snykRequest",
4444
"getTrustedContent",
45-
"osvRequest",
45+
"tpaRequest",
4646
"ossValidateCredentials",
4747
"ossSplitReq",
4848
"ossIndexRequest",

src/main/java/com/redhat/exhort/integration/Constants.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ private Constants() {}
6262
public static final String SNYK_PROVIDER = "snyk";
6363
public static final String OSS_INDEX_PROVIDER = "oss-index";
6464
public static final String TRUSTED_CONTENT_PROVIDER = "trusted-content";
65-
public static final String OSV_PROVIDER = "osv";
6665
public static final String TPA_PROVIDER = "tpa";
6766
public static final String UNKNOWN_PROVIDER = "unknown";
6867

@@ -101,8 +100,6 @@ private Constants() {}
101100

102101
public static final String OSS_INDEX_AUTH_COMPONENT_API_PATH = "/authorized/component-report";
103102
public static final String OSS_INDEX_VERSION_PATH = "/version";
104-
public static final String OSV_NVD_PURLS_PATH = "/purls";
105-
public static final String OSV_NVD_HEALTH_PATH = "/q/health";
106103

107104
public static final String TRUSTED_CONTENT_PATH = "/recommend";
108105
public static final String TPA_ANALYZE_PATH = "/vulnerability/analyze";
@@ -124,7 +121,6 @@ private Constants() {}
124121
{
125122
add(SNYK_PROVIDER);
126123
add(OSS_INDEX_PROVIDER);
127-
add(OSV_PROVIDER);
128124
add(TPA_PROVIDER);
129125
}
130126
});

src/main/java/com/redhat/exhort/integration/providers/ProviderHealthCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
public class ProviderHealthCheck extends AbstractHealthCheck {
3131

3232
private static final List<String> ALL_PROVIDERS_HEALTH_CHECKS =
33-
List.of("direct:snykHealthCheck", "direct:osvHealthCheck", "direct:ossIndexHealthCheck");
33+
List.of("direct:snykHealthCheck", "direct:tpaHealthCheck", "direct:ossIndexHealthCheck");
3434

3535
public ProviderHealthCheck() {
3636
super("External Providers Readiness Check");

src/main/java/com/redhat/exhort/integration/providers/VulnerabilityProvider.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ public class VulnerabilityProvider {
5151
@ConfigProperty(name = "api.ossindex.disabled", defaultValue = "true")
5252
boolean ossIndexDisabled;
5353

54-
@ConfigProperty(name = "api.onguard.disabled", defaultValue = "false")
55-
boolean osvDisabled;
56-
57-
@ConfigProperty(name = "api.tpa.disabled", defaultValue = "true")
54+
@ConfigProperty(name = "api.tpa.disabled", defaultValue = "false")
5855
boolean tpaDisabled;
5956

6057
private List<String> providers;
@@ -66,7 +63,6 @@ public void initProviders() {
6663
Constants.PROVIDERS.stream()
6764
.filter(p -> !(Constants.SNYK_PROVIDER.equals(p) && snykDisabled))
6865
.filter(p -> !(Constants.OSS_INDEX_PROVIDER.equals(p) && ossIndexDisabled))
69-
.filter(p -> !(Constants.OSV_PROVIDER.equals(p) && osvDisabled))
7066
.filter(p -> !(Constants.TPA_PROVIDER.equals(p) && tpaDisabled))
7167
.toList());
7268
}
@@ -83,7 +79,6 @@ public List<String> getProviderEndpoints(
8379
switch (p) {
8480
case Constants.SNYK_PROVIDER -> "direct:snykScan";
8581
case Constants.OSS_INDEX_PROVIDER -> "direct:ossIndexScan";
86-
case Constants.OSV_PROVIDER -> "direct:osvScan";
8782
case Constants.TPA_PROVIDER -> "direct:tpaScan";
8883
default -> throw new UnexpectedProviderException(new RuntimeException(p));
8984
})

src/main/java/com/redhat/exhort/integration/providers/osv/OsvIntegration.java

Lines changed: 0 additions & 112 deletions
This file was deleted.

src/main/java/com/redhat/exhort/integration/providers/osv/OsvRequestBuilder.java

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)