release: 4.1.0 - #90
Conversation
fix(client): mark some request bodies as optional
Note that we still want to run tests, as these depend on the metadata.
Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run.
…t in workflow templates
| - name: Get GitHub OIDC Token | ||
| if: |- | ||
| github.repository == 'stainless-sdks/brainbase-python' && | ||
| !startsWith(github.ref, 'refs/heads/stl/') |
There was a problem hiding this comment.
Fork code receives upload credentials
When a fork pull request targets the canonical repository, the build job checks out pull-request-controlled code before the repository-name guard mints an OIDC token and passes it to scripts/utils/upload-artifact.sh, allowing the author to exfiltrate the credential or publish arbitrary artifacts under the canonical repository identity.
How this was verified: The fork-enabled build path checks out the pull-request ref and passes the generated OIDC token to a script from that checkout.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 65-68
Comment:
**Fork code receives upload credentials**
When a fork pull request targets the canonical repository, the build job checks out pull-request-controlled code before the repository-name guard mints an OIDC token and passes it to `scripts/utils/upload-artifact.sh`, allowing the author to exfiltrate the credential or publish arbitrary artifacts under the canonical repository identity.
**How this was verified:** The fork-enabled build path checks out the pull-request ref and passes the generated OIDC token to a script from that checkout.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| @@ -0,0 +1,27 @@ | |||
| #!/usr/bin/env bash | |||
| set -exuo pipefail | |||
There was a problem hiding this comment.
Tracing exposes signed upload URLs
Enabling set -x causes Bash to write the expanded upload command, including SIGNED_URL, to the GitHub Actions log, exposing a temporary artifact-storage write capability to anyone with access to that log.
How this was verified: The script assigns the signed URL to SIGNED_URL and expands it in a curl command while shell tracing is enabled.
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/utils/upload-artifact.sh
Line: 2
Comment:
**Tracing exposes signed upload URLs**
Enabling `set -x` causes Bash to write the expanded upload command, including `SIGNED_URL`, to the GitHub Actions log, exposing a temporary artifact-storage write capability to anyone with access to that log.
**How this was verified:** The script assigns the signed URL to `SIGNED_URL` and expands it in a curl command while shell tracing is enabled.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Automated Release PR
4.1.0 (2026-08-13)
Full Changelog: v4.0.0...v4.1.0
Features
NotGivenfor body (#67) (3ad7f25)X-Stainless-Read-Timeoutheader (#63) (a594c75)Bug Fixes
model_dumpandmodel_dump_jsonfor Pydantic v1 (898ca7b)by_aliasunless set (887a8ec)Performance Improvements
Chores
httpx-aiohttpversion to 0.1.9 (7aeb4c8)actions/github-script(bdad5ed)api.mdfiles (034e708)--fixargument to lint script (0b1e68e)test_proxy_environment_variablesmore resilient (f79d30c)test_proxy_environment_variablesmore resilient to env (08e33e4)pyproject.tomlfile (f87b268)actions/checkoutversion (54d6bd9)get_platformtest (ef07d85)Documentation
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions
Greptile Summary
This release updates the generated SDK to 4.1.0, expanding HTTP backends, request serialization, streaming, model compatibility, API types, and supported Python versions. It also substantially revises CI and artifact-upload automation.
Confidence Score: 3/5
This PR is not safe to merge until fork pull requests are prevented from receiving and executing code with the canonical repository's artifact-upload credential.
The build job admits fork pull requests, checks out their code, then mints an OIDC token and passes it to a script from that checkout; the uploader additionally exposes signed upload URLs through shell tracing.
Files Needing Attention: .github/workflows/ci.yml and scripts/utils/upload-artifact.sh
Security Review
The build workflow permits fork pull-request code to run with a canonical-repository OIDC credential and artifact-upload path. The uploader also traces signed upload URLs into CI logs.
Important Files Changed
Sequence Diagram
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "release: 4.1.0" | Re-trigger Greptile