Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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