We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54f0b29 commit 0fd1875Copy full SHA for 0fd1875
pkg/kics/service.go
@@ -2,6 +2,7 @@ package kics
2
3
import (
4
"context"
5
+ "encoding/json"
6
"io"
7
"io/ioutil"
8
@@ -11,6 +12,7 @@ import (
11
12
"github.com/Checkmarx/kics/pkg/source"
13
"github.com/google/uuid"
14
"github.com/pkg/errors"
15
+ "github.com/rs/zerolog/log"
16
)
17
18
type SourceProvider interface {
@@ -57,6 +59,12 @@ func (s *Service) StartScan(ctx context.Context, scanID string) error {
57
59
}
58
60
61
for _, document := range documents {
62
+ _, err = json.Marshal(document)
63
+ if err != nil {
64
+ log.Err(err).Msgf("failed to marshal document %s", document)
65
+ continue
66
+ }
67
+
68
file := model.FileMetadata{
69
ID: uuid.New().String(),
70
ScanID: scanID,
0 commit comments