10000 gh-112302: Add Software Bill-of-Materials (SBOM) tracking for dependencies by sethmlarson · Pull Request #112303 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-112302: Add Software Bill-of-Materials (SBOM) tracking for dependencies #112303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 7, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Add trailing commas
  • Loading branch information
sethmlarson committed Dec 7, 2023
commit ab65fddfd8df5d80c8fc03b46904169f20568761
10 changes: 5 additions & 5 deletions Tools/build/generate_sbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class PackageFiles(typing.NamedTuple):
"Modules/_hacl/README.md",
"Modules/_hacl/python_hacl_namespace.h",
]
)
),
}


Expand All @@ -96,7 +96,7 @@ def filter_gitignored_paths(paths: list[str]) -> list[str]:
git_check_ignore_proc = subprocess.run(
["git", "check-ignore", "--verbose", "--non-matching", *paths],
check=False,
stdout=subprocess.PIPE
stdout=subprocess.PIPE,
)
# 1 means matches, 0 means no matches.
assert git_check_ignore_proc.returncode in (0, 1)
Expand Down Expand Up @@ -158,15 +158,15 @@ def main() -> None:
"fileName": path,
"checksums": [
{"algorithm": "SHA1", "checksumValue": checksum_sha1},
{"algorithm": "SHA256", "checksumValue": checksum_sha256}
]
{"algorithm": "SHA256", "checksumValue": checksum_sha256},
],
})

# Tie each file back to its respective package.
sbom_relationships.append({
"spdxElementId": package_spdx_id,
"relatedSpdxElement": file_spdx_id,
"relationshipType": "CONTAINS"
"relationshipType": "CONTAINS",
})

# Update the SBOM on disk
Expand Down
0