-
Notifications
You must be signed in to change notification settings - Fork 524
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 Probe for SAST throws nil pointer exception for some Repos #4531
Comments
It has to do with our logger being nil here: Lines 127 to 132 in 3b42b6e
Normally the logger is set when running checks,: scorecard/checker/check_runner.go Lines 89 to 99 in 3b42b6e
When running probes, that detail gets returned as a finding and doesn't need to be logged. So instead of changing |
Is that a valid state, the logger being nil even though a check is run? If so, a nil check is the way to go in my opinion. |
Yes and no, during a normal check-bsaed run, we'd expect the logger to be set. But during a probe run, the logger isn't used. Since this is just a debug level statement, should be fine to do a nil check |
Describe the bug
If I run the sastToolConfigured probe on the https://github.com/toml-rs/toml repository it throws a memory exception.
Reproduction steps
Steps to reproduce the behavior:
On my setup (git-bash, Windows 11) this produces a stack trace:
Expected behavior
I have not yet investigated what exactly happens, so I am uncertain if the probe should fail or not. Regardless, I think that it should not throw a memory exception.
Additional context
I am curious about what happens, so if I find the time I will investigate further. If I see a reasonable chance for me to fix this, I will create a PR. I can make no guarantees at this point, though.
The text was updated successfully, but these errors were encountered: