security: fix SSRF, file size DoS, PermissionError shadowing, and CI/CD supply chain gaps#19
Draft
security: fix SSRF, file size DoS, PermissionError shadowing, and CI/CD supply chain gaps#19
Conversation
…CD supply chain gaps Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix SSRF risk in custom baseUrl handling
security: fix SSRF, file size DoS, PermissionError shadowing, and CI/CD supply chain gaps
Mar 1, 2026
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.
Four medium-severity security issues across both SDKs and the release pipeline. Changes add URL validation, file size limits, fix a Python built-in name collision, and harden the release workflow.
SSRF —
baseUrl/base_urlvalidationBoth constructors now reject unsafe URLs before any requests are made:
http://, etc.)localhost,127.0.0.1,::1,0.0.0.0)10.x,172.16–31.x,192.168.x,169.254.x(covers AWS metadata endpoint)File size DoS — configurable
maxFileSize/max_file_sizeAdded to
CaptureOptions(default 100 MB). For file paths,stat()is checked before reading; forFile/Blob,.sizeis used; forBuffer/bytes, byte length is checked. Applied in bothregister()andsearchAsset().Python
PermissionError→ForbiddenErrorThe SDK's
PermissionErrorshadowed Python's built-in (OSErrorsubclass), causing confusingexcept PermissionErrorbehavior in user code. Renamed toForbiddenError;PermissionError = ForbiddenErroralias retained for backwards compatibility.ForbiddenErroris now exported from__init__.py.CI/CD supply chain hardening (
release.yml)testjob runsnpm test+pytestbefore publish; bothpublish-npmandpublish-pypinow depend on[validate, test].softprops/action-gh-release@v1→ pinned to commit SHAde2c0eb89ae2a093876385947365aca7b0e5f844..tgzand Pythondist/*are computed and included in the GitHub release body.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.