cbrom
47d81ce721
added a basic test for GetPackagesNames
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-24 15:07:11 +03:00
cbrom
6fe6dbb333
added doc comment for exported function GetPackageNames
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-24 15:07:11 +03:00
cbrom
53f45e599a
GetFilesByPackage function removed along with tests as it is not used anywhere except in tests
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-24 15:07:11 +03:00
cbrom
6b4ef219c9
added more testcases for CalculateFixed function
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-24 15:07:11 +03:00
Matthias Bertschy
d496485f75
Merge pull request #1501 from mohaidoss/tests/core-initutils
...
Adding tests for core/core/initutils and fixing potential bug
2023-11-24 12:13:18 +01:00
Mehdi Moussaif
d6bb70ba4a
Use tenantConfig instead of KSCloudAPIConnector, Add tests for core/core/initutils
...
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
Add tests for core/core/initutils
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
Potential bug, Use tenantConfig instead of KSCloudAPIConnector
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
2023-11-24 11:35:21 +01:00
Mehdi Moussaif
362375a733
Adding Test Suite for core/pkg/policyhandler
...
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
2023-11-24 00:35:23 +01:00
cbrom
92d39c5abc
added a generated docstring for CalculateFixed function
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-23 22:33:10 +03:00
Matthias Bertschy
c4f0e6e46b
Merge pull request #1500 from sulemaanhamza/bugfix-core-pkg-fixhandler-yamlhelper-edgecases
...
Edge-case Handling and Test Enhancements in yamlhelper
2023-11-23 17:12:44 +01:00
Matthias Bertschy
6fcfe7f4e5
Merge pull request #1497 from sulemaanhamza/bugfix-core-list-gencontrolrows
...
Fix for Index Out of Range Error in Malformed Policies Handling
2023-11-23 17:09:58 +01:00
Matthias Bertschy
633024f8c5
Merge pull request #1498 from kubescape/severity
...
add one test for imagescan to avoid coverage check failure
2023-11-23 16:45:30 +01:00
Matthias Bertschy
92a4c1f64a
add one test for imagescan, delete patch_test to avoid coverage check failure
...
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com >
2023-11-23 15:14:52 +01:00
sulemaanhamza
1f43de06f8
Implemented Ai suggested changes
...
Signed-off-by: sulemaanhamza <sulemanhamza97@gmail.com >
2023-11-23 18:40:42 +05:00
sulemaanhamza
04b06d875b
Added edge-case test cases for yamlhelper, fixed bugs cause test-cases to fail
...
Signed-off-by: sulemaanhamza <sulemanhamza97@gmail.com >
2023-11-23 17:21:09 +05:00
Matthias Bertschy
5d795edd31
Merge pull request #1493 from mohaidoss/fix-download-artifacts
...
Fix for Kubescape Reading Policies from Local File
2023-11-23 12:56:54 +01:00
Mehdi Moussaif
fd390bbd37
Bug fix where kubescape fails to read from framework local paths
...
Fix typo in error description
Bug fix where kubescape get policies from file
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
Missing '.json' extension when getting Framework Paths
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
Appropriate test case for FrameworksPaths
Bug fix where kubescape fails to read from frameworks local paths
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
2023-11-23 12:46:44 +01:00
Yuval Leibovich
3b78169f8c
Update loadmocks.go
...
remove armobuildin obj. from regolibrary
Signed-off-by: Yuval Leibovich <89763818+yuleib@users.noreply.github.com >
2023-11-23 13:29:27 +02:00
VaibhavMalik4187
55162829e7
Added Test Suite for core/pkg package
...
Added unit tests for the following files:
- containerscan/datastructures.go
- hostsensorutils/hostsensordeploy.go
- hostsensorutils/hostsensorworkerpool.go
- hostsensorutils/utils.go
- policyhandler/handlepullpolicies.go
- policyhandler/handlepullpoliciesutils.go
- resourcehandler/filesloader.go
- resourcehandler/remotegitutils.go
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com >
2023-11-23 14:19:13 +05:30
Matthias Bertschy
27590f623f
Merge pull request #1495 from sulemaanhamza/pkg-yamlhelper-test-suite
...
Adding Comprehensive Test Suite for yamlhelper Package
2023-11-23 09:24:51 +01:00
sulemaanhamza
bc2fc83599
Enhanced policies list to cover multiple edge-cases + Added new test-case with table-like structure to test pretty print of rows
...
Signed-off-by: sulemaanhamza <sulemanhamza97@gmail.com >
2023-11-23 13:15:31 +05:00
sulemaanhamza
a513c27dce
Possible bug fix to prevent index out of range error in case of malformed policies + test case for edge cases
...
Signed-off-by: sulemaanhamza <sulemanhamza97@gmail.com >
2023-11-23 12:36:54 +05:00
suleman
f814d1df19
Added Test Suite for core/pkg/fixhandler/yamlhelper
...
Signed-off-by: sulemaanhamza <sulemanhamza97@gmail.com >
2023-11-23 12:33:51 +05:00
Cbrom
5455855e65
Merge branch 'kubescape:master' into core_cautils_datastructuremethods_tests
2023-11-22 22:13:58 +03:00
cbrom
12056f4cad
fixed a test where it would run 1 test case twice
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-22 19:28:30 +03:00
cbrom
d96ab483a4
code improvement on type assertion for useFromKubescapeVersion and useUntilKubescapeVersion
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-22 19:27:52 +03:00
Matthias Bertschy
43dbb4ac70
Merge pull request #1484 from VaibhavMalik4187/core-core-tests
...
Added Test Suite for core/core Package
2023-11-22 17:26:31 +01:00
Matthias Bertschy
dc6c379aa2
Merge pull request #1487 from cbrom/core_cautils_datastructuremethods_tests
...
Adding Tests and Refactoring for ruleWithKSOpaDependency Function in cautils
2023-11-22 17:21:17 +01:00
Matthias Bertschy
1342a06f43
Merge pull request #1477 from mohaidoss/master
...
Adding Test Suite for core/pkg/score
2023-11-22 16:36:51 +01:00
VaibhavMalik4187
beb6d9535c
Added tests for cautils
...
Wrote new tests for the following files:
- controllink.go
- display.go
- fileutils.go
- getter/getpoliciesutils.go
- getter/utils.go
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com >
2023-11-22 20:24:16 +05:30
VaibhavMalik4187
9845175d29
Added tests for the core/core package
...
Wrote tests for the following files:
- kscore.go
- list.go
- patch.go
- scan.go
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com >
2023-11-22 20:03:27 +05:30
cbrom
4ae45cd727
added tests for non string values of useUntilKubescapeVersion and useFromKubescapeVersion
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-22 11:39:36 +03:00
cbrom
b0a376aa2b
safe check from and until strings before usage in isRuleKubescapeVersionCompatible function
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-22 11:39:36 +03:00
cbrom
d45c97cef0
removed ruleWithKSOpaDependency function along with tests
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-22 11:24:44 +03:00
cbrom
7eb97fcba0
added tests for ruleWithKSOpaDependency function
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-22 02:07:36 +03:00
cbrom
73d1805ce6
added tests for ruleWithKSOpaDependency function
...
Signed-off-by: cbrom <kb.cbrom@gmail.com >
2023-11-22 02:07:19 +03:00
Mehdi Moussaif
c7f9a6ebc4
Adding Test Suite for core/pkg/resultshandling/gotree
...
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
Additional tests for core/pkg/gotree
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
tests for printItem in core/pkg/gotree
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
Refactor printer initialization in gotree_test.go
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
2023-11-21 20:32:11 +01:00
Mehdi
a2f632beb4
Test suite for core/pkg/score
...
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
Use cautils for mock data
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
Removed test TestNewScoreWrapperWithNilOPASessionObj
Signed-off-by: Mehdi Moussaif <m.moussaif42@gmail.com >
2023-11-21 16:35:09 +01:00
Amir Malka
0191135b10
support a backend with service discovery v2 ( #1479 )
...
Signed-off-by: Amir Malka <amirm@armosec.io >
2023-11-21 11:40:33 +02:00
David Wertenteil
450df679cd
bump logger version
...
Signed-off-by: David Wertenteil <dwertent@armosec.io >
2023-10-31 18:22:03 +02:00
Craig Box
c9ccef90f3
Pretty up the pretty-printer. ( #1451 )
...
* Pretty up the pretty-printer.
Signed-off-by: Craig Box <craigb@armosec.io >
* add some text fixes for the Operator also
Signed-off-by: Craig Box <craigb@armosec.io >
* fix another verb
Signed-off-by: Craig Box <craigb@armosec.io >
* fixed unit tests
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* fixed test
Signed-off-by: David Wertenteil <dwertent@armosec.io >
---------
Signed-off-by: Craig Box <craigb@armosec.io >
Signed-off-by: David Wertenteil <dwertent@armosec.io >
Co-authored-by: David Wertenteil <dwertent@armosec.io >
2023-10-31 18:07:43 +02:00
David Wertenteil
3b2feca0dd
Update flags ( #1462 )
...
* add access key flag to the scan command
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* support triggering ns
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* Fixed json keys
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* get k8s config
Signed-off-by: David Wertenteil <dwertent@armosec.io >
---------
Signed-off-by: David Wertenteil <dwertent@armosec.io >
2023-10-31 15:41:18 +02:00
YiscahLevySilas1
1d25415c21
avoid adding duplicate related resource IDs
...
Signed-off-by: YiscahLevySilas1 <yiscahls@armosec.io >
2023-10-26 12:52:05 +03:00
David Wertenteil
3e2314a269
Bump v3 ( #1449 )
...
* bump version
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* change default view
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* fixed tests
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* fixed go mod
Signed-off-by: David Wertenteil <dwertent@armosec.io >
---------
Signed-off-by: David Wertenteil <dwertent@armosec.io >
2023-10-22 17:43:51 +03:00
David Wertenteil
c143d10130
Cloud provider detection ( #1448 )
...
* set cloud provider using nodes
* use scan metadata for scanning scope
* code cleanup
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* handle error
Signed-off-by: David Wertenteil <dwertent@armosec.io >
---------
Signed-off-by: David Wertenteil <dwertent@armosec.io >
2023-10-22 15:47:57 +03:00
David Wertenteil
d5407466d5
Preparing Kubescape for v3 ( #1403 )
...
* wip: minor cli fixes
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* wip: change default view
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* wip: reduce default topWorkloadsNumber to 3
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* update gif
Signed-off-by: David Wertenteil <dwertent@armosec.io >
* default view for controls and frameworks
---------
Signed-off-by: David Wertenteil <dwertent@armosec.io >
2023-10-22 15:39:58 +03:00
rcohencyberarmor
052c042dac
Support backend access key ( #1404 )
...
Support backend access key
Signed-off-by: Amir Malka <amirm@armosec.io >
2023-10-22 15:10:08 +03:00
Daniel Grunberger
72b64127c7
Restructure img cmd ( #1398 )
...
* feat: add kubescape patch command
Signed-off-by: Anubhav Gupta <mail.anubhav06@gmail.com >
* update patch command output format
Signed-off-by: Anubhav Gupta <mail.anubhav06@gmail.com >
* fix patch command logic
Signed-off-by: Anubhav Gupta <mail.anubhav06@gmail.com >
* update docs & minor changes
Signed-off-by: Anubhav Gupta <mail.anubhav06@gmail.com >
* restructure cmd
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io >
* fix tests
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io >
* readme
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io >
* fix version code
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io >
* go mod
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io >
---------
Signed-off-by: Anubhav Gupta <mail.anubhav06@gmail.com >
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io >
Co-authored-by: Anubhav Gupta <mail.anubhav06@gmail.com >
Co-authored-by: Daniel Grunberger <danielgrunberger@armosec.io >
2023-10-22 14:51:39 +03:00
rcohencyberarmor
e2044338c8
print result to stdout when format argument specified ( #1438 )
...
* print result to stdout when format argument specified
Signed-off-by: rcohencyberarmor <rcohen@armosec.io >
* print pretty format to stdout if format is not specified
Signed-off-by: rcohencyberarmor <rcohen@armosec.io >
* remove not relevant log
Signed-off-by: rcohencyberarmor <rcohen@armosec.io >
---------
Signed-off-by: rcohencyberarmor <rcohen@armosec.io >
Co-authored-by: rcohencyberarmor <rcohen@armosec.io >
2023-10-19 13:07:58 +03:00
Daniel Grunberger
bc327a0d86
set log to error
...
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io >
2023-10-18 12:23:46 +03:00
Daniel Grunberger
77888c12a0
rm if statement
...
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io >
2023-10-18 12:22:59 +03:00