Open ramanasisu opened 3 years ago
snyk-prevent-gh-commit-status uses snyk-delta under the hood, and snyk-delta doesn't care where the results come from as long as they are in the expected format.
In this case, I would suggest to use the maven plugin and add the --json-file-output option as arg, using the same CLI option (maven plugin uses the cli under the hood) to dump the json results into a json file that you can just then pass to snyk-prevent.
Note: I'm assuming you're using the latest maven plugin here, which does use the CLI unlike the previous versions.
Wanna give this a shot and let us know how it goes?
action item on our side is more a documentation matter here it feels like.
We are using snyk plugin 1.2.9 , guess its the latest version I added the following to the mvn snyk plugin part
The snykTestResults.json is not visible in the location from where mvn snyk:test is run.
@ramanasisu v2.0.0 is the latest version. See https://github.com/snyk/snyk-maven-plugin which includes a migration guide.
Can you upgrade and try again?
Upgraded snyk-maven-plugin to 2.0.0 and the mvn snyk:test -Psnyk -s settings.xml fails, which actually works with snyk-maven-plugin 1.2.9. snyk-maven-plugin:2.0.0:test (default-cli) @ onp-root --- [INFO] Snyk Executable Path: /Users/venkattir/Library/Application Support/Snyk/snyk-macos [INFO] Snyk CLI Version: 1.657.0 (standalone)
@ramanasisu Can you share the failure logs with us? And if you have any relevant configuration in your pom.xml
. Feel free to omit anything private.
/snyk-prevent-gh-commit-status-linux before i run the above command i need to run snyk test with outputfile option, snyk test fails when run as a stand alone.with mvn snyk plugin mvn snyk:test works fine, as we pass -s settings.xml (this has the url to our artifactory server).is there any way to pass settings.xml with snyk command?or can we use /snyk-prevent-gh-commit-status-linux,with mvn snyk plugin??