# PolicyViolationJson

A single policy violation found by a validation plugin.

- Source: [`node_modules/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/validation-report-schema.d.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/validation-report-schema.d.ts#L109)
- Type last changed: v2.258.0 · 4 Jun 2026

## Example

```ts
import { PolicyViolationJson } from '@aws-cdk/cloud-assembly-schema';

const violation: PolicyViolationJson = {
  ruleName: 'no-public-access',
  description: 'S3 bucket should not allow public access',
  severity: 'error',
  violatingConstructs: [{ constructPath: 'MyStack/MyBucket' }],
};
```

## Properties

- `customSeverity`: string — If the plugin wants to report using a non-standard severity, put it here.

- `description`: string (required) — A description of the violation.

- `ruleMetadata`: { [key: string]: string } — Additional rule-specific metadata.

  **Default:** no metadata

- `ruleName`: string (required) — The name of the rule that was violated.

  This may include a namespace: `'<namespace>::<rule-name>'`. If it does not,
  the plugin name will be used as the namespace.

  The namespace must be included when acknowledging the violation.

- `severity`: string (required) — The severity of the violation.

- `suggestedFix`: string — How to fix the violation.

  **Default:** no fix provided

- `violatingConstructs`: [ViolatingConstructJson](/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ViolatingConstructJson.html)[] (required) — Constructs that violated the rule.
