11 Commits
Author SHA1 Message Date
Frederic BIDON cf484c328b fixed issues reported by gover (e.g. shadowed variables)
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
2023-01-06 09:32:17 +01:00
Frederic BIDON d336f4484c build(git): added build tag control over native git functionality
* fixes #964

* adapted build and ci to use build tag
* fixup error messages
* report git scan skipped warning & version
* fixed CI on windows: powershell parsing args...
* fixup leftover comment
* fixup typo in test message
* resolved merge conflicts on unit tests
* fix: added gitenabled tag to Makefile target

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
2023-01-05 17:46:51 +01:00
Vlad Klokun 6a4dc79689 fix: don’t panic when branch is missing remote and fallback
This change fixes the case in which Kubescape would panic when scanning
a local Git repository that:
- has the current branch that does not have an upstream set
- does not have an `origin` branch to fall back on

The panic happened because we did not check if the `origin` key exists
in the map of upstreams. This change adds a test for this scenario and
makes it pass by checking if the key exists. If it does not, it returns
an error.

Fixes #1005
2023-01-05 12:47:23 +02:00
Frédéric BIDON 09f13c05e1 fixed linting issues with minimal linters config
Signed-off-by: Frédéric BIDON <fredbi@yahoo.com>
2022-12-26 17:47:10 +01:00
Amir Malka fb114a17a3 Support windows build 2022-07-21 18:51:37 +03:00
Amir Malka 44f0473a09 fix tests 2022-07-17 18:35:33 +03:00
Amir Malka a6d9badc5f remove file commit information for windows 2022-07-17 12:12:40 +03:00
Amir Malka 5bf179810b use git2go to get file commit information 2022-07-17 10:08:09 +03:00
David Wertenteil fc78d9143b use filepath join in unitests 2022-07-05 11:44:07 +03:00
David Wertenteil 536a94de45 adding git data to file 2022-06-08 16:26:02 +03:00
David Wertenteil 8a1ef7da87 submit git scanning 2022-06-07 17:39:02 +03:00