Skip to content

Limitation of Naive Bayes Classifier in Pinpointing Vulnerabilities in JavaScript Files #9

@prayas7102

Description

@prayas7102

While utilizing the Naive Bayes classifier to detect brute force attacks, validate inputs, identify insecure authentication, and analyze security headers, the model is unable to pinpoint the exact line of code in the test JavaScript file where the vulnerability exists. This is unlike cases such as detecting callback hell or unsafe regex, where specific vulnerable lines can be identified.

Ouptut in case of detecting brute force attacks, validate inputs, identify insecure authentication, and analyze security headers:

image

image

image

Desired Output (in case of detecting callback hell, unsafe regex):

image

image

Files to be referred/altered for this change:

  1. DetectBruteForceAttack.ts
  2. DetectInputValidation.ts
  3. InsecureAuthentication.ts
  4. AnalyzeSecurityHeaders.ts

Make sure the end user/developer (who downloads the NPM package) is able to smoothly run the NPM package after these changes.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions