fix(console): change to use working directory when looking for `kics.config`
Closes #5242
Proposed Changes
- Change how KICS looks for
kics.config - Docs was updated to fit with this new behavior.
Some context
This PR focus on changing setup for config file. KICS was looking for config file on path it received on path flag (-p), the problem with this approach is that was impossible to configure path flag on kics.config file without using config flag (--config).
So, to solve this problem, the behavior is changed to look for config file on the working directory, this should solve this issue and docker issue too.
This has the same behavior as queries default path, as you can see on internal/console/helpers/helpers.go:133 and I think this is another reason to change kics.config file looking to this behavior, since it will standardize how KICS look for files and directories.
Signed-off-by: Felipe Avelar [email protected] I submit this contribution under the Apache-2.0 license.
Scan submitted to Checkmarx
Checkmarx SAST - Scan Summary & Details
Cx-SAST Summary
Total of 5 vulnerabilities
0 High
0 Medium
5 Low
0 Info
Violation Summary
No policy violation found
Hi @felipe-avelar, I hope you are doing well After analyzing this PR we decided not to include this feature in KICS. KICS is intended to run as a docker image, this means that the users would need to have a kics config file in the /app/bin directory of the Image which is not ideal. That being said although we do not include this feature we appreciate your help in improving KICS and hope to see you contributing!
Thank you!