Skip to content
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

Decorator Customisation for Script Sanitisation #309

Open
chrisjamesconnor opened this issue Mar 25, 2021 · 0 comments
Open

Decorator Customisation for Script Sanitisation #309

chrisjamesconnor opened this issue Mar 25, 2021 · 0 comments

Comments

@chrisjamesconnor
Copy link

Guys - is there a way to customise the Decorator autogenerated. In veracode we are getting the following highlighted in the autogenerated decorator.

CW Improper neutralization of script-related html tags

Basically we need to neutralization the tags in a manner such as

StringEscapeUtils.escapeHtml(exposedField)

for all the arguments on the autogenerated message

so current behaviour is

return this.myDelegate.getStuff(exposedField1, exposedField2)

need this

return this.myDelegate.getStuff(StringEscapeUtils.escapeHtml(exposedField1), StringEscapeUtils.escapeHtml(exposedField2))

Would appreciate any advice - would have thought this issue to be very common (especially in large corporate organisations)
Ideally a flag I suppose to switch this on/off (toggle the behaviour above..)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant