ASVS icon indicating copy to clipboard operation
ASVS copied to clipboard

new requirement for data process transaction / integrity

Open elarlang opened this issue 3 years ago • 4 comments

I think we miss requirement to verify, that on data changes related data must be in transaction, if some step fails, you need to rollback previous step as well.

elarlang avatar Jan 14 '22 07:01 elarlang

How would we do this? It would assume there is some state table to compare to, or is it even simpler than that?

danielcuthbert avatar Jan 16 '22 14:01 danielcuthbert

Let's say you make 3 SQL commands to insert data and 3rd one fails, then you must rollback 2 previous ones, otherwise it's incorrect integrity.

elarlang avatar Jan 17 '22 11:01 elarlang

2 ways how to look it:

  • V11.1 business logic requirement - if some step is failing, need to cancel previous ones as well
  • V8.1 data protection/integrity requirement

elarlang avatar Apr 20 '22 08:04 elarlang

I completely agree. I think we need to refer to the need for "atomic transaction" where either all steps succeed or all steps fail.

@elarlang do you think we need two requirements or is 1 sufficient?

tghosth avatar Apr 27 '22 07:04 tghosth

What would be the 2nd one?

elarlang avatar Nov 10 '22 18:11 elarlang

@elarlang I mean do we need one in data protection and one in business logic or is one in business logic sufficient?

tghosth avatar Jul 10 '23 15:07 tghosth

Re-analyzing the situation - it think category "V8 Data protection" is more protecting already existing data (from leaking) and more confidentiality oriented. So the direction should be "V11 business logic" and data integrity - if one step fails, nothing goes in (everything is rolled back) to avoid partial data.

elarlang avatar Jul 17 '23 08:07 elarlang

Ok @elarlang, so how about:

# Description L1 L2 L3 CWE
11.1.9 [ADDED] Verify that "atomic transactions" are being used at the business logic level such that either a business logic operation succeeds in its entirety, or it is rolled back to the previous correct state. ?

Do you have a CWE and what level do you suggest?

tghosth avatar Aug 06 '23 09:08 tghosth

I tried again to find suitable CWE but did not find. My logic says that this is co common and basic problem in software and it means there should be some CWE for that, but I can not hit correct words to find it.

Can we move forward with blank CWE?

elarlang avatar Sep 20 '23 11:09 elarlang

Yeah let's do that in the interests of moving forward

tghosth avatar Sep 21 '23 13:09 tghosth

Opened #1727 to resolve this

tghosth avatar Sep 21 '23 13:09 tghosth