fix gosec

This commit is contained in:
0xmuralik 2022-11-03 13:06:46 +05:30
parent b57b2b8ede
commit a1f03a59bd

View File

@ -296,6 +296,7 @@ func (k Keeper) ProcessAttributes(ctx sdk.Context, record types.RecordType) erro
switch record.Attributes["type"] { switch record.Attributes["type"] {
case "ServiceProviderRegistration": case "ServiceProviderRegistration":
{ {
// #nosec G705
for key := range record.Attributes { for key := range record.Attributes {
if key == "x500" { if key == "x500" {
// #nosec G705 // #nosec G705
@ -315,6 +316,7 @@ func (k Keeper) ProcessAttributes(ctx sdk.Context, record types.RecordType) erro
} }
case "WebsiteRegistrationRecord": case "WebsiteRegistrationRecord":
{ {
// #nosec G705
for key := range record.Attributes { for key := range record.Attributes {
indexKey := GetAttributesIndexKey(key, record.Attributes[key]) indexKey := GetAttributesIndexKey(key, record.Attributes[key])
if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil { if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil {