@opensoha/contracts 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth/catalog_generated.go +2 -2
- package/auth/catalog_test.go +40 -0
- package/auth/permission-catalog.json +227 -3
- package/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
- package/fixtures/openapi/AISkillsSettingsEnvelope/invalid/missing-registry.json +3 -0
- package/fixtures/openapi/AISkillsSettingsEnvelope/valid/registry.json +13 -0
- package/fixtures/openapi/AlertEventStreamSignal/invalid/missing-observed-at.json +4 -0
- package/fixtures/openapi/AlertEventStreamSignal/valid/changed.json +9 -0
- package/fixtures/openapi/ComputeOverviewEnvelope/valid/partial.json +6 -0
- package/fixtures/openapi/ComputeTaskListEnvelope/invalid/progress-overflow.json +21 -0
- package/fixtures/openapi/ComputeTaskListEnvelope/valid/running.json +15 -0
- package/fixtures/openapi/ComputeTaskStreamEvent/invalid/missing-observed-at.json +3 -0
- package/fixtures/openapi/ComputeTaskStreamEvent/valid/snapshot.json +27 -0
- package/fixtures/openapi/KubernetesResourceGraphEnvelope/invalid/edge-without-target.json +16 -0
- package/fixtures/openapi/KubernetesResourceGraphEnvelope/valid/deployment.json +53 -0
- package/fixtures/openapi/KubernetesResourceSearchEnvelope/invalid/missing-resource.json +10 -0
- package/fixtures/openapi/KubernetesResourceSearchEnvelope/valid/mixed.json +29 -0
- package/fixtures/openapi/KubernetesResourceStreamEvent/invalid/missing-observed-at.json +5 -0
- package/fixtures/openapi/KubernetesResourceStreamEvent/valid/modified.json +18 -0
- package/fixtures/openapi/KubernetesSecurityPostureEnvelope/invalid/finding-without-severity.json +24 -0
- package/fixtures/openapi/KubernetesSecurityPostureEnvelope/valid/kubescape.json +34 -0
- package/fixtures/openapi/KubernetesService/invalid/node-port-out-of-range.json +14 -0
- package/fixtures/openapi/KubernetesService/valid/port-mappings.json +22 -0
- package/fixtures/openapi/KubernetesServiceDetail/invalid/empty-target-port.json +13 -0
- package/fixtures/openapi/KubernetesServiceDetail/valid/port-mappings.json +22 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/invalid/unknown-inheritance.json +9 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/valid/selective-job.json +9 -0
- package/fixtures/openapi/OperationalPlanEnvelope/invalid/kubernetes-owner-without-manager.json +29 -0
- package/fixtures/openapi/OperationalPlanEnvelope/valid/kubernetes-resource-update.json +30 -0
- package/fixtures/openapi/WorkbenchAgentRunListEnvelope/invalid/callback-token.json +17 -0
- package/fixtures/openapi/WorkbenchAgentRunListEnvelope/valid/session-scoped.json +17 -0
- package/fixtures/openapi/WorkbenchSessionEnvelope/invalid/missing-owner.json +8 -0
- package/fixtures/openapi/WorkbenchSessionEnvelope/valid/current.json +17 -0
- package/gen/go/sohaapi/client.go +1 -1
- package/gen/go/sohaapi/types.go +1758 -59
- package/gen/go/sohaapi/types_test.go +43 -2
- package/gen/ts/sohaapi/index.ts +12853 -9909
- package/openapi/soha-api.json +11360 -5927
- package/openapi/soha-api.yaml +11122 -8646
- package/openapi/spec_generated.go +3 -3
- package/package.json +1 -1
- package/resource/models.go +197 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"clusterId": "cluster-a",
|
|
4
|
+
"provider": "kubescape",
|
|
5
|
+
"status": "available",
|
|
6
|
+
"generatedAt": "2026-08-23T08:00:00Z",
|
|
7
|
+
"counts": {
|
|
8
|
+
"critical": 1,
|
|
9
|
+
"high": 2,
|
|
10
|
+
"medium": 3,
|
|
11
|
+
"low": 4,
|
|
12
|
+
"unknown": 0
|
|
13
|
+
},
|
|
14
|
+
"findings": [
|
|
15
|
+
{
|
|
16
|
+
"id": "configuration:C-001:team-a:Deployment:api",
|
|
17
|
+
"category": "configuration",
|
|
18
|
+
"severity": "high",
|
|
19
|
+
"title": "Privileged container",
|
|
20
|
+
"status": "failed",
|
|
21
|
+
"controlId": "C-001",
|
|
22
|
+
"resource": {
|
|
23
|
+
"clusterId": "cluster-a",
|
|
24
|
+
"apiVersion": "apps/v1",
|
|
25
|
+
"kind": "Deployment",
|
|
26
|
+
"name": "api",
|
|
27
|
+
"namespace": "team-a",
|
|
28
|
+
"scopeMode": "namespace"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"warnings": []
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "web",
|
|
3
|
+
"namespace": "default",
|
|
4
|
+
"type": "NodePort",
|
|
5
|
+
"ageSeconds": 0,
|
|
6
|
+
"ports": ["http:80/tcp (nodePort:30001)"],
|
|
7
|
+
"portMappings": [
|
|
8
|
+
{
|
|
9
|
+
"name": "http",
|
|
10
|
+
"protocol": "TCP",
|
|
11
|
+
"targetPort": "8080",
|
|
12
|
+
"port": 80,
|
|
13
|
+
"nodePort": 30001
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "metrics",
|
|
17
|
+
"protocol": "TCP",
|
|
18
|
+
"targetPort": "metrics",
|
|
19
|
+
"port": 9090
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "web",
|
|
3
|
+
"namespace": "default",
|
|
4
|
+
"type": "ClusterIP",
|
|
5
|
+
"clusterIp": "10.43.0.10",
|
|
6
|
+
"ageSeconds": 60,
|
|
7
|
+
"ports": ["http:80/tcp"],
|
|
8
|
+
"portMappings": [
|
|
9
|
+
{
|
|
10
|
+
"name": "http",
|
|
11
|
+
"protocol": "TCP",
|
|
12
|
+
"targetPort": "http",
|
|
13
|
+
"port": 80
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"endpoints": [
|
|
17
|
+
{
|
|
18
|
+
"address": "10.42.0.10",
|
|
19
|
+
"ready": true
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
package/fixtures/openapi/OperationalPlanEnvelope/invalid/kubernetes-owner-without-manager.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"capability": "k8s.resources.update",
|
|
4
|
+
"target": "cluster-a/team-a/Deployment/api",
|
|
5
|
+
"ready": false,
|
|
6
|
+
"riskLevel": "mutate",
|
|
7
|
+
"requiresApproval": false,
|
|
8
|
+
"changes": [
|
|
9
|
+
{
|
|
10
|
+
"action": "apply",
|
|
11
|
+
"resource": "Deployment/api",
|
|
12
|
+
"summary": "apply the reviewed manifest"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"warnings": [],
|
|
16
|
+
"kubernetesResourceUpdate": {
|
|
17
|
+
"fieldManager": "opensoha-resource-edit/v1",
|
|
18
|
+
"changedFields": ["/spec/replicas"],
|
|
19
|
+
"owners": [
|
|
20
|
+
{
|
|
21
|
+
"operation": "Apply",
|
|
22
|
+
"apiVersion": "apps/v1",
|
|
23
|
+
"fields": ["/spec/template"]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"conflicts": []
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"capability": "k8s.resources.update",
|
|
4
|
+
"target": "cluster-a/team-a/Deployment/api",
|
|
5
|
+
"ready": true,
|
|
6
|
+
"riskLevel": "mutate",
|
|
7
|
+
"requiresApproval": false,
|
|
8
|
+
"changes": [
|
|
9
|
+
{
|
|
10
|
+
"action": "apply",
|
|
11
|
+
"resource": "Deployment/api",
|
|
12
|
+
"summary": "apply the reviewed manifest"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"warnings": [],
|
|
16
|
+
"kubernetesResourceUpdate": {
|
|
17
|
+
"fieldManager": "opensoha-resource-edit/v1",
|
|
18
|
+
"changedFields": ["/spec/replicas"],
|
|
19
|
+
"owners": [
|
|
20
|
+
{
|
|
21
|
+
"manager": "helm",
|
|
22
|
+
"operation": "Apply",
|
|
23
|
+
"apiVersion": "apps/v1",
|
|
24
|
+
"fields": ["/spec/template"]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"conflicts": []
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{
|
|
4
|
+
"id": "run-1",
|
|
5
|
+
"providerId": "external-agent",
|
|
6
|
+
"providerKind": "general",
|
|
7
|
+
"capabilityId": "root-cause-analysis",
|
|
8
|
+
"createdBy": "user-1",
|
|
9
|
+
"status": "running",
|
|
10
|
+
"callbackToken": "must-not-cross-the-user-api-boundary",
|
|
11
|
+
"timeoutSeconds": 600,
|
|
12
|
+
"queuedAt": "2026-08-19T08:00:00Z",
|
|
13
|
+
"createdAt": "2026-08-19T08:00:00Z",
|
|
14
|
+
"updatedAt": "2026-08-19T08:01:00Z"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{
|
|
4
|
+
"id": "run-1",
|
|
5
|
+
"providerId": "external-agent",
|
|
6
|
+
"providerKind": "general",
|
|
7
|
+
"capabilityId": "root-cause-analysis",
|
|
8
|
+
"sessionId": "session-1",
|
|
9
|
+
"createdBy": "user-1",
|
|
10
|
+
"status": "running",
|
|
11
|
+
"timeoutSeconds": 600,
|
|
12
|
+
"queuedAt": "2026-08-19T08:00:00Z",
|
|
13
|
+
"createdAt": "2026-08-19T08:00:00Z",
|
|
14
|
+
"updatedAt": "2026-08-19T08:01:00Z"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"id": "session-1",
|
|
4
|
+
"title": "Investigate checkout latency",
|
|
5
|
+
"createdBy": "user-1",
|
|
6
|
+
"metadata": {
|
|
7
|
+
"mode": "root_cause",
|
|
8
|
+
"status": "active",
|
|
9
|
+
"scope": {
|
|
10
|
+
"clusterId": "prod",
|
|
11
|
+
"namespace": "checkout"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"createdAt": "2026-08-19T08:00:00Z",
|
|
15
|
+
"updatedAt": "2026-08-19T08:01:00Z"
|
|
16
|
+
}
|
|
17
|
+
}
|