cloudsec: request a repository SBOM with GET code/sbom?repo= - #399
Merged
Merged
Conversation
The SBOM export moves from a repository key embedded in the path (code/repos/<owner%2Fname>/sbom) to a repo query parameter on code/sbom. get_code_sbom and download_code_sbom keep their signatures; only the request they send changes. Also lists the no_sbom_for_this_repository reason in the docstring. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lcbill
previously approved these changes
Sep 25, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lcbill
approved these changes
Sep 25, 2026
Contributor
Author
|
Self-review (adversarial, from a pristine
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Code Security SBOM export route moves from a repository key in the path to a query parameter:
GET /v1/cloudsec/{oid}/code/repos/{owner%2Fname}/sbomGET /v1/cloudsec/{oid}/code/sbom?repo=<owner/name>[&provider=...]CloudSec.get_code_sbom()anddownload_code_sbom()keep their signatures, andlimacharlie cloudsec code sbomworks as before. Only the request they send changes. The docstring now also lists theno_sbom_for_this_repositoryreason.Compatibility window
The API gateway change that serves the new route is merged but not yet released to production. Until the next API release, production still serves only the old path, so this SDK's
code sbomgets a 404 there. The old route has no known users, so this short window is accepted. Nothing else in the SDK is affected.Tests
test_get_code_sbom_sends_the_key_as_a_query_value: the request goes tocode/sbomwithrepoas a query value.test_get_code_sbom_provider: a nested GitLab-style key plusproviderare both sent as query values.pytest tests/unit/ tests/microbenchmarks/: 4572 passed. The 5 skips are unrelated to this change (platform-only tests, plus two docstring checks that were already skipped).🤖 Generated with Claude Code