Skip to content
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

Bug: dep-scan picking up findings from CMakeLists.txt files #330

Closed
gcatto opened this issue Jul 15, 2024 · 7 comments
Closed

Bug: dep-scan picking up findings from CMakeLists.txt files #330

gcatto opened this issue Jul 15, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@gcatto
Copy link

gcatto commented Jul 15, 2024

Expected Behavior

I have started using dep-scan on a number of projects across a number of languages. I noticed I was getting strange malicious findings when running it on a C++ project. From what I can tell in the documentation, etc., C++ support only mentions Conan files (e.g., conanfile.txt).

Actual Behavior

dep-scan seems to be using CMakeLists.txt files in some way as reporting on findings as a result

Steps to Reproduce

  1. Create a directory for this new dummy project
  2. Within that directory, create a Test sub-directory
  3. Within the Test sub-directory, create a CMakeLists.txt file with the following contents:
project(Test)
  1. Run dep-scan this way:
depscan --src . --reports-dir ./dep-scan-reports --no-banner --explain --debug --type cpp
  1. Get malicious findings in the output

Note that adding a Conan file (e.g., conanfile.txt) does not seem to change anything.

Additional Information

I am on depscan 5.4.1

@gcatto gcatto added the bug Something isn't working label Jul 15, 2024
@prabhu
Copy link
Member

prabhu commented Jul 15, 2024

@gcatto Could you kindly retest with 5.4.3? We fixed #320 recently which appears to be similar issue.

@gcatto
Copy link
Author

gcatto commented Jul 16, 2024

That does seem to help. Thanks kindly for your prompt response, @prabhu !

@gcatto gcatto closed this as completed Jul 16, 2024
@gcatto
Copy link
Author

gcatto commented Jul 16, 2024

@prabhu follow-up question, if you don't mind. When I run the command like this locally on my development machine (where I have cdxgen and depscan installed), I don't get any findings:

depscan --src . --reports-dir ./dep-scan-reports --no-banner --explain --debug --type cpp

When I run the same command as part of my CI process, where it is running within a container, it reports a bunch of container/OS findings. Is there any way to suppress those, since I have type set to cpp? Thanks!

@prabhu
Copy link
Member

prabhu commented Jul 16, 2024

@gcatto No idea. Can you share the sbom generated in the CI? Or run cdxgen separately with the environment variable CDXGEN_DEBUG_MODE=true and share the output.

@gcatto
Copy link
Author

gcatto commented Jul 16, 2024

@prabhu is it okay if I email them to you, instead of posting here? Is your email address on https://github.com/prabhu okay to use?

@prabhu
Copy link
Member

prabhu commented Jul 16, 2024

prabhu at appthreat dot com

@gcatto
Copy link
Author

gcatto commented Jul 16, 2024

Sent! Hopefully the files make it through. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants