Skip to content

Decorator Customisation for Script Sanitisation #309

Description

@chrisjamesconnor

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..)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions