File name of some workload summaries too long
- Dominant language
- Go
- Stars
- 4
- Forks
- 22
- Avg merge
- 20h 43m
- Merged PRs (30d)
- 33
Description
I am running Kubescape v4.0.13 via the Helm Chart, and Storage v0.0.333. I see the following logs in the `kubescape-*` pod after a scan:
```txt
{"level":"warn","ts":"","msg":"failed to store WorkloadConfigurationScanSummary manifest in storage","error":"open payload file: open /data/spdx.softwarecomposition.kubescape.io/workloadconfigurationscansummaries/kubescape/ser
viceaccount-kube-apiserver-serving-clustertrustbundle-publisher-clusterrole-system-controller-kube-apiserver-serving-clustertrustbundle-publisher-clusterrolebinding-system-controller-kube-apiserver-serving-clustertrustbundle-publisher.g.t.1788802
270245700726.70: file name too long","name":"serviceaccount-kube-apiserver-serving-clustertrustbundle-publisher-clusterrole-system-controller-kube-apiserver-serving-clustertrustbundle-publisher-clusterrolebinding-system-controller-kube-apiserver-
serving-clustertrustbundle-publisher"}
{"level":"error","ts":"","msg":"failed to persist scan results to storage","scanID":"41e0dd40-7a25-4e09-bce4-c7f4a902d633","error":"open payload file: open /data/spdx.softwarecomposition.kubescape.io/workloadconfigurationscans
ummaries/kubescape/serviceaccount-kube-apiserver-serving-clustertrustbundle-publisher-clusterrole-system-controller-kube-apiserver-serving-clustertrustbundle-publisher-clusterrolebinding-system-controller-kube-apiserver-serving-clustertrustbundle
-publisher.g.t.1788802270245700726.70: file name too long"}
```
This seems like an issue, where generated workload file names might exceed the OS limits.
Contributor guide
Research direction
Start by locating the code that generates and persists WorkloadConfigurationScanSummary filenames, using the logged object name and storage path as entry points. Reproduce the scan with the long workload name shown in the report; done means the summary is stored successfully without exceeding the operating system's filename limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100