Define a custom security policy, preview its matches, and manage the resulting violations.
Policies turn security data into consistent rules for monitoring and enforcement. When a policy matches a target, Cysmiq creates a policy violation for review and follow-up.
Prerequisites
A workspace with scanned security data
Workspace owner permission to create and manage policies
Availability depends on your Cysmiq plan.
Steps
1
Start a custom policy
Open Settings, select Policies, then select New policy. In Basics:
Enter a name that describes the rule’s intent.
Choose the target type, such as Vulnerability, Package, or Manifest.
Keep the policy Active when it should evaluate current data.
Choose whether it applies everywhere by default or only where it is explicitly bound.
Select Monitor, Warn, or Block for its enforcement behavior.
This example blocks critical and high-severity vulnerability matches.
2
Build the match criteria
In Match, select fields, operators, and values. Use nested groups when the policy needs several conditions:
All requires every item in the group to match.
Any requires at least one item to match.
None requires every item in the group to remain unmatched.
A custom vulnerability policy matching critical and high severities.
In Response, optionally set an SLA window and notification recipients. The enforcement mode controls how matched violations affect connected workflows:
Monitor records violations without warning or blocking.
Warn surfaces warning-level enforcement.
Block surfaces blocking enforcement.
Review the summary, then create the policy.
4
Preview matches
Open the policy and select Dry run. Choose a repository and run the preview to see current matches using the unsaved match criteria. A dry run does not create policy violations.
A dry run finding one blocking match in the storefront repository.
Review the matched target, scope, enforcement, and context before saving policy changes.
5
Review policy violations
Open Policy Violations to review active matches across the workspace. The table shows the policy, status, scope, target, timing, and assignee.
A blocking policy violation created from the high-severity rule.
Open a violation to assign an owner, review its scope and target, request or apply a snooze when available, and record the final decision. See Policy violations for the complete lifecycle.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cysmiq","colors":{"primary":"#FF4609","light":"#FF4609","dark":"#E13E08"},"logo":{"light":"https://mintcdn.com/cysmiq/1eDhig_aHgoSVIaN/images/Cysmiqlogocolor.svg?fit=max\u0026auto=format\u0026n=1eDhig_aHgoSVIaN\u0026q=85\u0026s=0cda85c078d98b9846d84bdee8f73b5b","dark":"https://mintcdn.com/cysmiq/1eDhig_aHgoSVIaN/images/Cysmiqlogocolorwhite.svg?fit=max\u0026auto=format\u0026n=1eDhig_aHgoSVIaN\u0026q=85\u0026s=ab291b7a19aeae66bfd08cceee2cf790"},"favicon":{"light":"https://mintcdn.com/cysmiq/Zi-IrGxubln-TlTl/images/favicon.svg?fit=max\u0026auto=format\u0026n=Zi-IrGxubln-TlTl\u0026q=85\u0026s=dd075ce013edbfa653daf909a172584c","dark":"https://mintcdn.com/cysmiq/Zi-IrGxubln-TlTl/images/favicon.svg?fit=max\u0026auto=format\u0026n=Zi-IrGxubln-TlTl\u0026q=85\u0026s=dd075ce013edbfa653daf909a172584c"},"api":{"playground":{"display":"interactive"},"examples":{"defaults":"all","languages":["curl","python","javascript"],"prefill":true}},"navbar":{"links":[{"href":"mailto:support@cysmiq.com","label":"Support"}],"primary":{"type":"button","label":"Get Started","href":"https://app.cysmiq.com"}},"footer":{"socials":{"x":"https://x.com/cysmiqAI","github":"https://github.com/cysmiq","linkedin":"https://linkedin.com/company/cysmiq"},"links":[{"header":"Resources","items":[{"label":"System status","href":"https://status.cysmiq.com/"}]}]},"seo":{"metatags":{"canonical":"https://docs.cysmiq.com"}},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cysmiq","hasAudioNarration":false,"actualSubdomain":"cysmiq","customDomains":["docs.cysmiq.com"],"gitSource":{"type":"github","owner":"cysmiq","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae44fd1d2f3537f5eb9fbe3","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"default","tag":"Documentation","count":54},{"language":"default","tag":"Guides","count":20},{"language":"default","tag":"API reference","count":17},{"language":"default","tag":"Endpoints","count":16},{"language":"default","tag":"Workflows","count":12},{"language":"default","tag":"Core concepts","count":9},{"language":"default","tag":"Reference","count":8},{"language":"default","tag":"Vulnerability management","count":8},{"language":"default","tag":"Assets","count":5},{"language":"default","tag":"Scanning","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@cysmiq.com","showHelpButton":false}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"status-badge.css","content":"#cysmiq-status-badge{display:inline-flex;align-items:center;min-height:28px}#cysmiq-status-badge img{display:block;width:195px;height:28px}"}]}
{"page":{"pagePath":"guides/create-policy","slug":"/guides/create-policy","pageMetadata":{"title":"Create and enforce a policy","description":"Define a custom security policy, preview its matches, and manage the resulting violations.","href":"/guides/create-policy"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Define a custom security policy, preview its matches, and manage the resulting violations.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Frame,Heading,Info,OptimizedImage,Step,Steps}=_components;if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Policies turn security data into consistent rules for monitoring and enforcement. When a policy matches a target, Cysmiq creates a policy violation for review and follow-up.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A workspace with scanned security data`}),`\n`,_jsx(_components.li,{children:`Workspace owner permission to create and manage policies`}),`\n`]}),`\n`,_jsx(Info,{children:`Availability depends on your Cysmiq plan.`}),`\n`,_jsx(Heading,{level:`2`,id:`steps`,children:`Steps`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Start a custom policy`,children:[_jsxs(_components.p,{children:[`Open `,_jsx(_components.strong,{children:`Settings`}),`, select `,_jsx(_components.strong,{children:`Policies`}),`, then select `,_jsx(_components.strong,{children:`New policy`}),`. In `,_jsx(_components.strong,{children:`Basics`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Enter a name that describes the rule’s intent.`}),`\n`,_jsxs(_components.li,{children:[`Choose the target type, such as `,_jsx(_components.strong,{children:`Vulnerability`}),`, `,_jsx(_components.strong,{children:`Package`}),`, or `,_jsx(_components.strong,{children:`Manifest`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Keep the policy `,_jsx(_components.strong,{children:`Active`}),` when it should evaluate current data.`]}),`\n`,_jsx(_components.li,{children:`Choose whether it applies everywhere by default or only where it is explicitly bound.`}),`\n`,_jsxs(_components.li,{children:[`Select `,_jsx(_components.strong,{children:`Monitor`}),`, `,_jsx(_components.strong,{children:`Warn`}),`, or `,_jsx(_components.strong,{children:`Block`}),` for its enforcement behavior.`]}),`\n`]}),_jsx(_components.p,{children:`This example blocks critical and high-severity vulnerability matches.`})]}),_jsxs(Step,{title:`Build the match criteria`,children:[_jsxs(_components.p,{children:[`In `,_jsx(_components.strong,{children:`Match`}),`, select fields, operators, and values. Use nested groups when the policy needs several conditions:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`All`}),` requires every item in the group to match.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Any`}),` requires at least one item to match.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`None`}),` requires every item in the group to remain unmatched.`]}),`\n`]}),_jsx(Frame,{caption:`A custom vulnerability policy matching critical and high severities.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-01-match.webp?fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=14d27ae6af5f732ecd41899a31ab033b`,alt:`Policy creation wizard showing an All group where vulnerability severity is in critical or high.`,\"data-og-width\":`2880`,width:`2880`,\"data-og-height\":`1300`,height:`1300`,\"data-path\":`images/guides/create-policy/create-policy-01-match.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-01-match.webp?w=280\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=972054a1eaa47c28e46e93af492c4cd3 280w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-01-match.webp?w=560\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=cd03cf3a0ca21ff7102d8d3fed67190a 560w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-01-match.webp?w=840\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=29bb28c8dd4950942b06b7ae445c05c6 840w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-01-match.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=76913ec03d4484584b4b34b3b3b6d743 1100w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-01-match.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=73a4750ad5552a0bf778e67c4481c71a 1650w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-01-match.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=24001b5ed461ed87e21801c7974c18ce 2500w`})}),_jsxs(_components.p,{children:[`Use the `,_jsx(_components.a,{href:`/reference/policy-condition-fields`,children:`Policy condition fields`}),` reference for supported fields, operators, and values.`]})]}),_jsxs(Step,{title:`Configure the response`,children:[_jsxs(_components.p,{children:[`In `,_jsx(_components.strong,{children:`Response`}),`, optionally set an SLA window and notification recipients. The enforcement mode controls how matched violations affect connected workflows:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Monitor`}),` records violations without warning or blocking.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Warn`}),` surfaces warning-level enforcement.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Block`}),` surfaces blocking enforcement.`]}),`\n`]}),_jsx(_components.p,{children:`Review the summary, then create the policy.`})]}),_jsxs(Step,{title:`Preview matches`,children:[_jsxs(_components.p,{children:[`Open the policy and select `,_jsx(_components.strong,{children:`Dry run`}),`. Choose a repository and run the preview to see current matches using the unsaved match criteria. A dry run does not create policy violations.`]}),_jsx(Frame,{caption:`A dry run finding one blocking match in the storefront repository.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-02-dry-run.webp?fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=0174b6b90f5a369f64d48f41196abe94`,alt:`Policy dry-run results showing one blocking Flask debug vulnerability match.`,\"data-og-width\":`1588`,width:`1588`,\"data-og-height\":`796`,height:`796`,\"data-path\":`images/guides/create-policy/create-policy-02-dry-run.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-02-dry-run.webp?w=280\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=cf08d640c4f04a993a8d754908f3fcdf 280w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-02-dry-run.webp?w=560\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=8c70ac57847f81e67d31b0080a281337 560w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-02-dry-run.webp?w=840\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=7492aa993287e65b46afd0544756170b 840w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-02-dry-run.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=c984287191135778a3da97baceca0876 1100w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-02-dry-run.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=342696203ec32ab58888b612a427de63 1650w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-02-dry-run.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=9345e9cd0778c85a984c39f0c84d0f80 2500w`})}),_jsx(_components.p,{children:`Review the matched target, scope, enforcement, and context before saving policy changes.`})]}),_jsxs(Step,{title:`Review policy violations`,children:[_jsxs(_components.p,{children:[`Open `,_jsx(_components.strong,{children:`Policy Violations`}),` to review active matches across the workspace. The table shows the policy, status, scope, target, timing, and assignee.`]}),_jsx(Frame,{caption:`A blocking policy violation created from the high-severity rule.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-03-violation.webp?fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=45fc8bdf06b4b9baee7702e8f9b1a342`,alt:`Policy Violations page showing an open blocking violation for the Flask debug vulnerability.`,\"data-og-width\":`2880`,width:`2880`,\"data-og-height\":`860`,height:`860`,\"data-path\":`images/guides/create-policy/create-policy-03-violation.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-03-violation.webp?w=280\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=6c39cab476e949a9cdbf54728c22864f 280w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-03-violation.webp?w=560\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=e018429b2a50495522468c8b1e2e682a 560w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-03-violation.webp?w=840\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=7a9b593a1c193cbb28f2654a0c71eb7a 840w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-03-violation.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=b4c797d48956aff3741dcbb8efb196c9 1100w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-03-violation.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=9c0776b36404435bfb64bf46e8d8cfa1 1650w, https://mintcdn.com/cysmiq/jILg5Q1KdyGSo81w/images/guides/create-policy/create-policy-03-violation.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=jILg5Q1KdyGSo81w\u0026q=85\u0026s=513132879d2b74a3351a8e4cecc56205 2500w`})}),_jsxs(_components.p,{children:[`Open a violation to assign an owner, review its scope and target, request or apply a snooze when available, and record the final decision. See `,_jsx(_components.a,{href:`/policies/violations`,children:`Policy violations`}),` for the complete lifecycle.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-documentation`,children:`Related documentation`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/policies/overview`,children:`Policies`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/policies/custom-policies`,children:`Custom policies`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/policies/violations`,children:`Policy violations`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/policy-condition-fields`,children:`Policy condition fields`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create and enforce a policy","description":"Define a custom security policy, preview its matches, and manage the resulting violations.","href":"/guides/create-policy"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Steps","slug":"steps","depth":2,"children":[]},{"title":"Related documentation","slug":"related-documentation","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cysmiq/c9d35ccee652673c/status-badge.js"],"subdomain":"cysmiq","siteName":"Cysmiq","title":"Create and enforce a policy - Cysmiq","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-09T03:30:39.887Z","originalFileLocation":"guides/create-policy.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Define a custom security policy, preview its matches, and manage the resulting violations.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cysmiq\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create and enforce a policy - Cysmiq\">\u003cmeta data-mint-head property=\"og:description\" content=\"Define a custom security policy, preview its matches, and manage the resulting violations.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cysmiq\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cysmiq.com/guides/create-policy\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cysmiq.mintlify.site/_mintlify/api/og/v2?division=Workflows\u0026amp;title=Create+and+enforce+a+policy\u0026amp;description=Define+a+custom+security+policy%2C+preview+its+matches%2C+and+manage+the+resulting+violations.\u0026amp;theme=c09ba826b829aabd7b18fabb\u0026amp;signature=595fa343bd8889fc410367ebd4e285407037085f3ca1107745f2c872cc7af8a6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create and enforce a policy - Cysmiq\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Define a custom security policy, preview its matches, and manage the resulting violations.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cysmiq.mintlify.site/_mintlify/api/og/v2?division=Workflows\u0026amp;title=Create+and+enforce+a+policy\u0026amp;description=Define+a+custom+security+policy%2C+preview+its+matches%2C+and+manage+the+resulting+violations.\u0026amp;theme=c09ba826b829aabd7b18fabb\u0026amp;signature=595fa343bd8889fc410367ebd4e285407037085f3ca1107745f2c872cc7af8a6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cysmiq/BSsmQHWHOvGYxp_C/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cysmiq\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF4609\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cysmiq.com/guides/create-policy\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/create-policy.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cysmiq.com/#organization\",\"name\":\"Cysmiq\",\"url\":\"https://docs.cysmiq.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cysmiq/1eDhig_aHgoSVIaN/images/Cysmiqlogocolor.svg?fit=max\u0026auto=format\u0026n=1eDhig_aHgoSVIaN\u0026q=85\u0026s=0cda85c078d98b9846d84bdee8f73b5b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cysmiq.com#website\",\"name\":\"Cysmiq\",\"url\":\"https://docs.cysmiq.com\",\"publisher\":{\"@id\":\"https://docs.cysmiq.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cysmiq.com/guides/create-policy#webpage\",\"url\":\"https://docs.cysmiq.com/guides/create-policy\",\"name\":\"Create and enforce a policy\",\"description\":\"Define a custom security policy, preview its matches, and manage the resulting violations.\",\"dateModified\":\"2026-08-09T03:30:39.887Z\",\"isPartOf\":{\"@id\":\"https://docs.cysmiq.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cysmiq.com/guides/create-policy#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cysmiq.com/guides/create-policy#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Workflows\",\"item\":\"https://docs.cysmiq.com/guides/manage-applications\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create and enforce a policy\",\"item\":\"https://docs.cysmiq.com/guides/create-policy\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cysmiq.com/guides/create-policy#article\",\"headline\":\"Create and enforce a policy\",\"name\":\"Create and enforce a policy\",\"description\":\"Define a custom security policy, preview its matches, and manage the resulting violations.\",\"url\":\"https://docs.cysmiq.com/guides/create-policy\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cysmiq.com/guides/create-policy#webpage\"},\"dateModified\":\"2026-08-09T03:30:39.887Z\",\"publisher\":{\"@id\":\"https://docs.cysmiq.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cysmiq.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cysmiq\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cysmiq\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/create-policy.md","siteName":"Cysmiq","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Guides","groups":[{"group":"Onboarding \u0026 setup","icon":"rocket","pages":[{"title":"Quickstart","href":"/guides/quickstart"},{"title":"Fix your first vulnerability","href":"/guides/first-value"},{"title":"Connect a VCS","href":"/guides/connect-vcs"},{"title":"Invite your team","href":"/guides/invite-team"}]},{"group":"Integrations","icon":"plug","pages":[{"title":"Connect ticketing","href":"/guides/connect-ticketing"}]},{"group":"Workflows","icon":"list-check","pages":[{"title":"Manage applications","href":"/guides/manage-applications"},{"title":"Understand assets","href":"/guides/understand-assets"},{"title":"Configure repository scanning","href":"/guides/configure-repository-scanning"},{"title":"Use saved filters","href":"/guides/saved-filters"},{"title":"Triage vulnerabilities","href":"/guides/triage-vulnerabilities"},{"title":"Review PR results","href":"/guides/pull-request-results"},{"title":"Manage snooze requests","href":"/guides/manage-snooze-requests"},{"title":"Ask Shift","description":"Ask Shift to explain a vulnerability, answer follow-up questions, and suggest a focused remediation.","href":"/guides/shift"},{"title":"Create and enforce a policy","href":"/guides/create-policy"},{"title":"Create tickets","description":"Create Jira or Linear tickets from vulnerabilities.","href":"/guides/create-tickets"},{"title":"Use the CLI with coding agents","href":"/guides/cli-coding-agents"},{"title":"Use the CLI in CI/CD","href":"/guides/cli-ci-cd"}]},{"group":"Administration","icon":"settings","pages":[{"title":"Manage members","href":"/guides/members"},{"title":"Manage API keys","href":"/guides/api-keys"}]},{"group":"Self-hosting","icon":"server","pages":[{"title":"Install in your environment","href":"/guides/installation"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/introduction"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/cloud"}]}]},"basePath":"","title":"Create and enforce a policy - Cysmiq","deploymentId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","buildId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-D6LgX1ys.js","DynamicMarkdown-CZT_WAnN.js","zoom-image-lightbox-CIIGaZaE.js","lightbox-handle-r17bVUz3.js"]}