in-toto / in-toto/specification

Revisit artifact rule path patterns

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
54
Forks
27
PR merge metrics
No merged PRs in 30d

Description

**Description of issue:**:
Rethink the behavior of artifact rule path pattern filtering, especially if no artifacts are filtered by the pattern.

**Current behavior**:
All artifact rules take a `pattern` argument that is used to filter artifacts reported by a link.
If the pattern does not filter any artifacts the rules as practically not applied.

This issue was already pointed out in the discussion in https://github.com/in-toto/in-toto/issues/43 and is also described in the docstrings of the artifact rules verification functions, e.g. for the `MATCH` rule:
https://github.com/in-toto/in-toto/blob/0beaf5b131b5860e8bf0bb059c9f97a0736851b2/in_toto/verifylib.py#L451-L461

**Expected behavior**:
Expected behavior is open for discussion. My suggestions:
- each pattern must match at least one artifact
- extend the rule syntax to indicate if the pattern can/must match `?`, `+`, `*` artifact(s) (c.f. glob characters)

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the artifact-rule path-pattern description and the MATCH verification docstrings in in_toto/verifylib.py, along with the discussion in issue 43. Decide whether unmatched patterns must fail or whether the syntax should express ?, +, and * matching; done means the specification clearly defines the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.