Main Merge Stable #29

Merged
Sirherobrine23 merged 10 commits from main into stable 2021-02-08 23:47:47 +00:00
No description provided.
ghost commented 2021-02-08 22:56:01 +00:00 (Migrated from github.com)
Author
Owner

DeepCode's analysis on #a79110 found:

  • ⚠️ 1 warning, ℹ️ 2 minor issues. 👇
  • ✔️ 1 issue was fixed.

Top issues

Description Example fixes
This endpoint handler performs a file system operation and does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit. Occurrences: 🔧 Example fixes
Use "utf8", which Node uses, instead of "utf-8" (in fs.readFileSync). Occurrences: 🔧 Example fixes
The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype. Occurrences: 🔧 Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

## DeepCode's analysis on [#a79110](https://www.deepcode.ai/app/gh/Bds-Maneger/bds_maneger_api/b55cd6c9ca3416b2e4bb920910a8351f1b11bfd9/Bds-Maneger/bds_maneger_api/a79110ecba6a0c32b3049b5005d0e264fdd608bf/pr/_/%2F/code/?utm_source=gh_review&c=0&w=1&i=2&) found: - :warning: **1** warning, :information_source: **2** minor issues. :point_down: - :heavy_check_mark: **1** issue was fixed. ## Top issues <table> <thead> <tr> <th align="left">Description</th> <th align="left">Example fixes</th> </tr> </thead> <tbody> <tr> <td width="77%">This endpoint handler performs a file system operation and does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit. Occurrences: <ul><li><a href="https://github.com/Bds-Maneger/bds_maneger_api/blob/a79110ecba6a0c32b3049b5005d0e264fdd608bf/API/log.js#L9">log.js:9</a></li></ul></td> <td width="23%"><a href="https://www.deepcode.ai/app/gh/Bds-Maneger/bds_maneger_api/b55cd6c9ca3416b2e4bb920910a8351f1b11bfd9/Bds-Maneger/bds_maneger_api/a79110ecba6a0c32b3049b5005d0e264fdd608bf/pr/_/%2FAPI%2Flog.js/javascript%2Fdc_interfile_project%2FNoRateLimitingForExpensiveWebOperation/code/?utm_source=gh_review&">:wrench: Example fixes</a></td> </tr> <tr> <td width="77%">Use "utf8", which Node uses, instead of "utf-8" (in fs.readFileSync). Occurrences: <ul><li><a href="https://github.com/Bds-Maneger/bds_maneger_api/blob/a79110ecba6a0c32b3049b5005d0e264fdd608bf/API/api.js#L60">api.js:60</a></li> <li><a href="https://github.com/Bds-Maneger/bds_maneger_api/blob/a79110ecba6a0c32b3049b5005d0e264fdd608bf/API/api.js#L94">api.js:94</a></li> <li><a href="https://github.com/Bds-Maneger/bds_maneger_api/blob/a79110ecba6a0c32b3049b5005d0e264fdd608bf/API/api.js#L118">api.js:118</a></li></ul></td> <td width="23%"><a href="https://www.deepcode.ai/app/gh/Bds-Maneger/bds_maneger_api/b55cd6c9ca3416b2e4bb920910a8351f1b11bfd9/Bds-Maneger/bds_maneger_api/a79110ecba6a0c32b3049b5005d0e264fdd608bf/pr/_/%2FAPI%2Fapi.js/javascript%2Fdc_interfile_project%2FUtf8Literal/code/?utm_source=gh_review&">:wrench: Example fixes</a></td> </tr> <tr> <td width="77%">The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype. Occurrences: <ul><li><a href="https://github.com/Bds-Maneger/bds_maneger_api/blob/a79110ecba6a0c32b3049b5005d0e264fdd608bf/API/api.js#L62">api.js:62</a></li> <li><a href="https://github.com/Bds-Maneger/bds_maneger_api/blob/a79110ecba6a0c32b3049b5005d0e264fdd608bf/API/api.js#L96">api.js:96</a></li> <li><a href="https://github.com/Bds-Maneger/bds_maneger_api/blob/a79110ecba6a0c32b3049b5005d0e264fdd608bf/API/api.js#L120">api.js:120</a></li></ul></td> <td width="23%"><a href="https://www.deepcode.ai/app/gh/Bds-Maneger/bds_maneger_api/b55cd6c9ca3416b2e4bb920910a8351f1b11bfd9/Bds-Maneger/bds_maneger_api/a79110ecba6a0c32b3049b5005d0e264fdd608bf/pr/_/%2FAPI%2Fapi.js/javascript%2Feslint%2Fguard-for-in/code/?utm_source=gh_review&">:wrench: Example fixes</a></td> </tr> </tbody> </table> #### 👉 View analysis in [**DeepCode’s Dashboard**](https://www.deepcode.ai/app/gh/Bds-Maneger/bds_maneger_api/b55cd6c9ca3416b2e4bb920910a8351f1b11bfd9/Bds-Maneger/bds_maneger_api/a79110ecba6a0c32b3049b5005d0e264fdd608bf/pr/_/%2F/code/?utm_source=gh_review&c=0&w=1&i=2&) | [_Configure the bot_](https://www.deepcode.ai/app/gh/?ownerconfig=Bds-Maneger)
lgtm-com[bot] commented 2021-02-08 22:59:40 +00:00 (Migrated from github.com)
Author
Owner

This pull request introduces 2 alerts and fixes 11 when merging a79110ecba into b55cd6c9ca - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class
  • 1 for Missing rate limiting

fixed alerts:

  • 7 for Unused variable, import, function or class
  • 1 for Variable not declared before use
  • 1 for Unneeded defensive code
  • 1 for Stored cross-site scripting
  • 1 for Reflected cross-site scripting
This pull request **introduces 2 alerts** and **fixes 11** when merging a79110ecba6a0c32b3049b5005d0e264fdd608bf into b55cd6c9ca3416b2e4bb920910a8351f1b11bfd9 - [view on LGTM.com](https://lgtm.com/projects/g/Bds-Maneger/bds_maneger_api/rev/pr-1810f45a55bd68fa95a3cd91f8d4fb73975d91b0) **new alerts:** * 1 for Unused variable, import, function or class * 1 for Missing rate limiting **fixed alerts:** * 7 for Unused variable, import, function or class * 1 for Variable not declared before use * 1 for Unneeded defensive code * 1 for Stored cross\-site scripting * 1 for Reflected cross\-site scripting
This repo is archived. You cannot comment on pull requests.
No Reviewers
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: go-bds/Maneger#29
No description provided.