From 11aa57914dc9a3fb93db3579ddc4a0eab2fc8af2 Mon Sep 17 00:00:00 2001 From: GG-HH <59922662+GG-HH@users.noreply.github.com> Date: Tue, 30 Sep 2025 17:38:10 +0200 Subject: [PATCH] fix(scopes): add missing existing scope Scope can be defined but is lot listed here, leading to tokens with this permission to fail --- ...50930_174242_henri.hubert_GG_HH_patch_1.md | 41 +++++++++++++++++++ pygitguardian/models.py | 1 + 2 files changed, 42 insertions(+) create mode 100644 changelog.d/20250930_174242_henri.hubert_GG_HH_patch_1.md diff --git a/changelog.d/20250930_174242_henri.hubert_GG_HH_patch_1.md b/changelog.d/20250930_174242_henri.hubert_GG_HH_patch_1.md new file mode 100644 index 00000000..5bbed312 --- /dev/null +++ b/changelog.d/20250930_174242_henri.hubert_GG_HH_patch_1.md @@ -0,0 +1,41 @@ + + + + + + + +### Fixed + +- Missing scope leading to validation errors + + diff --git a/pygitguardian/models.py b/pygitguardian/models.py index 400d9df3..c33f9ac1 100644 --- a/pygitguardian/models.py +++ b/pygitguardian/models.py @@ -772,6 +772,7 @@ class TokenScope(str, Enum): CUSTOM_TAGS_WRITE = "custom_tags:write" SECRET_READ = "secrets:read" SCAN_CREATE_INCIDENTS = "scan:create-incidents" + PUBLIC_PERIMETER_VIEW = "public-perimeter:read" class APITokensResponseSchema(BaseSchema):