Error downloading project from GitLab repository. /usr/bin/git exited with 128: fatal: No url found for submodule path '<Path>' in .gitmodules
10:25AM | DEBUG | Could not find string flag ci 10:25AM | DEBUG | console.scan() 10:25AM | INFO | Scanning with Keeping Infrastructure as Code Secure 1.4.5 10:25AM | DEBUG | storage.NewMemoryStorage() 10:25AM | DEBUG | Trying to load path (--queries-path) from **************** 10:25AM | ERROR | failed to find path git::?ref=master: error downloading '': /usr/bin/git exited with 128: fatal: No url found for submodule path '******' in .gitmodules
10:25AM | ERROR | Failed to run application ERROR:"error downloading '': /usr/bin/git exited with 128: fatal: No url found for submodule path '**' in .gitmodules\n"
Please note, when I clone the project manually using "git clone" command it's working fine.
Expected Behavior
KICS should give us Scan results
Actual Behavior
KICS throws below error
Error: error downloading '****': /usr/bin/git exited with 128: fatal: No url found for submodule path '' in .gitmodules
Steps to Reproduce the Problem
./kics_1.4.5/kics -s scan --no-progress --minimal-ui -q
- step 1
- step 2
- step 3
Specifications
(N/A if not applicable)
- Version: 1.4.5
- Platform: Linux Red Hat
- Subsystem:
Hello @ppanchal10, I hope you're doing well, first of all thanks for your report. I see you're passing git:: as path parameter, but you are not specifying which repository should KICS download. I think this the reason you're having problems, could you try to execute KICS with a valid git url path, please?
Hi @felipe-avelar Due to company's policy I have intensionally removed path while creating issue. I am able to clone the repository with git cli but when I try to use the same path in kics its failing. There is a sub module inside that project and it's path is missing in .gitmodules for some reason due to which kics is throwing exception and exiting out. Is it possible to skip module which doesn't have entry in .gitmodules and scan the rest of the files.
Hello, @ppanchal10 🙂 I hope this message finds you well!
I was able to reproduce the issue. Unfortunately, I think the solution is not immediate. KICS uses go-getter to download repositories, and the fatal error seems to come from go-getter. We can not prevent it from the KICS side. I will open an issue on their repo (https://github.com/hashicorp/go-getter/issues/346).