-
Notifications
You must be signed in to change notification settings - Fork 576
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/add snyk code as plugin for test #1664
Conversation
|
097247c
to
5f26a44
Compare
8deacf5
to
a9fbf6e
Compare
eb558d5
to
df57e31
Compare
50065dc
to
3e42519
Compare
if (error instanceof Error) { | ||
throw error; | ||
} else { | ||
throw new Error(error); |
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.
we sometimes throw an Object which is an error(but not as an Error obj), so we would like to wrap it as an actual error
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.
Ideally we should only be throwing Error objects to avoid this inconsistency but that can be fixed outside this PR (ideally with an eslint rule). If error
is a non-Error Object
, passing it into the Error constructor is odd as that's a message
string. But again, that seems to be existing behaviour so not blocking this PR.
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.
lgtm
Please interactively rebase and structure your commit messages so that they make sense as Release Notes - the preview release notes do not make sense right now ( #1664 (comment) ) |
@darscan i will squash the commits before merging. I've split it so it would be easier to review :) |
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.
👏 Great job @ArturSnyk and @Spoor2709 !
1455c59
to
4169a74
Compare
* we are using code-clint lib to analyze a project and expecting to get a sarif typed response. * creating new formating schema for snyk code scanning * adding `snyk code` functionality as an internal plugin * adding `snyk code` behind FF * adding support for the currect exit code (1) when there are vulnerabilities. * we currently have circular import issue. to temporary solve it in our case, we will dynamicly import a module.
4169a74
to
cba65a3
Compare
Expected release notes (by @ArturSnyk) features:
|
Revert "Merge pull request #1664 from snyk/feat/add-snyk-code-as-plugin-for-test"
What does this PR do?
This introduces an mpv usage for snyk code.
Where should the reviewer start?
you should have the snykcode cli's ff,
and run it with
snyk code test
orsnyk code test <project_path>
How should this be manually tested?
snyk code test
orsnyk code test <project_path>
Any background context you want to provide?
we will be adding more functionality around this flow, more error handling, analytics, and output functionality, later on
What are the relevant tickets?
https://snyksec.atlassian.net/browse/COD-123
Screenshots
Additional questions