, , ,

Manage transactions when changing tables

·

[vc_row][vc_column width=”1/1″][vc_tta_tabs][vc_tta_section title=”JSP” tab_id=”1678173447076-3e1e0e09-d1f0″][vc_row_inner][vc_column_inner width=”1/2″][vc_btn title=”Software Resiliency” style=”flat” color=”juicy-pink” link=”url:https%3A%2F%2Fdoc.casthighlight.com%2Fsoftware-resiliency%2F|||”][vc_btn title=”Code Reliability” style=”flat” color=”black” link=”url:https%3A%2F%2Fdoc.casthighlight.com%2Fcategory%2Fproduct%2Findicators-methodology%2Fcode-insights%2Fsoftware-resiliency%2Fcode-reliability%2F|||”][vc_column_text]

Why you should care

[/vc_column_text][vc_column_text]Every Servlet or JSP exposed to the Internet represents another attack surface and potential failure point. The best solution is to expose only what’s necessary under the most restrictive conditions that make sense.

It is common to think that internal web applications are deployed where they can only be accessed from trusted users. But in reality you can often find situations where the security policy needs to change, for example the ports or the source address to access to the web server might change or the mix of security policy and Network Address Translation policy open an unwanted address, port

A JSP application is not secured if the web.xml that doesn’t match the following conditions:
* Existence of node: security-constraint/web-resource-collection/url-pattern
* Existence of node: security-constraint/auth-constraint in the same node than the previous security-constraint node
* the url-pattern defined in security-constraint/web-resource-collection/url-pattern match at least one JSP page or a Servlet[/vc_column_text][vc_column_text]

CAST Recommendations

[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/2″][vc_column_text]

References

https://docs.oracle.com/cd/E19798-01/821-1841/bncbk/index.html[/vc_column_text][/vc_column_inner][/vc_row_inner][vc_row_inner][vc_column_inner][vc_column_text]

How we detect

[/vc_column_text][vc_column_text]This code insight counts one occurrence if the web.xml file does not contain a <security-constraint> OR if this tag does not contain both following items :

a <web-resource-collection><url-pattern> node .
an <auth-constraint> node.

Note : the web.xml file can contain several <security-constraint> tags. There is no violation for the rule if at least one of them is compliant with the above.[/vc_column_text][/vc_column_inner][/vc_row_inner][vc_empty_space height=”16px”][/vc_tta_section][vc_tta_section title=”SQL” tab_id=”1678185388731-23b3a295-9871″][vc_row_inner][vc_column_inner width=”1/2″][vc_btn title=”Software Resiliency” style=”flat” color=”juicy-pink” link=”url:https%3A%2F%2Fdoc.casthighlight.com%2Fsoftware-resiliency%2F|||”][vc_btn title=”Code Reliability” style=”flat” color=”black” link=”url:https%3A%2F%2Fdoc.casthighlight.com%2Fcategory%2Fproduct%2Findicators-methodology%2Fcode-insights%2Fsoftware-resiliency%2Fcode-reliability%2F|||”][vc_column_text]

Why you should care

[/vc_column_text][vc_column_text]Transactions are vital in SQL as one of them is the representation of one or more changes to the database. For instance, anytime a record is created, updated or deleted in the database, a transaction is performed in that database.

Therefore, it is recommended to manage transactions as they ensure data integrity and handle database errors as well.[/vc_column_text][vc_column_text]

CAST Recommendations

[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/2″][vc_column_text]

Business Impacts

When involving transactions, it is important to note that the risks involved can hamper productivity since losing transactions is equivalent to losing records requiring the code to be rewritten. Loss of Productivity results in loss of time causing unsatisfactory work.
[/vc_column_text][vc_column_text]

References

https://www.tutorialspoint.com/sql/sql-transactions.htm[/vc_column_text][/vc_column_inner][/vc_row_inner][vc_row_inner][vc_column_inner][vc_column_text]

How we detect

[/vc_column_text][vc_column_text]

This code insight manages transactions with Functions and Procedures when a table is inserted, updated or deleted.

[/vc_column_text][/vc_column_inner][/vc_row_inner][vc_empty_space height=”16px”][/vc_tta_section][/vc_tta_tabs][vc_empty_space height=”16px”][vc_row_inner][vc_column_inner][vc_single_image image=”5362″ img_size=”full”][vc_column_text]

About CAST and Highlight’s Code Insights

Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.

[/vc_column_text][vc_empty_space height=”16px”][nz_btn text=”See features” link=”http://casthighlight.wpengine.com/outputs-analytics/” icon=”icon-stats” color=”black” shape=”rounded”][nz_btn text=”How it works” link=”http://casthighlight.wpengine.com/how-it-works/” icon=”icon-cog” color=”black” shape=”rounded” type=”ghost”][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row]


Leave a Reply

Your email address will not be published. Required fields are marked *