Skip to content

Commit dd9817c

Browse files
committed
Merge branch 'master' of https://github.com/Checkmarx/kics
2 parents 6dacd3d + 0fd1875 commit dd9817c

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ jobs:
4141
password: ${{ secrets.DOCKER_PASSWORD }}
4242
repository: checkmarx/kics
4343
tag_with_ref: true
44+
tags: latest

docs/getting-started.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,34 @@ This section describes the installation steps for getting KICS up and running.
1919
go run ./cmd/console/main.go -p <path-of-your-project-to-scan> -o <output-results.json>
2020
```
2121

22-
<!--
22+
2323
#### Release
2424

25+
KICS release process is pretty straightforward.
26+
When we're releasing a new version, we'll pack KICS executables for both Linux and Windows operating systems.
27+
Our security queries will be included in the ZIP files and tarballs, so that you can scan your IaC code with the out-of-the-box queries
28+
29+
So all you need is:
30+
31+
1. Go to KICS [releases](https://github.com/Checkmarx/kics/releases)
32+
2. Click on latest release
33+
3. Download KICS binaries based on your OS
34+
4. Extract files
35+
5. Run kics executable with the cli options as decribed below
36+
2537
```
26-
TBD
38+
kics.exe -p <path-of-your-project-to-scan> -o <output-results.json>
39+
2740
```
2841

2942
#### Docker
3043

31-
KICS is also available as a Docker image and can be used as follows
44+
KICS is also available as a [Docker image](https://hub.docker.com/r/checkmarx/kics) and can be used as follows:
45+
3246
```
33-
TBD
47+
docker pull checkmarx/kics:latest
48+
docker run -v {​​​​path_to_local_folder_to_scan}​​​​:/path checkmarx/kics:latest -p "/path" -o "/path/results.json"
3449
```
35-
-->
3650

3751
## CLI Options
3852

pkg/kics/service.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package kics
22

33
import (
44
"context"
5+
"encoding/json"
56
"io"
67
"io/ioutil"
78

@@ -11,6 +12,7 @@ import (
1112
"github.com/Checkmarx/kics/pkg/source"
1213
"github.com/google/uuid"
1314
"github.com/pkg/errors"
15+
"github.com/rs/zerolog/log"
1416
)
1517

1618
type SourceProvider interface {
@@ -57,6 +59,12 @@ func (s *Service) StartScan(ctx context.Context, scanID string) error {
5759
}
5860

5961
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+
6068
file := model.FileMetadata{
6169
ID: uuid.New().String(),
6270
ScanID: scanID,

0 commit comments

Comments
 (0)