Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,12 +608,12 @@ def create_sbom_for_source_tarball(tarball_path: str) -> SBOM:
# Now we walk the tarball and compare known files to our expected checksums in the SBOM.
# All files that aren't already in the SBOM can be added as "CPython" files.
for member in tarball.getmembers():
if member.isdir(): # Skip directories!
if not member.isfile(): # Only keep files (no symlinks)
continue

# Get the member from the tarball. CPython prefixes all of its
# source code with 'Python-{version}/...'.
assert member.isfile() and member.name.startswith(f"Python-{cpython_version}/")
assert member.name.startswith(f"Python-{cpython_version}/")

# Calculate the hashes, either for comparison with a known value
# or to embed in the SBOM as a new file. SHA1 is only used because
Expand Down