-
Notifications
You must be signed in to change notification settings - Fork 10
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
Govulncheck : No output of vulnerabilities after Scan #2
Comments
@brconnell4 actually the issue here is that the found vulnerability is within the golang runtime/version which for your project (or locally) appears to be 1.18, the scan is performed with golang 1.19. Therefore the issue is not discovered. As the action is fresh I did not yet get a chance to look at how to fix/address the issue. As it seems like GitHub does not support arguments being passed to docker based actions |
So I figured this out. I cloned your repo down and added my package to it. When I am running the container on 1.19, I get no vulnerabilities. On my local I am running 1.18.3 and get those vulnerabilities above. In this case I am assuming the expectation is to use this tool reliably, the versions of GO has to match what is in the container and what our package is actually running at. Correct me if I am wrong, but it sounds like this tool is only useful if we clone a copy of the repo, adjust it to what we expect our code to be running in and then run it in Git. |
I'm still in the progress of researching GitHub actions as this is my first action. Hopefully, I should be able to come up with a way that allows you to configure a go version. But it's true that all limitations of govulncheck also apply to this action, e.g. Vulnerabilities are only reported for the go os that is running the scan (Windows vulnerabilities won't be reported for Linux environments). |
Hey no worries at all. I think this is a great tool to have and I can see us having value in it already. Just an idea, I am not familiar with Git actions, but what if you had a task prior to the build that just does a replaces on the version using an environment variable? So the user can specific their GO version in their Codeql config and it will build that Go version and run? If you wanted to avoid a sed, you can also just use a j2 file and set the env variable using that when converting it from actions.yml.j2 to actions.yml |
Not sure how you are bringing CodeQL into this, it's not related to it. I was under the assumption that users of the action have to configure it/use it like here |
Sorry, I am including it with my CodeQL tasks. I am just running it after other tasks. Same way as you linked. |
I see, was thinking that there is maybe another way of setting it up. So glad to see that it is not the case. Anyways I will see how I can address this issue in the future, ideally, a user will have to specify the version as input. |
@brconnell4 could you do me a favor and give the following config a test? - name: Integration Test
id: integration-test
uses: Templum/govulncheck-action@feature/2
with:
go-version: 1.18.3 It should install the wished version and run based on it. So you should see the reports. Both |
So this works locally, but not in Github actions. I see that it builds the container running the version I specify, but it
It now appears to be looking at my Dockerfile instead of the one hosted in this repo to do a build. This is only occurring with this branch btw. |
Thank you for trying out the change and providing me with the feedback. I should be able to work on what you have shared here. Will ping you again when I have a version to verify. |
@brconnell4 I pushed a fix for your issue and also let it successfully run in my playground repository. Could you give it another try and let me know if everything works out for you. |
Hey there, so it passed and the output is below: But, it is missing items that show up in the vuln scan which might be an issue. Here is a full scan output excluding the informational
I think it would be nice to include the informational events too in the output, but having the actual vulnerabilities show up in the full report would be great. |
@brconnell4 could you double check that the tag you used was 1.18.3 and not 1.18? Because to me, it looks like that. This would explain why you only see the vulnerability for If the above is not true could you provide me with the output when running with -json flag ? So I can see if those vulns where swallowed by the code. |
Yea, I double checked that
...
I spun up the container as well and get the full output. Where are you wanting the json flag added? Right now they are running on push inside of Github Actions |
Thanks @brconnell4 for double-checking. Above you shared the output of your local execution.
I'm referring to this, can you run that same scan (locally) and leverage |
Ah i see what you mean. Yea see attached. |
@brconnell4 I just pushed my latest local code, it should now detect all of the vulnerabilities. Sadly there are still issues with resolution, meaning that for some calls I actually discover another calling location. As I don't have the original code it's hard to say if I'm actually finding correct callers and the govulncheck tool is just incorrect. That aside thank you very much for your feedback and input, really helped me drive the action forward 👍 . |
Awesome, Ill see if I can test it today or tomorrow. Thanks, great tool btw and I am sure other people will get great use out of it alongside CodeQL |
@brconnell4 I was able to work out the resolution issue and created a branch: |
I merged the above-mentioned Branch and will close this Issue. Feel free to create a new Issue if something does not work as expected. |
I wanted to add Govulncheck to our security scanning and have the vulnerabilities output to the scan results, but they are not showing up as expected. I am running this within Github and came across no errors when CodeQL was running.
When running the scan locally, I get 4 vulnerabilities. I.e
But when the scan finishes, it doesn't report on these vulnerabilties.
I have added the following to the bottom of my codeql config
The task finishes successfully with the following:
And the report is blank, I would expect that 4 vulnerabilities show up right?
Also I checked and verified this is the same output that github's api has as well:
The text was updated successfully, but these errors were encountered: