File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ Versions follow [Semantic Versioning](https://semver.org/).
1717
1818## [ Unreleased]
1919
20+ ### Fixed
21+
22+ - Redact plaintext sandbox access tokens from response representations to
23+ prevent accidental disclosure in logs.
24+
2025### Changed
2126
2227- Set the next package version to ` 0.1.3 ` on the patch release line.
Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ class Sandbox(Model):
592592class SandboxAccessTokenCreateResponse (Model ):
593593 """Plaintext delegated token returned only on creation or rotation."""
594594
595- token : str
595+ token : str = field ( repr = False )
596596 enabled : bool
597597 created_at : datetime
598598 rotated_at : datetime | None = None
Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ def handler(request):
8282 sandbox = client .get_sandbox ("sb-1" )
8383 created = sandbox .create_access_token ()
8484 assert created .token == "skp_sb_first" and created .created_at .year == 2026
85+ assert created .token not in repr (created )
86+ assert "enabled=True" in repr (created )
8587 assert sandbox .get_access_token ().token_hint == "skp_sb...irst"
8688 worker = sandbox .with_access_token (created .token )
8789 assert worker is not sandbox and worker .files is not sandbox .files
You can’t perform that action at this time.
0 commit comments