Skip to content

Commit 0647d9a

Browse files
feat(api): add audit_only field to executable_deny_list and veto
1 parent 3245fad commit 0647d9a

File tree

10 files changed

+38
-3
lines changed

10 files changed

+38
-3
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 175
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-6bfb10e82813fa3415f7ce350424221418b6fde16c3ec547c64ad46b68947277.yml
3-
openapi_spec_hash: dea4ce60942cfbc15257e7c5dd57ee54
4-
config_hash: 318f17b933356b2580853e0380080816
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-cf6d772062952a074c6487c7c272a8dda20a65e238fae2d3163de9b6f4258ae2.yml
3+
openapi_spec_hash: bc02a056a6ab611247ddacc41e4b98a5
4+
config_hash: 3a29593d2be08d2e9e818d2ac66ef562

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ from gitpod.types.organizations import (
455455
AgentPolicy,
456456
CrowdStrikeConfig,
457457
ExecutableDenyList,
458+
KernelControlsAction,
458459
OrganizationPolicies,
459460
SecurityAgentPolicy,
460461
PolicyRetrieveResponse,

src/gitpod/types/organizations/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from .custom_domain_provider import CustomDomainProvider as CustomDomainProvider
2020
from .invite_create_response import InviteCreateResponse as InviteCreateResponse
2121
from .invite_retrieve_params import InviteRetrieveParams as InviteRetrieveParams
22+
from .kernel_controls_action import KernelControlsAction as KernelControlsAction
2223
from .policy_retrieve_params import PolicyRetrieveParams as PolicyRetrieveParams
2324
from .sso_configuration_state import SSOConfigurationState as SSOConfigurationState
2425
from .invite_retrieve_response import InviteRetrieveResponse as InviteRetrieveResponse

src/gitpod/types/organizations/executable_deny_list.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import List, Optional
44

55
from ..._models import BaseModel
6+
from .kernel_controls_action import KernelControlsAction
67

78
__all__ = ["ExecutableDenyList"]
89

@@ -12,6 +13,9 @@ class ExecutableDenyList(BaseModel):
1213
ExecutableDenyList contains executables that are blocked from execution in environments.
1314
"""
1415

16+
action: Optional[KernelControlsAction] = None
17+
"""action specifies what action kernel-level controls take on policy violations"""
18+
1519
enabled: Optional[bool] = None
1620
"""enabled controls whether executable blocking is active"""
1721

src/gitpod/types/organizations/executable_deny_list_param.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing_extensions import TypedDict
66

77
from ..._types import SequenceNotStr
8+
from .kernel_controls_action import KernelControlsAction
89

910
__all__ = ["ExecutableDenyListParam"]
1011

@@ -14,6 +15,9 @@ class ExecutableDenyListParam(TypedDict, total=False):
1415
ExecutableDenyList contains executables that are blocked from execution in environments.
1516
"""
1617

18+
action: KernelControlsAction
19+
"""action specifies what action kernel-level controls take on policy violations"""
20+
1721
enabled: bool
1822
"""enabled controls whether executable blocking is active"""
1923

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal, TypeAlias
4+
5+
__all__ = ["KernelControlsAction"]
6+
7+
KernelControlsAction: TypeAlias = Literal[
8+
"KERNEL_CONTROLS_ACTION_UNSPECIFIED", "KERNEL_CONTROLS_ACTION_BLOCK", "KERNEL_CONTROLS_ACTION_AUDIT"
9+
]

src/gitpod/types/veto.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
from typing import List, Optional
44

55
from .._models import BaseModel
6+
from .organizations.kernel_controls_action import KernelControlsAction
67

78
__all__ = ["Veto", "Exec"]
89

910

1011
class Exec(BaseModel):
1112
"""exec controls executable blocking"""
1213

14+
action: Optional[KernelControlsAction] = None
15+
"""action specifies what action kernel-level controls take on policy violations"""
16+
1317
denylist: Optional[List[str]] = None
1418
"""denylist is the list of executable paths or names to block"""
1519

src/gitpod/types/veto_param.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
from typing_extensions import TypedDict
66

77
from .._types import SequenceNotStr
8+
from .organizations.kernel_controls_action import KernelControlsAction
89

910
__all__ = ["VetoParam", "Exec"]
1011

1112

1213
class Exec(TypedDict, total=False):
1314
"""exec controls executable blocking"""
1415

16+
action: KernelControlsAction
17+
"""action specifies what action kernel-level controls take on policy violations"""
18+
1519
denylist: SequenceNotStr[str]
1620
"""denylist is the list of executable paths or names to block"""
1721

tests/api_resources/organizations/test_policies.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
7979
delete_archived_environments_after="+9125115.360s",
8080
editor_version_restrictions={"foo": {"allowed_versions": ["string"]}},
8181
executable_deny_list={
82+
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
8283
"enabled": True,
8384
"executables": ["string"],
8485
},
@@ -195,6 +196,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
195196
delete_archived_environments_after="+9125115.360s",
196197
editor_version_restrictions={"foo": {"allowed_versions": ["string"]}},
197198
executable_deny_list={
199+
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
198200
"enabled": True,
199201
"executables": ["string"],
200202
},

tests/api_resources/test_environments.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None:
8383
"kernel_controls_config": {
8484
"veto": {
8585
"exec": {
86+
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
8687
"denylist": ["string"],
8788
"enabled": True,
8889
}
@@ -227,6 +228,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
227228
"kernel_controls_config": {
228229
"veto": {
229230
"exec": {
231+
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
230232
"denylist": ["string"],
231233
"enabled": True,
232234
}
@@ -453,6 +455,7 @@ def test_method_create_from_project_with_all_params(self, client: Gitpod) -> Non
453455
"kernel_controls_config": {
454456
"veto": {
455457
"exec": {
458+
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
456459
"denylist": ["string"],
457460
"enabled": True,
458461
}
@@ -767,6 +770,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) ->
767770
"kernel_controls_config": {
768771
"veto": {
769772
"exec": {
773+
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
770774
"denylist": ["string"],
771775
"enabled": True,
772776
}
@@ -911,6 +915,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
911915
"kernel_controls_config": {
912916
"veto": {
913917
"exec": {
918+
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
914919
"denylist": ["string"],
915920
"enabled": True,
916921
}
@@ -1137,6 +1142,7 @@ async def test_method_create_from_project_with_all_params(self, async_client: As
11371142
"kernel_controls_config": {
11381143
"veto": {
11391144
"exec": {
1145+
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
11401146
"denylist": ["string"],
11411147
"enabled": True,
11421148
}

0 commit comments

Comments
 (0)