{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/snyk/main/json-schema/snyk-group-policy-response-schema.json", "title": "GroupPolicyResponse", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/snyk-policies-api-openapi.yml#/components/schemas/GroupPolicyResponse", "additionalProperties": false, "properties": { "attributes": { "$ref": "#/$defs/GroupPolicyResponseAttributes" }, "id": { "description": "A unique identifier for this particular occurrence of the group level policy.", "format": "uuid", "type": "string" }, "type": { "enum": [ "policy" ], "type": "string" } }, "required": [ "id", "type", "attributes" ], "type": "object", "$defs": { "GroupPolicyAction": { "oneOf": [ { "$ref": "#/$defs/GroupPolicyActionIgnore" }, { "$ref": "#/$defs/GroupPolicyActionAnnotation" }, { "$ref": "#/$defs/GroupPolicyActionSeverityOverride" } ] }, "GroupPolicyActionAnnotation": { "additionalProperties": false, "description": "Annotation action", "properties": { "data": { "$ref": "#/$defs/GroupPolicyActionAnnotationData" } }, "required": [ "data" ], "type": "object" }, "GroupPolicyActionAnnotationData": { "additionalProperties": false, "properties": { "reason": { "type": "string" }, "value": { "type": "string" } }, "required": [ "value" ], "type": "object" }, "GroupPolicyActionIgnore": { "additionalProperties": false, "description": "Ignore action", "properties": { "data": { "$ref": "#/$defs/GroupPolicyActionIgnoreData" } }, "required": [ "data" ], "type": "object" }, "GroupPolicyActionIgnoreData": { "additionalProperties": false, "properties": { "ignore_type": { "enum": [ "wont-fix", "not-vulnerable", "temporary-ignore" ], "type": "string", "x-enum-varnames": [ "GroupPolicyWontFix", "GroupPolicyNotVulnerable", "GroupPolicyTemporaryIgnore" ] }, "reason": { "maxLength": 10000, "type": "string" } }, "required": [ "ignore_type" ], "type": "object" }, "GroupPolicyActionSeverityOverride": { "additionalProperties": false, "description": "Severity override action", "properties": { "data": { "$ref": "#/$defs/GroupPolicyActionSeverityOverrideData" } }, "required": [ "data" ], "type": "object" }, "GroupPolicyActionSeverityOverrideData": { "additionalProperties": false, "properties": { "reason": { "type": "string" }, "severity": { "$ref": "#/$defs/SeverityLevel" } }, "required": [ "severity" ], "type": "object" }, "GroupPolicyActionType": { "enum": [ "ignore", "annotation", "severity-override" ], "type": "string" }, "GroupPolicyConditionBusinessCriticality": { "additionalProperties": false, "description": "Matches on the project business criticality - if business criticality is provided, the policy will only apply to projects with the specified business criticality.", "properties": { "field": { "enum": [ "business-criticality" ], "type": "string", "x-enum-varnames": [ "GroupPolicyBusinessCriticality" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "enum": [ "low", "medium", "high", "critical" ], "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionCVE": { "additionalProperties": false, "description": "Matches on the CVE.", "properties": { "field": { "enum": [ "cve" ], "type": "string", "x-enum-varnames": [ "GroupPolicyCVE" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionCWE": { "additionalProperties": false, "description": "Matches on the CWE.", "properties": { "field": { "enum": [ "cwe" ], "type": "string", "x-enum-varnames": [ "GroupPolicyCWE" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionEnvironment": { "additionalProperties": false, "description": "Matches on the project environment - if environment is provided, the policy will only apply to projects with the specified environment.", "properties": { "field": { "enum": [ "environment" ], "type": "string", "x-enum-varnames": [ "GroupPolicyEnvironment" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "enum": [ "frontend", "backend", "mobile", "internal", "external", "saas", "on-prem", "hosted", "distributed" ], "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionExploitMaturity": { "additionalProperties": false, "description": "Matches on the exploit maturity.", "properties": { "field": { "enum": [ "exploit-maturity" ], "type": "string", "x-enum-varnames": [ "GroupPolicyExploitMaturity" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "enum": [ "mature", "proof-of-concept", "no-known-exploit", "no-data" ], "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionLifecycle": { "additionalProperties": false, "description": "Matches on the project lifecycle - if lifecycle is provided, the policy will only apply to projects with the specified lifecycle.", "properties": { "field": { "enum": [ "lifecycle" ], "type": "string", "x-enum-varnames": [ "GroupPolicyLifecycle" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "enum": [ "development", "production", "sandbox" ], "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionOperator": { "enum": [ "includes", "not-includes" ], "type": "string", "x-enum-varnames": [ "GroupPolicyIncludes", "GroupPolicyNotIncludes" ] }, "GroupPolicyConditionOrgID": { "additionalProperties": false, "description": "Matches on the organization ID - if org ID is provided, the policy will only apply to the specified organization. If no org ID is provided, the policy will apply to all organizations.", "properties": { "field": { "enum": [ "org-id" ], "type": "string", "x-enum-varnames": [ "GroupPolicyOrgID" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "format": "uuid", "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionProjectTags": { "additionalProperties": false, "description": "Matches on the project tags - if project tags are provided, the policy will only apply to projects with the specified tags.\nThe value is a list of key:value pairs.\nThe key and value must be Alphanumeric including - and _ with a limit of 30 characters for each key and value.\n", "properties": { "field": { "enum": [ "project-tags" ], "type": "string", "x-enum-varnames": [ "GroupPolicyProjectTags" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "pattern": "^[A-Za-z0-9_-]{1,30}:[A-Za-z0-9_-]{1,30}$", "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionRuleId": { "additionalProperties": false, "description": "Matches on the rule ID.", "properties": { "field": { "enum": [ "rule-id" ], "type": "string", "x-enum-varnames": [ "GroupPolicyRuleId" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionSeverity": { "additionalProperties": false, "description": "Matches on the severity.", "properties": { "field": { "enum": [ "severity" ], "type": "string", "x-enum-varnames": [ "GroupPolicySeverity" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "enum": [ "low", "medium", "high", "critical" ], "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionSnykAssetFindingV1": { "additionalProperties": false, "description": "Matches on the Snyk Asset Finding V1 identifier.", "properties": { "field": { "enum": [ "snyk/asset/finding/v1" ], "type": "string", "x-enum-varnames": [ "GroupPolicySnykAssetFindingV1" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "format": "uuid", "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionSnykId": { "additionalProperties": false, "description": "Matches on the Snyk ID.", "properties": { "field": { "enum": [ "snyk-id" ], "type": "string", "x-enum-varnames": [ "GroupPolicySnykId" ] }, "operator": { "$ref": "#/$defs/GroupPolicyConditionOperator" }, "value": { "items": { "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "field", "operator", "value" ], "type": "object" }, "GroupPolicyConditionsGroup": { "additionalProperties": false, "properties": { "conditions": { "items": { "anyOf": [ { "$ref": "#/$defs/GroupPolicyConditionExploitMaturity" }, { "$ref": "#/$defs/GroupPolicyConditionSnykAssetFindingV1" }, { "$ref": "#/$defs/GroupPolicyConditionRuleId" }, { "$ref": "#/$defs/GroupPolicyConditionSeverity" }, { "$ref": "#/$defs/GroupPolicyConditionCWE" }, { "$ref": "#/$defs/GroupPolicyConditionCVE" }, { "$ref": "#/$defs/GroupPolicyConditionSnykId" }, { "$ref": "#/$defs/GroupPolicyConditionOrgID" }, { "$ref": "#/$defs/GroupPolicyConditionProjectTags" }, { "$ref": "#/$defs/GroupPolicyConditionBusinessCriticality" }, { "$ref": "#/$defs/GroupPolicyConditionEnvironment" }, { "$ref": "#/$defs/GroupPolicyConditionLifecycle" } ] }, "minItems": 1, "type": "array" }, "logical_operator": { "$ref": "#/$defs/GroupPolicyOperator" } }, "required": [ "logical_operator", "conditions" ], "type": "object" }, "GroupPolicyOperator": { "enum": [ "and" ], "type": "string", "x-enum-varnames": [ "GroupPolicyAnd" ] }, "GroupPolicyPrincipal": { "additionalProperties": false, "properties": { "email": { "type": [ "string", "null" ] }, "id": { "description": "The Snyk ID corresponding to this user or service account that created the policy", "format": "uuid", "type": "string" }, "name": { "description": "Name of the user or service account that created the policy", "type": "string" } }, "required": [ "name", "id" ], "type": "object" }, "GroupPolicyResponseAttributes": { "additionalProperties": false, "properties": { "action": { "$ref": "#/$defs/GroupPolicyAction" }, "action_type": { "$ref": "#/$defs/GroupPolicyActionType" }, "conditions_group": { "$ref": "#/$defs/GroupPolicyConditionsGroup" }, "created_at": { "format": "date-time", "type": "string" }, "created_by": { "$ref": "#/$defs/GroupPolicyPrincipal" }, "name": { "type": "string" }, "updated_at": { "format": "date-time", "type": "string" } }, "required": [ "name", "conditions_group", "action_type", "action", "created_by", "created_at", "updated_at" ], "type": "object" }, "SeverityLevel": { "enum": [ "low", "medium", "high", "critical" ], "type": "string", "x-enum-varnames": [ "Low", "Medium", "High", "Critical" ] } } }