CacheControl / CacheControl/json-rules-engine
OnSuccess/OnFailure properties as part of the rule - Security Issue
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
There are 2 properties like Onsuccess and Onfailure property which can be a javascript function delegate and it is part of the rule right?
onSuccess: function(event,almanac) { console.log('hello success') },
onFailure : function(event,almanac) { alert('hello failed') }
Is it safe to store this as part of the rule in the database. Because the rule comes from the server to the client this script can be tampered by the hacker and we would end up executing a malicious script. Is that right?
Or Is my understanding wrong? Please confirm
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the onSuccess and onFailure function properties enter a rule, move from the server to the client, and are executed. Review the rule-storage and client-execution entry points to determine the security boundary; done means documenting whether this behavior is safe and what handling guidance applies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- security
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100