in-toto / specification

Specification and other related documents.
https://in-toto.io
MIT License
40 stars 26 forks source link

Problem with conflicting rules #41

Open SolidifiedRay opened 4 years ago

SolidifiedRay commented 4 years ago

This is a problem that @lukpueh points out in the in-toto/layout-web-tool#49 (comment):

Here is an example of a material rule:

[
  ['MATCH', 'foo.txt', 'WITH', 'PRODUCTS', 'FROM', 'previous_step'],
  ['DELETE', 'foo.txt'],
  ['DISALLOW', '*']
]

Because we apply both MATCH rule and DELETE rule on the artifact, foo.txt, the first MATCH rule makes the subsequent DELETE rule moot. However, both MATCH rule and DELETE rule here are meaningful. We need MATCH rule to guarantee the integrity of artifacts between steps. We also need DELETE rule to guarantee that deleted artifacts don't appear as products of this step.