Commit Graph
79 Commits
Author SHA1 Message Date
Daniel Grunberger e829af7205 changes 2023-07-31 21:15:23 +03:00
Daniel Grunberger dd8f624f0c changes 2023-07-31 09:46:38 +03:00
Daniel Grunberger e794ab8b45 changes 2023-07-30 22:20:04 +03:00
Daniel Grunberger e57d65541c integrate img scan 2023-07-26 08:55:31 +03:00
Daniel Grunberger 6679ac54ea Merge branch 'feat-image-scan-svc' into new-output 2023-07-25 17:01:43 +03:00
Daniel Grunberger dd3b5bf5cf Merge branch 'feat-image-scan-svc' of github.com:kubescape/kubescape into feat-image-scan-svc 2023-07-25 17:00:12 +03:00
Daniel Grunberger 811914a0ff more 2023-07-25 16:55:01 +03:00
Daniel Grunberger 6341947142 merge 2023-07-25 16:54:44 +03:00
Vlad Klokun e67fcae4aa feat(imagescan): add an image scanning command
This commit adds a CLI command and an associated package that scan
images for vulnerabilities.

Signed-off-by: Vlad Klokun <vklokun@protonmail.ch>

feat(imagescan): fail on exceeding the severity threshold

Signed-off-by: Vlad Klokun <vklokun@protonmail.ch>
2023-07-25 11:46:50 +03:00
Daniel Grunberger 5c6e66d9b7 Merge branch 'scan-workload' of github.com:amirmalka/kubescape into new-output 2023-07-25 11:10:10 +03:00
Amir Malka 557c063f69 support single workload scan
Signed-off-by: Amir Malka <amirm@armosec.io>
2023-07-20 20:20:14 +03:00
Daniel Grunberger ab634debe4 add cmd
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
2023-07-17 15:28:41 +03:00
Daniel Grunberger ad0103c50a continue
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
2023-07-17 14:19:23 +03:00
Daniel Grunberger 46e1cea203 Merge branch 'feat-image-scan-svc' into new-output
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
2023-07-11 13:49:52 +03:00
Vlad Klokun 4253005485 wip: feat: use scanning service in CLI
Signed-off-by: Vlad Klokun <vklokun@protonmail.ch>
2023-07-10 15:48:29 +03:00
Vlad Klokun 6b643f36d8 wip: feat(cli): add an image scanning command
Add a CLI command that launches an image scan. Does not scan images yet.

Signed-off-by: Vlad Klokun <vklokun@protonmail.ch>
2023-07-10 15:24:17 +03:00
Daniel Grunberger f54bfabacc factory
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
2023-07-10 09:10:37 +03:00
Daniel Grunberger fac2f7bec1 phase-1
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
2023-07-06 08:54:01 +03:00
David WertenteilandGitHub b149e00d1a Merge pull request #1264 from dwertent/deprecate-image-controls
core(adaptors): Ignore adaptors when credentials are not set
2023-07-05 17:48:12 +03:00
David Wertenteil 676771e8b3 deprecate the login flags
Signed-off-by: David Wertenteil <dwertent@armosec.io>
2023-07-05 10:16:09 +03:00
David Wertenteil c17415d6e9 deprecate host-scan-yaml flag
Signed-off-by: David Wertenteil <dwertent@armosec.io>
2023-07-05 09:02:21 +03:00
David Wertenteil 8989cc1679 Deprecated host-scanner
Signed-off-by: David Wertenteil <dwertent@armosec.io>
2023-07-04 09:43:10 +03:00
David Wertenteil 24c608e204 wip: add example for exclude-namespaces flag
Signed-off-by: David Wertenteil <dwertent@armosec.io>
2023-05-28 22:35:45 +03:00
YiscahLevySilas1andGitHub 95e88f8581 add compliance-threshold, deprecate fail-threshold (#1197)
* add compliance-threshold, deprecate fail-threshold

Signed-off-by: YiscahLevySilas1 <yiscahls@armosec.io>

* update opa-utils version

Signed-off-by: YiscahLevySilas1 <yiscahls@armosec.io>

* update opa-utils version for fix in compliance score

Signed-off-by: YiscahLevySilas1 <yiscahls@armosec.io>

---------

Signed-off-by: YiscahLevySilas1 <yiscahls@armosec.io>
2023-04-24 15:33:30 +03:00
yuleibandGitHub 875deb7ec3 adding compliance score updates (#1181)
Signed-off-by: Yuval Leibovich <yuvall@armosec.io>
2023-04-04 16:03:40 +03:00
David WertenteilandGitHub b4180b34e7 core(logs): Enhance logs (#1158)
* adding ks version

Signed-off-by: David Wertenteil <dwertent@armosec.io>

* Initialize scanInfo

Signed-off-by: David Wertenteil <dwertent@armosec.io>

* print if logger level is lower than warning

Signed-off-by: David Wertenteil <dwertent@armosec.io>

* wip: scan default frameworks when scanning files

Signed-off-by: David Wertenteil <dwertent@armosec.io>

* change print to log

Signed-off-by: David Wertenteil <dwertent@armosec.io>

* wip: Add end-line after last log

Signed-off-by: David Wertenteil <dwertent@armosec.io>

* wip: silent spinner when logger is warn

Signed-off-by: David Wertenteil <dwertent@armosec.io>

---------

Signed-off-by: David Wertenteil <dwertent@armosec.io>
2023-03-20 17:49:51 +02:00
David WertenteilandGitHub d3abd66aa3 Default frameworks (#1085)
* Update default frameworks names

Signed-off-by: David Wertenteil <dwertent@armosec.io>

* Remove error loggers, print debug instead.

Signed-off-by: David Wertenteil <dwertent@armosec.io>

---------

Signed-off-by: David Wertenteil <dwertent@armosec.io>
2023-02-08 08:59:10 +02:00
David Wertenteil 086144c3da JSON version default v2
Signed-off-by: David Wertenteil <dwertent@armosec.io>
2023-02-06 15:49:13 +02:00
Matthias Bertschy 3a90682c9e remove otel from CLI part
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
2023-01-31 10:03:56 +01:00
Matthias Bertschy 160ac0db7c add otel with uptrace client
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
2023-01-31 08:06:33 +01:00
Matthias Bertschy d462224b7a add kubectl plugin with krew
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
2023-01-25 08:07:31 +01:00
David Wertenteil 0c06b6c3e6 enable --create-account flag 2023-01-13 13:27:05 +02:00
Frederic BIDON 1a863473e7 fixed goimports
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
2023-01-06 09:32:17 +01:00
Amir MalkaandGitHub b309cfca7a Print attack tree (optional, with argument) (#997)
* Print attack tree with argument

* fix
2023-01-03 08:46:50 +02:00
David WertenteilandGitHub c4b3ef5b80 Support AKS parser (#994)
* support GKE parser

* update go mod

* Added KS desgin.drawio

* update k8s-interface pkg

* Added KS desgin.drawio

* support GKE parser

* update go mod

* update k8s-interface pkg

* Added KS desgin.drawio

* revert k8s.io to v0.25.3

* ran go mod tidy

* update sign-up url

* [wip] Adding CreateAccount support

* revert to docs URL

* update opa-utils pkg

* update opa-utils pkg
2023-01-03 08:44:29 +02:00
Vlad KlokunandVlad Klokun e5d44f741d docs: clarify new meaning of the --format CLI flag 2022-12-22 15:00:59 +02:00
Vlad KlokunandVlad Klokun f005cb7f80 feat: always print to (T)UI using PrettyPrinter
Prior to this change, `pretty-printer` was a special type of Printer
that wrote output to `Stdout`, unless explicitly asked to write to a
given file. Kubescape used `pretty-printer` as an output format by
default. This behavior created the following inconsistencies:
- When invoked as `kubescape scan`, Kubescape would use `pretty-printer`
  by default, and it would output the scan resluts in the
  `pretty-printer` format to `Stdout`.
- When invoked as `kubescape scan --format=pretty-printer`, the behavior
  would be as above.
- When invoked as `kubescape scan --format=FORMAT`, where `FORMAT` is any
  format except for `pretty-printer`, Kubescape would write the results
  to a sensible default file for the selected format. This is in
  contrast to how `--format=pretty-printer` would still output to
  `os.Stdout`, and not an output file.
- When invoked as `kubescape scan --format=ANY_FORMAT --output=FILENAME`, where
  `ANY_FORMAT` is any format, including `pretty-printer`, Kubescape
  would write the results to the provided `FILENAME` in the given
  `ANY_FORMAT`, and not write any results to `Stdout`.

The aforementioned situation complicates life for users running
Kubescape in CI, where Kubescape would skip writing the results to
`Stdout` and only write to the provided output file.

Moreover, with the addition of support for multiple output formats and,
hence, files, this introduces the following ambiguity:
- When invoked as `kubescape scan --format=json,pdf,pretty-printer
  --output=FILENAME`, should Kubescape treat `pretty-printer` as a
  format for the output file, or just an instruction to also print the
  results to `Stdout`?

To fix these inconsistencies and ambiguities, this commit introduces the
following changes:

- Kubescape will always print results to `Stdout` using the
  PrettyPrinter format.

- The `--format` CLI flag will control the format(s) in which the results
  will be written to one or many *output* files. This breaks the
  previous behavior that running `kubescape scan
  --format=pretty-printer` would not produce an output file, and only
  write to `Stdout`. After this change, the same invocation will still
  write to `Stdout`, but also produce a `report.txt` file in the
  PrettyPrinter format.
2022-12-22 15:00:59 +02:00
David Wertenteil b1392361f8 remove emoji from display 2022-12-18 13:42:58 +02:00
David WertenteilandGitHub 1fb9320421 Merge pull request #941 from dwertent/master
Updating examples
2022-12-06 14:11:07 +02:00
David Wertenteil 96ea9a9e42 fixed scanning example 2022-12-06 11:41:12 +02:00
050f9d3a4e Update cmd/scan/framework.go
Co-authored-by: craigbox <craig.box@gmail.com>
2022-12-02 02:16:43 +02:00
kooomixandGitHub 3942583b1d Merge pull request #1 from kooomix/dataControlInputs
update opa-utils functions
2022-11-29 14:35:08 +02:00
kooomix a10b15ba4b update opa-utils functions 2022-11-29 14:29:33 +02:00
David Wertenteil c61c7edbd0 update examples 2022-11-24 11:06:37 +02:00
Amir Malka 2b3fcca7e8 omit raw resources flag in json output 2022-11-16 12:15:17 +02:00
David Wertenteil 87a5cd66c8 replace control 0006 by 0048 2022-11-14 14:36:37 +02:00
David Wertenteil 0c1eda0d08 retrieve submit flag 2022-11-03 20:33:10 +02:00
David WertenteilandGitHub 0af5d2e0bb Merge pull request #876 from Moshe-Rappaport-CA/PER-335-removing-support-for-submitting-results-without-accountid
Per 335 removing support for submitting results without accountid
2022-11-02 12:55:20 +02:00
David WertenteilandGitHub 7697e3f0c4 Merge pull request #884 from Moshe-Rappaport-CA/dev
Scanning with include or exclude namespace, is only scan namespaced scope
2022-10-26 19:04:02 +03:00
Vlad Klokun 79e2515807 feat: support the SARIF output format 2022-10-26 18:13:37 +03:00