Access Specifier Manipulation issue reported by Fortify in Struts 1.x

Ash April 2, 2019

Hello,

Need help to resolve A6 Security Misconfiguration issue reported by fortify tool.

Detail below:

ProductTypeDetails2.java, line 130 (Access Specifier Manipulation)

The call to method setAccessible() on line 130 changes an access specifier.

128 //
System.out.println("oSuperFields["+i+"].isAccessible()="+oSuperFields[i].isAccessible(
));
129 if(!oSuperFields[i].isAccessible())
130 oSuperFields[i].setAccessible(true);
131 oSuperFieldObj = oSuperFields[i].get(this);
132 } catch (IllegalAccessException e) {

The method holding above code snippet is "Private"

Please provide suitable solution if any. Thanks in advance. :) 

2 answers

0 votes
Saoji Adhe February 23, 2021

If you use Spring, you can use ReflectionUtils.makeAccessible(field) to make that field accessible. Fortify does not complain about this 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 2019

Upgrade to a version of Jira that no longer uses struts (it has not for quite a while!)

Suggest an answer

Log in or Sign up to answer