Skip to content
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

[COD-123]Feat/add snyk code as plugin for test #1689

Closed
wants to merge 17 commits into from

Conversation

j-sp4
Copy link
Contributor

@j-sp4 j-sp4 commented Mar 5, 2021

COD-123

  • Ready for review

What does this PR do?

This introduces an mpv usage for snyk code.

This is a second attempt:
the first pr failed due to es module issues in flatted from code-client->flat-cache->flatted
This issue has been resolved in code client and we now have a custom implementation of flat-cache specifically for our needs.
A second issue the arose dcignore was not included into executable at compilation stage. dcignore was the deepcode ignore package that is leveraged in the vscode extension through the code-client. However its future is uncertain, I have now raised a discussion around its future that will be decided on in the next week, the most likely outcome will be removing it from the code-client and re-writing the package and only using it through vs-code extension and if needed in the cli using it also directly in the cli.
I have temporarily fixed this by adding it to the included assets of pkg seen on the change in package json.

Where should the reviewer start?

you should have the snykcode cli's ff,
and run it with snyk code test or snyk code test <project_path>

How should this be manually tested?

snyk code test or snyk 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

snyk code

ArturSnyk and others added 16 commits March 2, 2021 14:56
* we call snyk codes to analize our project and expecting
to get a response that includes sarif object.
* creating new formating schema for snyk code scanning
* adding code as command
* code will be as an internal plugin atm
* we want to have error handiling around test code command
* this also puts this command behind ff
* adding support for the currect exit code (1) when there
are vulnerabilities.
* some errors are throwned as object, so we wrap them with
a proper error type.
* we currently have circular import issue. to temporary solve
it in our case, we will dynamicly import a module.
* moving 'unsupported-feature-snyk-code-error' error into it's
own code folder
@j-sp4 j-sp4 requested review from a team as code owners March 5, 2021 18:31
@j-sp4 j-sp4 requested a review from JackuB March 5, 2021 18:31
@ArturSnyk
Copy link
Contributor

closed in favor of #1691

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants