-
Notifications
You must be signed in to change notification settings - Fork 575
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: snyk fix v1 (Python) in behind FF #1707
Conversation
e9da8ba
to
fa8b7ff
Compare
|
2b50f98
to
d7baaf0
Compare
`snyk fix` uses @snyk/fix package to auto fix vulnerabilities after `snyk test` is run behind the scenes
Show this is not supported by default
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.
Extensively discussed this within Hammer and we are happy to approve this 👍
This will ensure that cross-package dependencies will be all using the same version
} | ||
|
||
const ecosystem = getEcosystemForTest(options); | ||
if (ecosystem) { |
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.
Am I missing something here? We will always throw FeatureNotSupportedByEcosystemError unless the ecosystem is null in which case we do support it?
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.
Thats correct, snyk fix
v1 doesn't support any ecosystems only old style test for now. So only if this something with a packageManager via old test flow
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.
Ok. So a null
ecosystem means that we are using the old test flow? Maybe a comment would help to make this clearer?
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.
thats the same as in snyk test
flow, add the comment to both? https://github.com/snyk/snyk/blob/e0e1b30a10c80e55b18eb985f1e185a6a23503c2/src/cli/commands/test/index.ts#L70
de5aacd
to
3296586
Compare
Expected release notes (by @lili2311) features: others (will not be included in Semantic-Release notes):
|
What does this PR do?
Introduce
snyk fix
command behind FF as beta version. Supports only fixingrequirements.txt
projects that do not include a-r
or-c
directive.The command first runs a
snyk test
command and then uses the results to automatically apply remediation, similar to wizard but in an automated fashion.Note
TestResult
&ScanResult
to only grab what is needed for now, this will evolve if needed but ideally we migrate away to new EcoSystem flow where this data will be available without a conversion.Where should the reviewer start?
src/cli/commands/fix/index.ts
How should this be manually tested?
snyk fix --all-projects --org=org-with-FF-enabled
Any background context you want to provide?
Relies on #1716
Screenshots