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

add sanitizer #3846

Merged
merged 12 commits into from
Mar 21, 2022
Merged

add sanitizer #3846

merged 12 commits into from
Mar 21, 2022

Conversation

thetif
Copy link
Contributor

@thetif thetif commented Mar 3, 2022

Resolves #3832

Description-
Resolve issues discovered by the snyk plugin in vscode.

This pull request changes...

  • res.send to res.json where applicable
  • adds csrf, cookie-parser, and express-validator to improve security
  • adds some validation to param/body inputs from users

This pull request also touches…

  • updated the mongo settings to match new mongo configs

This pull request was tested in the follow ways…

  • automated tests
  • manual verification that site is still functional

This pull request is ready to review when...

  • Automated tests are updated (and all tests are passing)
  • The experience passes a basic manual accessibility audit (keyboard nav, screenreader, text scaling) OR an exemption is documented

This pull request can be merged when…

  • Code has been reviewed by someone other than the original author
  • QA has verified the accessibility and functionality related to the change
  • Design has approved the experience
  • Product has approved the experience

@thetif thetif requested review from tbolt and Sun-Mountain March 3, 2022 14:34
@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2022

Codecov Report

Merging #3846 (a9108be) into main (7ee73f7) will decrease coverage by 0.01%.
The diff coverage is 81.81%.

@@            Coverage Diff             @@
##             main    #3846      +/-   ##
==========================================
- Coverage   83.34%   83.32%   -0.02%     
==========================================
  Files         313      313              
  Lines        6393     6398       +5     
  Branches     1204     1204              
==========================================
+ Hits         5328     5331       +3     
- Misses        971      973       +2     
  Partials       94       94              
Impacted Files Coverage Δ
api/routes/apds/patch.js 100.00% <ø> (ø)
api/middleware/errorHandler.js 75.00% <50.00%> (-5.96%) ⬇️
api/routes/states/affilitations/get.js 85.71% <50.00%> (ø)
api/db/mongodb.js 60.52% <100.00%> (ø)
api/routes/apds/files/get.js 100.00% <100.00%> (ø)
api/routes/apds/files/post.js 100.00% <100.00%> (ø)
api/routes/auth/certifications/files/post.js 100.00% <100.00%> (ø)
api/routes/users/get.js 100.00% <100.00%> (ø)
api/util/mockResponse.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ee73f7...a9108be. Read the comment docs.

@cms-eapd-bot
Copy link

cms-eapd-bot commented Mar 3, 2022

This deploy was cleaned up.

Copy link
Contributor

@tbolt tbolt 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 👍

"engines": {
"node": "16.13.2"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious, whats the intention with adding this top-level?

@mirano-darren mirano-darren self-assigned this Mar 10, 2022
Copy link
Contributor

@mirano-darren mirano-darren 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! Good stuff, Everything looks unphased and booted up as normal.
Quick note: If you get a Mongo error on "docker compose up" you need to update your env_vars

@thetif thetif requested review from jeromeleecms and removed request for Sun-Mountain March 17, 2022 19:10
Copy link
Contributor

@jeromeleecms jeromeleecms left a comment

Choose a reason for hiding this comment

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

Fixed the deployment issue with Mongo too!

@tbolt tbolt merged commit da98a26 into main Mar 21, 2022
@tbolt tbolt deleted the tforkner/3832-snyk-fix branch March 21, 2022 19:08
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.

[Ops] Research integrating Snyk into CI/CD process
6 participants