You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to configure the plugin to run equivalent of snyk code test which is the command for scanning the code under development rather than its depencencies?
So far we've achieved this by adding a handcrafted task, but we think it's more hack than a solution.
To anyone it might concern - it might be a bit better to run it like this
open class SnykCodeTask : SnykTask() {
@TaskAction
fun doCodeTestTask() {
log.debug("Snyk Test Task")
authentication()
val output = runSnykCommand("code test")
log.lifecycle(output.output)
if (output.exitcode > 0) {
throw GradleException("Snyk Test failed")
}
}
}
tasks.register<SnykCodeTask>("snyk-code-test")
this utilizes functions available in parent SnykTask and correctly propagates all arguments provided in snyk block.
Anyway I agree that it would be nice to have it supported out of the box.
Hello 👋
Is there a way to configure the plugin to run equivalent of
snyk code test
which is the command for scanning the code under development rather than its depencencies?So far we've achieved this by adding a handcrafted task, but we think it's more hack than a solution.
Thank you in advance,
Ves
The text was updated successfully, but these errors were encountered: