-
Notifications
You must be signed in to change notification settings - Fork 48
feat: implement new commands code-test
and container-test
+ new c…
#169
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
feat: implement new commands code-test
and container-test
+ new c…
#169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thank you a lot for you contribution! Please have a look at minor comments left. It would be also good to fix the test-without-dependency
test. 🙏
84b9b48
to
3bceca5
Compare
Hello @michelkaporin - thank you for the review and your comments. I have made those changes that you have requested. Please have another look over those. I have re-run the tests and they are all passing successfully for me. Specifically the
Could you please provide a trace with the issue that you are seeing after these changes have been applied? |
3bceca5
to
b56ae45
Compare
@cp-andrew-lindesay
Are PR checks visible to you? https://github.com/snyk/snyk-maven-plugin/actions/runs/3460241672/jobs/5776570286. Also |
b56ae45
to
b6e75b4
Compare
Hello @michelkaporin ; Yes I can see those test run outputs thanks. I have updated |
@cp-andrew-lindesay thank you! The PR looks good to me.
|
@cp-andrew-lindesay I've chatted internally and the issue is that Windows runner targets You can add |
…onfiguration parameter `failOnIssues`
b6e75b4
to
97bdf7a
Compare
@michelkaporin ; thanks for that -- I have added the additional argument as specified above. Hopefully this will resolve the build issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! ⭐
@michelkaporin thank your for your collaboration on this. Is it possible to find out if you will be releasing a new version carrying this logic in the near future? |
@cp-andrew-lindesay Sure, we will release this PR in the 2.2.0 version today. |
@cp-andrew-lindesay it should be released now 🎉 |
Thank you again @michelkaporin . |
Note that I have NOT agreed to the contributor agreement (on behalf of an organisation) using the indicated tool owing to security concerns with it. I have contacted a Snyk staff member who I have asked to get in touch to confirm this.
What does this PR do?
test-multi-module-child
which has been resolved.test-with-specific-cli-version
appears to be incorrect and this ha been resolvedfailOnActionNeeded
which can control if an "action needed" situation should fail the build or not.code test
andcontainer test
are now supportedWhere should the reviewer start?
Review the documentation updates and then see the new commands implemented in
Command.java
,CommandLine.java
,SnykCodeTestMojo.java
andSnykContainerTestMojo.java
. The logic for thefailOnActionNeeded
is to be found inSnykMojoExecutor.java
.How should this be manually tested?
Create a Java Maven project that builds to a container image. The project should intentionally exhibit a dependency vulnerability, a code-based vulnerability and a container image vulnerability. Implement Snyk Maven plugin executions so that
code-test
andcontainer-test
goals are run as required. By default the issues in the project will not trigger a build failure. Now configure the Maven plugin withfailOnActionNeeded
set to true and observe that a vulnerability in the project yields a build failure.Any background context you want to provide?
N/A
What are the relevant tickets?
N/A
Screenshots
N/A
Additional questions
N/A