v18

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014211,6201.8 MB
gitpod.v1.SecurityService

CreateSecurityPolicy

Creates a new security policy.

Use this method to:

  • Define environment access controls
  • Configure audited or blocked operations
  • Manage organization security posture

Examples

  • Create security policy:

    Creates an audit-first Veto Exec policy with one audited bare name and one blocked absolute path. Creation stores an inactive definition; assigning it as the organization default validates materializability.

    organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
    metadata:
      name: "Veto Exec audit-first"
    spec:
      executables:
        defaultEffect: EFFECT_ALLOW
        rules:
          - path: "npx"
            effect: EFFECT_AUDIT
          - path: "/usr/bin/curl"
            effect: EFFECT_BLOCK
    
post/gitpod.v1.SecurityService/CreateSecurityPolicy

Request body

organizationIdstring uuid

Response

Success