Comments (2)
From what I can tell, this rule is behaving as expected and the documentation needs updating. It currently flags any function call for which an argument in the form object[key]
is passed. An assignment isn't necessary, especially because, in your case, foo
is being read from the environment.
from eslint-plugin-security.
@nzakas THX but can you explain a bit more clearly why the assignment isn't necessary?
I don't understand that why the obj[foo]
would cause harm even though foo
is "construct"
or other special string.
Okay, I get it. The document should therefore be updated to include these scenarios.
from eslint-plugin-security.
Related Issues (20)
- docs: maybe an error in the-dangers-of-square-bracket-notation HOT 1
- Bug: object injection not detected HOT 2
- A Suggestion for the Docs HOT 2
- New Rule: Detect invisible characters
- New Rule: disallow unicode confusable identifiers HOT 4
- Bug: `security/detect-non-literal-regexp` should ignore `escapeStringRegexp()` HOT 1
- Bug: `security/detect-object-injection` should be ignored when property is switch case discriminant. HOT 2
- `security/detect-object-injection` false alarm on type safe key HOT 5
- Rule Change: (fill in) HOT 2
- Bug: Crashes ESLint due to circular reference in config HOT 4
- Bug: Converting circular structure to JSON when running eslint HOT 2
- Upgrade causes obscure error HOT 4
- Bug: Configuration using JSON eslintrc file HOT 2
- Bug: security/detect-eval-with-expression - "TypeError: Cannot read properties of undefined (reading: 'type') HOT 6
- Add support for flat config and types HOT 1
- ESLint v9 compatibility (TypeError: context.getScope is not a function) HOT 8
- Bug: (fill in) HOT 1
- Does This Plugin Support TypeScript? HOT 5
- Bug: no type definitions for eslint flat config HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-security.