-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing files causing segmentation violation #6381
Comments
I got the same error (multiple times) on v1.7.1. |
Hi @terrymunro . Best regards, |
Sure here you go: touch example_file
mkdir kics-repo
cd kics-repo
ln -s ../example_file .
docker run -tv $(pwd):/src checkmarx/kics:latest scan -p /src It has nothing to do with the code, its just about having a dead symlink in the scan path. So even this would reproduce it: ln -s nonexistant_file for_example
docker run -tv $(pwd):/src checkmarx/kics:latest scan -p /src The reason I gave the first example though, is because this seems like a pretty common situation, having symlinks to things outside the docker context. They aren't relevant to the scan, so they shouldn't be able to break it. Like @agmond mentioned though, if I use 1.7.0 for example: docker run -tv $(pwd):/src checkmarx/kics:1.7.0 scan -p /src This works fine. Oh and I should add that this:
Doesn't help this particular problem, even if its in .gitignore, it will still crash kics. |
This might be related to: #5512
Similar to the above issue, when having a symbolic link to a file that is either missing or referencing a file outside of the docker context, kics will panic right after running into the missing file.
In this case, its because I've terraform init'd on my machine, with terraform plugin_cache_dir configured so the binaries are symlinked to ~/.cache/terraform/... but I'm running kics in docker and bind-mounting the terraform directories.
I am able to make it work by mounting nothing over the top of all the directories that contain the symlinks, which is why I believe the missing files are related to the problem.
Example:
Full log:
The text was updated successfully, but these errors were encountered: