Skip to content

Commit 110c2ef

Browse files
feat(api): add ExecutableDenyList to environment and organization policy
1 parent 71e660d commit 110c2ef

18 files changed

+229
-4
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: 172
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-51659fa76fd9f1e88225f9cf97af0e2ebf5a675728618460693d7456c281f9a7.yml
3-
openapi_spec_hash: 84d0520cf93175c6993b93c8d3be2677
4-
config_hash: 2b9740817f5ef36649d603ece3a30906
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-912e6f9f02b4b4e145bd8c12e8ea65422246fb626abedb150c9791065d9407c1.yml
3+
openapi_spec_hash: e1ffa39323c616de827752550560ee7c
4+
config_hash: 1666c4673215d2af73eb14329610e026

api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ from gitpod.types import (
121121
EnvironmentRole,
122122
EnvironmentSpec,
123123
EnvironmentStatus,
124+
KernelControlsConfig,
125+
Veto,
124126
EnvironmentCreateResponse,
125127
EnvironmentRetrieveResponse,
126128
EnvironmentCreateEnvironmentTokenResponse,
@@ -452,6 +454,7 @@ Types:
452454
from gitpod.types.organizations import (
453455
AgentPolicy,
454456
CrowdStrikeConfig,
457+
ExecutableDenyList,
455458
OrganizationPolicies,
456459
SecurityAgentPolicy,
457460
PolicyRetrieveResponse,

src/gitpod/resources/organizations/policies.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from ..._base_client import make_request_options
2020
from ...types.organizations import policy_update_params, policy_retrieve_params
2121
from ...types.organizations.policy_retrieve_response import PolicyRetrieveResponse
22+
from ...types.organizations.executable_deny_list_param import ExecutableDenyListParam
2223

2324
__all__ = ["PoliciesResource", "AsyncPoliciesResource"]
2425

@@ -104,6 +105,7 @@ def update(
104105
default_environment_image: Optional[str] | Omit = omit,
105106
delete_archived_environments_after: Optional[str] | Omit = omit,
106107
editor_version_restrictions: Dict[str, policy_update_params.EditorVersionRestrictions] | Omit = omit,
108+
executable_deny_list: Optional[ExecutableDenyListParam] | Omit = omit,
107109
maximum_environment_lifetime: Optional[str] | Omit = omit,
108110
maximum_environments_per_user: Optional[str] | Omit = omit,
109111
maximum_environment_timeout: Optional[str] | Omit = omit,
@@ -180,6 +182,9 @@ def update(
180182
editor_version_restrictions: editor_version_restrictions restricts which editor versions can be used. Maps
181183
editor ID to version policy with allowed major versions.
182184
185+
executable_deny_list: executable_deny_list contains executables that are blocked from execution in
186+
environments.
187+
183188
maximum_environment_lifetime: maximum_environment_lifetime controls for how long environments are allowed to
184189
be reused. 0 means no maximum lifetime. Maximum duration is 180 days (15552000
185190
seconds).
@@ -231,6 +236,7 @@ def update(
231236
"default_environment_image": default_environment_image,
232237
"delete_archived_environments_after": delete_archived_environments_after,
233238
"editor_version_restrictions": editor_version_restrictions,
239+
"executable_deny_list": executable_deny_list,
234240
"maximum_environment_lifetime": maximum_environment_lifetime,
235241
"maximum_environments_per_user": maximum_environments_per_user,
236242
"maximum_environment_timeout": maximum_environment_timeout,
@@ -334,6 +340,7 @@ async def update(
334340
default_environment_image: Optional[str] | Omit = omit,
335341
delete_archived_environments_after: Optional[str] | Omit = omit,
336342
editor_version_restrictions: Dict[str, policy_update_params.EditorVersionRestrictions] | Omit = omit,
343+
executable_deny_list: Optional[ExecutableDenyListParam] | Omit = omit,
337344
maximum_environment_lifetime: Optional[str] | Omit = omit,
338345
maximum_environments_per_user: Optional[str] | Omit = omit,
339346
maximum_environment_timeout: Optional[str] | Omit = omit,
@@ -410,6 +417,9 @@ async def update(
410417
editor_version_restrictions: editor_version_restrictions restricts which editor versions can be used. Maps
411418
editor ID to version policy with allowed major versions.
412419
420+
executable_deny_list: executable_deny_list contains executables that are blocked from execution in
421+
environments.
422+
413423
maximum_environment_lifetime: maximum_environment_lifetime controls for how long environments are allowed to
414424
be reused. 0 means no maximum lifetime. Maximum duration is 180 days (15552000
415425
seconds).
@@ -461,6 +471,7 @@ async def update(
461471
"default_environment_image": default_environment_image,
462472
"delete_archived_environments_after": delete_archived_environments_after,
463473
"editor_version_restrictions": editor_version_restrictions,
474+
"executable_deny_list": executable_deny_list,
464475
"maximum_environment_lifetime": maximum_environment_lifetime,
465476
"maximum_environments_per_user": maximum_environments_per_user,
466477
"maximum_environment_timeout": maximum_environment_timeout,

src/gitpod/types/__init__.py

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

55
from .user import User as User
6+
from .veto import Veto as Veto
67
from .group import Group as Group
78
from .editor import Editor as Editor
89
from .prompt import Prompt as Prompt
@@ -41,6 +42,7 @@
4142
from .prebuild import Prebuild as Prebuild
4243
from .log_level import LogLevel as LogLevel
4344
from .agent_mode import AgentMode as AgentMode
45+
from .veto_param import VetoParam as VetoParam
4446
from .environment import Environment as Environment
4547
from .error_level import ErrorLevel as ErrorLevel
4648
from .prompt_spec import PromptSpec as PromptSpec
@@ -120,6 +122,7 @@
120122
from .project_update_params import ProjectUpdateParams as ProjectUpdateParams
121123
from .editor_retrieve_params import EditorRetrieveParams as EditorRetrieveParams
122124
from .environment_spec_param import EnvironmentSpecParam as EnvironmentSpecParam
125+
from .kernel_controls_config import KernelControlsConfig as KernelControlsConfig
123126
from .prebuild_cancel_params import PrebuildCancelParams as PrebuildCancelParams
124127
from .prebuild_create_params import PrebuildCreateParams as PrebuildCreateParams
125128
from .prebuild_delete_params import PrebuildDeleteParams as PrebuildDeleteParams
@@ -184,6 +187,7 @@
184187
from .agent_update_prompt_response import AgentUpdatePromptResponse as AgentUpdatePromptResponse
185188
from .environment_unarchive_params import EnvironmentUnarchiveParams as EnvironmentUnarchiveParams
186189
from .identity_get_id_token_params import IdentityGetIDTokenParams as IdentityGetIDTokenParams
190+
from .kernel_controls_config_param import KernelControlsConfigParam as KernelControlsConfigParam
187191
from .organization_create_response import OrganizationCreateResponse as OrganizationCreateResponse
188192
from .organization_retrieve_params import OrganizationRetrieveParams as OrganizationRetrieveParams
189193
from .organization_set_role_params import OrganizationSetRoleParams as OrganizationSetRoleParams

src/gitpod/types/environment_spec.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .._models import BaseModel
99
from .admission_level import AdmissionLevel
1010
from .environment_phase import EnvironmentPhase
11+
from .kernel_controls_config import KernelControlsConfig
1112
from .environment_initializer import EnvironmentInitializer
1213
from .shared.automation_trigger import AutomationTrigger
1314

@@ -209,6 +210,9 @@ class EnvironmentSpec(BaseModel):
209210
devcontainer: Optional[Devcontainer] = None
210211
"""devcontainer is the devcontainer spec of the environment"""
211212

213+
kernel_controls_config: Optional[KernelControlsConfig] = FieldInfo(alias="kernelControlsConfig", default=None)
214+
"""kernel_controls_config configures kernel-level controls for this environment"""
215+
212216
machine: Optional[Machine] = None
213217
"""machine is the machine spec of the environment"""
214218

src/gitpod/types/environment_spec_param.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .._utils import PropertyInfo
99
from .admission_level import AdmissionLevel
1010
from .environment_phase import EnvironmentPhase
11+
from .kernel_controls_config_param import KernelControlsConfigParam
1112
from .environment_initializer_param import EnvironmentInitializerParam
1213
from .shared_params.automation_trigger import AutomationTrigger
1314

@@ -216,6 +217,9 @@ class EnvironmentSpecParam(TypedDict, total=False):
216217
devcontainer: Devcontainer
217218
"""devcontainer is the devcontainer spec of the environment"""
218219

220+
kernel_controls_config: Annotated[KernelControlsConfigParam, PropertyInfo(alias="kernelControlsConfig")]
221+
"""kernel_controls_config configures kernel-level controls for this environment"""
222+
219223
machine: Machine
220224
"""machine is the machine spec of the environment"""
221225

src/gitpod/types/environment_update_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from .._utils import PropertyInfo
99
from .admission_level import AdmissionLevel
10+
from .kernel_controls_config_param import KernelControlsConfigParam
1011
from .environment_initializer_param import EnvironmentInitializerParam
1112

1213
__all__ = [
@@ -132,6 +133,9 @@ class Spec(TypedDict, total=False):
132133

133134
devcontainer: Optional[SpecDevcontainer]
134135

136+
kernel_controls_config: Annotated[Optional[KernelControlsConfigParam], PropertyInfo(alias="kernelControlsConfig")]
137+
"""kernel_controls_config configures kernel-level controls for this environment"""
138+
135139
ports: Iterable[SpecPort]
136140
"""ports controls port sharing"""
137141

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Optional
4+
5+
from .veto import Veto
6+
from .._models import BaseModel
7+
8+
__all__ = ["KernelControlsConfig"]
9+
10+
11+
class KernelControlsConfig(BaseModel):
12+
"""KernelControlsConfig configures kernel-level controls for the environment"""
13+
14+
veto: Optional[Veto] = None
15+
"""veto controls blocking mechanisms"""
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import TypedDict
6+
7+
from .veto_param import VetoParam
8+
9+
__all__ = ["KernelControlsConfigParam"]
10+
11+
12+
class KernelControlsConfigParam(TypedDict, total=False):
13+
"""KernelControlsConfig configures kernel-level controls for the environment"""
14+
15+
veto: VetoParam
16+
"""veto controls blocking mechanisms"""

src/gitpod/types/organizations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from .crowd_strike_config import CrowdStrikeConfig as CrowdStrikeConfig
1212
from .domain_verification import DomainVerification as DomainVerification
1313
from .organization_invite import OrganizationInvite as OrganizationInvite
14+
from .executable_deny_list import ExecutableDenyList as ExecutableDenyList
1415
from .invite_create_params import InviteCreateParams as InviteCreateParams
1516
from .policy_update_params import PolicyUpdateParams as PolicyUpdateParams
1617
from .organization_policies import OrganizationPolicies as OrganizationPolicies
@@ -24,6 +25,7 @@
2425
from .policy_retrieve_response import PolicyRetrieveResponse as PolicyRetrieveResponse
2526
from .domain_verification_state import DomainVerificationState as DomainVerificationState
2627
from .invite_get_summary_params import InviteGetSummaryParams as InviteGetSummaryParams
28+
from .executable_deny_list_param import ExecutableDenyListParam as ExecutableDenyListParam
2729
from .custom_domain_create_params import CustomDomainCreateParams as CustomDomainCreateParams
2830
from .custom_domain_delete_params import CustomDomainDeleteParams as CustomDomainDeleteParams
2931
from .custom_domain_update_params import CustomDomainUpdateParams as CustomDomainUpdateParams

0 commit comments

Comments
 (0)