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

Snyk July Review #7895

Merged
merged 7 commits into from
Jul 23, 2024
Merged

Snyk July Review #7895

merged 7 commits into from
Jul 23, 2024

Conversation

shanice-skylight
Copy link
Collaborator

@shanice-skylight shanice-skylight commented Jul 10, 2024

BACKEND PULL REQUEST

Related Issue

Snyk Review - July 2024

Changes Proposed

Update packages in package.json and yarn.lock (frontend)
Update packages in build.gradle and gradle.lockfile (backend).

Testing

A smoke test of basic functionality should be accomplished before merging.
This PR has already been verified on dev4

@shanice-skylight shanice-skylight self-assigned this Jul 10, 2024
@mpbrown
Copy link
Collaborator

mpbrown commented Jul 12, 2024

It does look like the smartystreets upgrade might have broken address validation and suggestions

On dev5, this is what it looks like for this address
Screenshot 2024-07-12 144028

On dev4, it says it cannot be verified
Screenshot 2024-07-12 144049

@shanice-skylight
Copy link
Collaborator Author

I'll do some research to see if I can fix it. Or I may remove smartystreets for this review and add it onto the next one

@shanice-skylight
Copy link
Collaborator Author

After further research the smartystreets-javascript-sdk upgrade to 4.0.1 from 3.2.0 is a major version upgrade that will involve further research in order to complete. Created a new ticket to further investigate

@shanice-skylight
Copy link
Collaborator Author

shanice-skylight commented Jul 15, 2024

Reverted smartystreets-javascript-sdk back to 3.2.0 and now it is working properly. Ready to be reviewed

Screenshot 2024-07-15 at 2 20 27 PM

mehansen
mehansen previously approved these changes Jul 16, 2024
Copy link
Collaborator

@mehansen mehansen left a comment

Choose a reason for hiding this comment

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

smoke testing looks good, just have some non-blocking questions about why we're doing this

Comment on lines +65 to +67
implementation 'org.apache.tomcat.embed:tomcat-embed-core:10.1.25'
implementation 'org.apache.tomcat.embed:tomcat-embed-websocket:10.1.19'
implementation 'org.springframework.security:spring-security-web:6.1.7'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I haven't done a Snyk PR before so just to make sure I understand: are we pinning these dependencies to specific versions because others have vulnerabilities? or do these just need to be upgraded?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Based on the Snyk scans the previous version of these packages introduced vulnerabilities, so we are upgrading them to to fix the vulnerability. See references below that explain each vulnerability:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moving forward I'll add the reference to the vulnerability in the description to provide more context

@@ -22,6 +22,8 @@
"@types/testing-library__jest-dom": "^5.14.5",
"@uswds/uswds": "^3.8.0",
"apollo-upload-client": "^17.0.0",
"axios": "^1.7.2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

same question here - what's axios for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See reference below that explains vulnerability:

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if this is what you were asking @mehansen but did a yarn why axios and looks like smartystreets-javascript-sdk depends on it
Screenshot 2024-07-19 at 11 42 50

@@ -254,6 +256,7 @@
".stories.tsx",
"<rootDir>/src/app/testQueue/constants.ts",
"<rootDir>/src/patientApp/timeOfTest/constants.ts"
]
],
"transformIgnorePatterns": ["node_modules/(?!axios)/"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this? 🤔 I ran jest without this and it looked to work for me and I don't think we are importing axios anywhere

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was for the updated version of smartystreets-javascript-sdk, its no longer needed since we aren't updating that package in this PR. I removed it

@@ -22,6 +22,8 @@
"@types/testing-library__jest-dom": "^5.14.5",
"@uswds/uswds": "^3.8.0",
"apollo-upload-client": "^17.0.0",
"axios": "^1.7.2",
"babel-jest": "^29.7.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: can we move this under the devDependencies?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Change made

Copy link
Collaborator

@emyl3 emyl3 left a comment

Choose a reason for hiding this comment

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

Smoke test on dev4 looked good -- left a couple comments/questions for you, @shanice-skylight! Thank you for your work on this!

Copy link

sonarcloud bot commented Jul 22, 2024

Copy link
Collaborator

@emyl3 emyl3 left a comment

Choose a reason for hiding this comment

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

smoke tested on dev4 -- LGTM!

Copy link
Contributor

@fzhao99 fzhao99 left a comment

Choose a reason for hiding this comment

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

🚢

@shanice-skylight shanice-skylight added this pull request to the merge queue Jul 23, 2024
Merged via the queue into main with commit 0599906 Jul 23, 2024
44 checks passed
@shanice-skylight shanice-skylight deleted the shanice/7874-snykv2 branch July 23, 2024 17:51
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.

5 participants