-
Notifications
You must be signed in to change notification settings - Fork 23
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
first commit was pushed related to update the trivy version #52
base: master
Are you sure you want to change the base?
Conversation
|
hi @calsoftfaizal813 - thanks for the PR. A few comments:
![]() |
context.subscriptions.push(vscode.commands.registerCommand( | ||
"trivy-vulnerability-scanner.scan", | ||
() => { | ||
const trivyScanCmd = "trivy --quiet filesystem --security-checks config,vuln --exit-code=10"; | ||
var scanResult = runCommand(trivyScanCmd, projectRootPath.toString()); | ||
context.subscriptions.push( | ||
vscode.commands.registerCommand("trivy-vulnerability-scanner.scan", () => { | ||
const trivyScanCmd = | ||
"trivy --quiet filesystem --security-checks config,vuln --exit-code=10"; | ||
let scanResult = runCommand(trivyScanCmd, projectRootPath.toString()); |
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.
Please update the commands as per the log output from the extension
2024-10-28T23:17:33-06:00 WARN '--security-checks' is deprecated. Use '--scanners' instead.
2024-10-28T23:17:33-06:00 WARN '--scanners config' is deprecated. Use '--scanners misconfig' instead. See https://github.com/aquasecurity/trivy/discussions/5586 for the detail.
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.
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.
Did you check the logs to see what's causing the 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.
Hi @simar7, Could you please help me with this one where I can see the logs for this error, I tried to find but was not able to find the logs in my local environment
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.
A lot of these changes are style based, are you running any linter to do so? It makes it hard to review this PR so can we update the linter changes in a separate PR? They are not really necessary for 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.
I have default installed eslint and prettier extensions to format the javascript and typescript code that's why we have removed the extra white spaces and variable declaration changes, please let me know if it is not really required for now so I can revert the changes for this file?
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.
As we mentioned earlier, we're just looking to upgrade this extension to support the latest version of Trivy. Any other changes should be done in a separate PR as they aren't related to that.
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.
See my comment on style/lint here https://github.com/aquasecurity/trivy-vscode-extension/pull/52/files#r1820103613
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.
Left some comments.
Hi Simarpreet Singh. |
The project already contains two test targets, one is for running the extension and the other for tests. https://github.com/aquasecurity/trivy-vscode-extension/blob/master/src/test/suite/extension.test.ts You can read more on how to run the test target here: https://code.visualstudio.com/api/working-with-extensions/testing-extension |
I ran trivy scanning for the test project "Trivy-ci-test" and updated the trivy version.
there are three file changes included in this commit:
extension.ts
trivy_wrapper.ts
package-lock.json
here are the screenshots of the scanning results:
![image](https://private-user-images.githubusercontent.com/180525047/380132813-a0a2ec56-eb1c-45d7-899b-041c2a2bedbc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjAyMTMsIm5iZiI6MTczODk1OTkxMywicGF0aCI6Ii8xODA1MjUwNDcvMzgwMTMyODEzLWEwYTJlYzU2LWViMWMtNDVkNy04OTliLTA0MWMyYTJiZWRiYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QyMDI1MTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jY2ZiMjRhZGNkYWEzMmJiMDA0MzlkNDZkOTFhZWUzMWRhMjQyN2Q0NWM2OGFiMWU1MjA5MjMwNTY4YjEwN2QyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.pWBMRAu0mooxsehaBzczdQCdo_I4IxQADaecq1FX3Qs)