File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/macaron/slsa_analyzer/provenance/witness Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -122,20 +122,20 @@ def extract_repo_url(witness_payload: InTotoPayload) -> str | None:
122
122
123
123
124
124
def extract_build_artifacts_from_witness_subjects (witness_payload : InTotoPayload ) -> list [InTotoV01Subject ]:
125
- """Read the ``"subjects"`` field of the provenance to obtain the hash digests of each subject.
125
+ """Extract subjects that are build artifacts from the ``"subject"`` field of the provenance.
126
+
127
+ Each artifact subject is assumed to have a sha256 digest. If a sha256 digest is not present for
128
+ a subject, that subject is ignored.
126
129
127
130
Parameters
128
131
----------
129
132
witness_payload : InTotoPayload
130
133
The witness provenance payload.
131
- extensions : list[str]
132
- The allowed extensions of the subjects.
133
- All subjects with names not ending in these extensions are ignored.
134
134
135
135
Returns
136
136
-------
137
137
list[InTotoV01Subject]
138
- A dictionary in which each key is a subject name and each value is the corresponding SHA256 digest .
138
+ A list subjects in the ``" subject"`` field of the provenance that are build artifacts .
139
139
"""
140
140
if not isinstance (witness_payload , InTotoV01Payload ):
141
141
return []
You can’t perform that action at this time.
0 commit comments