Skip to content

Commit

Permalink
update inner pkg
Browse files Browse the repository at this point in the history
Signed-off-by: rcohen <rcohen@armosec.io>
  • Loading branch information
rcohen committed Mar 30, 2023
1 parent d9d477c commit ce57a26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/armosec/utils-k8s-go v0.0.13
github.com/kubescape/go-logger v0.0.11
github.com/kubescape/k8s-interface v0.0.119
github.com/kubescape/k8s-interface v0.0.120
github.com/kubescape/storage v0.2.0
k8s.io/api v0.26.2
k8s.io/apimachinery v0.26.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kubescape/go-logger v0.0.11 h1:oucpq2S7+DT7O+UclG5IrmHado/tj6+IkYf9czVk/aY=
github.com/kubescape/go-logger v0.0.11/go.mod h1:yGiKBJ2lhq/kxzY/MVYDREL9fLV3RGD6gv+UFjslaew=
github.com/kubescape/k8s-interface v0.0.119 h1:dw/i/InmpaU2QaLHeb2V4ZcVg+EHBznleKbFFYpe9wg=
github.com/kubescape/k8s-interface v0.0.119/go.mod h1:ENpA9SkkS6E3PIT+AaMu/JGkuyE04aUamY+a7WLqsJQ=
github.com/kubescape/k8s-interface v0.0.120 h1:05ZFcKH364gS8CGdQpQNiJglKzAc8EdnvhOK0v4/PnA=
github.com/kubescape/k8s-interface v0.0.120/go.mod h1:ENpA9SkkS6E3PIT+AaMu/JGkuyE04aUamY+a7WLqsJQ=
github.com/kubescape/storage v0.2.0 h1:WZXy4Dyjf5ltEMtk0SOD9RFL1haS9ffFPGfs1gUV1aM=
github.com/kubescape/storage v0.2.0/go.mod h1:sPE749pFNoxoskBn6JTpNQyguF2rv/u2kYqzRd3MvXw=
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
Expand Down
10 changes: 5 additions & 5 deletions pkg/sbom/v1/sbom_spdx_storage_format.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ func (sbom *SBOMData) storeLabels(wlidData string, imageID string, instanceID in
if labels[i] == "" {
delete(labels, i)
} else {
if i == instanceidhandlerV1.LabelFormatKeyKind {
if i == instanceidhandlerV1.KindMetadataKey {
labels[i] = wlid.GetKindFromWlid(wlidData)
} else if i == instanceidhandlerV1.LabelFormatKeyName {
} else if i == instanceidhandlerV1.NameMetadataKey {
labels[i] = wlid.GetNameFromWlid(wlidData)
}
errs := validation.IsValidLabelValue(labels[i])
Expand All @@ -159,9 +159,9 @@ func (sbom *SBOMData) storeLabels(wlidData string, imageID string, instanceID in

func (sbom *SBOMData) storeAnnotations(wlidData string, imageID string, instanceID instanceidhandler.IInstanceID) {
annotations := make(map[string]string)
annotations[instanceidhandlerV1.WlidAnnotationKey] = wlidData
annotations[instanceidhandlerV1.InstanceIDAnnotationKey] = instanceID.GetStringFormatted()
annotations[instanceidhandlerV1.LabelFormatKeyContainerName] = instanceID.GetContainerName()
annotations[instanceidhandlerV1.WlidMetadataKey] = wlidData
annotations[instanceidhandlerV1.InstanceIDMetadataKey] = instanceID.GetStringFormatted()
annotations[instanceidhandlerV1.ContainerNameMetadataKey] = instanceID.GetContainerName()

sbom.filteredSpdxData.ObjectMeta.SetAnnotations(annotations)
}
Expand Down

0 comments on commit ce57a26

Please sign in to comment.