- SourceMeta name
- csp
- Base dialect
- https://json-schema.org/draft/2020-12/schema
- SourceMeta dialect
- https://json-schema.org/draft/2020-12/schema
- Bytes
- 2.698 bytes
- Bytes bundled
- 2.698 bytes
- Health
- 92%
- Dependencies
- -
Health issues
- Name
- top_level_title
- Message
- Set a concise non-empty title at the top level of the schema to explain what the definition is about
- Pointers
- Name
- top_level_description
- Message
- Set a non-empty description at the top level of the schema to explain what the definition is about in detail
- Pointers
- Name
- top_level_examples
- Message
- Set a non-empty examples array at the top level of the schema to illustrate the expected data
- Pointers
- Name
- enum_with_type
- Message
- Setting `type` alongside `enum` is considered an anti-pattern, as the enumeration choices already imply their respective types
- Pointers
- /$defs/sourceList/items/anyOf/0/enum - /$defs/sourceList/items/anyOf/0/type
- Name
- enum_with_type
- Message
- Setting `type` alongside `enum` is considered an anti-pattern, as the enumeration choices already imply their respective types
- Pointers
- /properties/requireTrustedTypesFor/items/enum - /properties/requireTrustedTypesFor/items/type
- Name
- enum_to_const
- Message
- An `enum` of a single value can be expressed as `const`
- Pointers
- /properties/requireTrustedTypesFor/items/enum
{
"$defs": {
"sourceList": {
"items": {
"anyOf": [
{
"enum": [
"'self'",
"'none'",
"'unsafe-inline'",
"'unsafe-eval'"
],
"type": "string"
},
{
"format": "uri",
"type": "string"
},
{
"pattern": "^https?:\\/\\/.*",
"type": "string"
},
{
"pattern": "^\\*\\..*",
"type": "string"
},
{
"pattern": "^'nonce-.*'$",
"type": "string"
},
{
"pattern": "^'sha256-.*'$",
"type": "string"
},
{
"pattern": "^'sha384-.*'$",
"type": "string"
},
{
"pattern": "^'sha512-.*'$",
"type": "string"
}
]
},
"type": "array"
}
},
"$id": "https://schemas.don.projects.digilab.network/schemas/policy-as-code/csp",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"baseUri": {
"$ref": "#/$defs/sourceList"
},
"blockAllMixedContent": {
"default": false,
"type": "boolean"
},
"connectSrc": {
"$ref": "#/$defs/sourceList"
},
"defaultSrc": {
"$ref": "#/$defs/sourceList"
},
"fontSrc": {
"$ref": "#/$defs/sourceList"
},
"formAction": {
"$ref": "#/$defs/sourceList"
},
"frameAncestors": {
"$ref": "#/$defs/sourceList"
},
"frameSrc": {
"$ref": "#/$defs/sourceList"
},
"imgSrc": {
"$ref": "#/$defs/sourceList"
},
"mediaSrc": {
"$ref": "#/$defs/sourceList"
},
"objectSrc": {
"$ref": "#/$defs/sourceList"
},
"reportTo": {
"type": "string"
},
"reportUri": {
"items": {
"format": "uri",
"type": "string"
},
"type": "array"
},
"requireTrustedTypesFor": {
"items": {
"enum": [
"script"
],
"type": "string"
},
"type": "array"
},
"scriptSrc": {
"$ref": "#/$defs/sourceList"
},
"scriptSrcAttr": {
"$ref": "#/$defs/sourceList"
},
"scriptSrcElem": {
"$ref": "#/$defs/sourceList"
},
"styleSrc": {
"$ref": "#/$defs/sourceList"
},
"styleSrcAttr": {
"$ref": "#/$defs/sourceList"
},
"styleSrcElem": {
"$ref": "#/$defs/sourceList"
},
"trustedTypes": {
"items": {
"type": "string"
},
"type": "array"
},
"upgradeInsecureRequests": {
"default": false,
"type": "boolean"
}
},
"type": "object"
}