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

fix: sarif descirption change #1428

Merged
merged 1 commit into from
Sep 30, 2020
Merged

fix: sarif descirption change #1428

merged 1 commit into from
Sep 30, 2020

Conversation

RotemS
Copy link
Contributor

@RotemS RotemS commented Sep 29, 2020

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Small change to SARIF output description, severity to look the same in IaC and containers.

@RotemS RotemS requested a review from a team as a code owner September 29, 2020 08:00
@RotemS RotemS requested a review from a team September 29, 2020 08:00
@RotemS RotemS requested a review from a team as a code owner September 29, 2020 08:00
@RotemS RotemS self-assigned this Sep 29, 2020
@ghost ghost requested review from MegaBean and orsagie September 29, 2020 08:00
Copy link

@benlaplanche benlaplanche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me.

@@ -1,4 +1,5 @@
import * as sarif from 'sarif';
import upperFirst = require('lodash/upperFirst');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to recommend import { upperFirst } from 'lodash'; instead of import upperFirst = require('lodash/upperFirst');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice also to fix the commit message to something that is more related to what you have added into the description of your pr:

small change to SARIF output description, severity to look the same in IaC and containers.

To give more context to our users of what is happening

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually a change requested on the PR that introduced this functionality, I originally used your suggestion :) Don't mind changing if needed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are reducing the usage of require giving the preference to import

@@ -1,4 +1,5 @@
import * as sarif from 'sarif';
import upperFirst = require('lodash/upperFirst');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use import?

Suggested change
import upperFirst = require('lodash/upperFirst');
import upperFirst from 'lodash/upperFirst';

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution would not help because upperFirst was exported as export = upperFirst;
and in order to allow it we need to change tsconfig.json compilerOptions and add a new property
"esModuleInterop": true,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was a request in the original PR. Considering the two comments on this now, changed 👍

@RotemS RotemS force-pushed the fix/sarif-output-changes branch 2 times, most recently from 101e8bd to 9702a0e Compare September 29, 2020 15:04
@snyk snyk deleted a comment from github-actions bot Sep 29, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Sep 29, 2020

Expected release notes (by @RotemS)

fixes:
sarif change - severity to look the same for IaC and containers (4abfb97)

  • I hereby acknowledge these release notes are 🥙 AWESOME 🥙

@RotemS RotemS merged commit 00b0fa7 into master Sep 30, 2020
@RotemS RotemS deleted the fix/sarif-output-changes branch September 30, 2020 14:10
@snyksec
Copy link

snyksec commented Sep 30, 2020

🎉 This PR is included in version 1.405.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

6 participants