This is the source of the potentially untrusted data. Sboxr recognizes the following as the sources:
User Input: Data read from Input boxes
URL based DOM Properties: DOM properties like location.href which have the value of the page's URL
Navigation based DOM Properties: DOM properties like window.name and document.referrer whose value is set in the previous page
Communication based sources:
Ajax response: this includes both same-origin and cross-origin responses to XMLHttpRequest and Fetch APIs
WebSocket messages: the data received from both cross-origin and same-origin WebSocket connections
Cross-Window messages: the data received from both cross-origin and same-origin windows/iframes that were sent via the postMessage API
Storage based sources: data read from the following client-side data stores:
Some of these data sources are more likely to be controlled by an attacker than others. The issues are rated based on that.
URL based DOM properties and Navigation based DOM properties have a high likelihood of being controlled by an attacker and so are rated as Errors.
User Input requires some social engineering to be controlled by an attacker so it is rated as Warning.
Communication based sources are rated based on whether they are from the same origin or from external origin. And also on the format of the data, this is explained in the Data Format section below.
Data from external origins or cross-origin data is more dangerous as it is from another entity and can be considered as malicious as it is not controlled by the application owner. Data from the same origin can also be attacker controlled depending on the application's logic. If the application accepts data from untrusted sources, including user input, and stores it in its database and then sends it to the client via a communication channel then it will be considered as untrusted even though it comes from same origin.
Data stored in DOM stores can be attacker controlled depending on the application's logic, in case the application takes untrusted data and then stores it in the DOM stores. In other cases, data from the DOM stores can be considered as untrusted if the user is on a shared system, in this case another user can pollute the DOM store with malicious data. In some cases an attacker can make use of a reflected XSS and pollute the DOM store to turn it in to a persistent XSS.