No description for ESLint rule security/detect-new-buffer
Summary
When running the ESLint analyzer, I found this error in the log output:
No description for ESLint rule security/detect-new-buffer. Please open an issue on https://gitlab.com/gitlab-org/gitlab-ee/issues
This is possibly a regression of #10702 (closed)
Steps to reproduce
- Create a .js file with this content
function test(input) {
return new Buffer(input)
}
- Scan it with the eslint analyzer
- Error appears in logs:
No description for ESLint rule security/detect-new-buffer. Please open an issue on https://gitlab.com/gitlab-org/gitlab-ee/issues
Example Project
https://gitlab.com/williams.brian-heb/eslint-new-buffer
What is the current behavior?
What is the bug behavior / expected correct behavior?
I'm not sure, but the error message seems to indicate that a change is needed and a bug should be filed
If issues shouldn't actually be filed for this, then the log output should be changed.
Relevant logs and/or screenshots
https://gitlab.com/williams.brian-heb/eslint-new-buffer/-/jobs/733693042
Running with gitlab-runner 13.4.0-rc1 (fd488787)
on docker-auto-scale 0277ea0f
Preparing the "docker+machine" executor
00:16
Using Docker executor with image registry.gitlab.com/gitlab-org/security-products/analyzers/eslint:2 ...
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/gitlab-org/security-products/analyzers/eslint:2 ...
Using docker image sha256:3dccd5ad0d4ed63659bc2f21b2b0ef29e91be579b78a0720e62984976df0f861 for registry.gitlab.com/gitlab-org/security-products/analyzers/eslint:2 with digest registry.gitlab.com/gitlab-org/security-products/analyzers/eslint@sha256:749aed10d87c9f70fd36a757eba8aaa70bd34800fd052d77044c0ace691c2dee ...
Preparing environment
00:03
Running on runner-0277ea0f-project-21079188-concurrent-0 via runner-0277ea0f-srm-1599838862-60874b30...
Getting source from Git repository
00:03
$ eval "$CI_PRE_CLONE_SCRIPT"
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/williams.brian-heb/eslint-new-buffer/.git/
Created fresh repository.
Checking out 9c783fa2 as master...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:02
$ /analyzer run
[INFO] [ESLint] [2020-09-11T15:42:09Z] ▶ GitLab ESLint analyzer v2.8.0
[INFO] [ESLint] [2020-09-11T15:42:09Z] ▶ Detecting project
[INFO] [ESLint] [2020-09-11T15:42:09Z] ▶ Found project in /builds/williams.brian-heb/eslint-new-buffer
[INFO] [ESLint] [2020-09-11T15:42:09Z] ▶ Running analyzer
[DEBU] [ESLint] [2020-09-11T15:42:10Z] ▶ /home/node/node_modules/.bin/eslint -c /home/node/.eslintrc --no-eslintrc --ext .html,.js,.jsx,.ts,.tsx -f json . --resolve-plugins-relative-to /home/node
[{"filePath":"/builds/williams.brian-heb/eslint-new-buffer/main.js","messages":[{"ruleId":"security/detect-new-buffer","severity":1,"message":"Found new Buffer","line":2,"column":10,"nodeType":"NewExpression","endLine":2,"endColumn":27}],"errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"function test(input) {\n return new Buffer(input)\n}\n","usedDeprecatedRules":[]}]
[INFO] [ESLint] [2020-09-11T15:42:10Z] ▶ Making paths relative
[INFO] [ESLint] [2020-09-11T15:42:10Z] ▶ Creating report
[ERRO] [ESLint] [2020-09-11T15:42:10Z] ▶ No description for ESLint rule security/detect-new-buffer. Please open an issue on https://gitlab.com/gitlab-org/gitlab-ee/issues
Uploading artifacts for successful job
00:01
Uploading artifacts...
gl-sast-report.json: found 1 matching files and directories
Uploading artifacts as "sast" to coordinator... ok id=733693042 responseStatus=201 Created token=iGx_KWdU
Job succeeded
Output of checks
This bug happens on GitLab.com
Possible fixes
Edited by Brian Williams