Skip to content

Commit 9e6f98f

Browse files
committed
chore: update outdated comment for build artifact extraction function
1 parent 6f948e6 commit 9e6f98f

File tree

1 file changed

+5
-5
lines changed
  • src/macaron/slsa_analyzer/provenance/witness

1 file changed

+5
-5
lines changed

src/macaron/slsa_analyzer/provenance/witness/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,20 @@ def extract_repo_url(witness_payload: InTotoPayload) -> str | None:
122122

123123

124124
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.
126129
127130
Parameters
128131
----------
129132
witness_payload : InTotoPayload
130133
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.
134134
135135
Returns
136136
-------
137137
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.
139139
"""
140140
if not isinstance(witness_payload, InTotoV01Payload):
141141
return []

0 commit comments

Comments
 (0)