Open hmstepanek opened 2 years ago
Hi @hmstepanek , I'm new to pixie and I wanna work on this issue. The requirement looks clear to me, can you point me to the source files that handle http requests and sql queries, also where can we have the UDF - regex filter ?
Is this a valid issue ? If so, can you help me on this @htroisi
Hi @hmstepanek , I'm new to pixie and I wanna work on this issue. The requirement looks clear to me, can you point me to the source files that handle http requests and sql queries, also where can we have the UDF - regex filter ?
Hey @srinathkp - This is still a valid issue. It looks like there was a previous pull request to implement this feature, but I don't have the context on why that PR was closed. If you're interested in working on it we'd be happy to review a PR. Before contributing, be sure to checkout our guidelines in CONTRIBUTING.md.
In order to identify reflected and stored Cross Site Scripting (XSS) attacks inside HTTP requests and SQL queries we need to implement a UDF that returns whether or not the input string contains a XSS attack.
Describe the solution you'd like Implement a UDF that takes a string as input. It should test this string against a list of regular expressions and return on the first match, a string indicating what regex rule matched that identifies it as a XSS attack. If none of the regular expressions match, it should return an empty string indicating it was not a XSS attack. This function would be called as part of a PxL script that passes it both HTTP request and response data as well as SQL query data.
Regular expression rules:
Sudo code:
Describe alternatives you've considered One alternative is to use a generic UDF that takes in a list of regular expression rules as opposed to making this function XSS specific and hard coding the regex rules inside it.