-
-
Notifications
You must be signed in to change notification settings - Fork 206
Restrict the type of values that can be posted #1879
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
Conversation
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
@bandhan-majumder can you test this and make sure we have not broken any legitimate functionality? |
I tested with all the possible options, it's working fine. |
How to find such vulnerabilities with cdxgen and atom: docker run --rm -v /tmp:/tmp -v $HOME:$HOME -v $(pwd):/app:rw -it ghcr.io/appthreat/chen chennai
atom.method("safeSpawnSync").call.argument.df(atom.tag("framework-input").call.argument).t Example of a vulnerable flow: Example of a mitigated flow: |
test("parseValue tests", () => { | ||
expect(parseValue("foo")).toEqual("foo"); | ||
expect(parseValue(1)).toEqual(1); | ||
expect(parseValue("true")).toEqual(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test for boolean values here.
@bandhan-majumder we both missed a test for boolean which got fixed by a contributor here. Could you kindly send a PR to add boolean unit tests in |
The idea is to cut down on injection possibilities.