Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/validations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Validations"
on:
# needed for publishing commit images on the main branch
push:
branches:
- main

# needed when running from forks
pull_request:

permissions:
contents: read

jobs:
validate-schema:
name: "Validate Schema"
runs-on: ubuntu-latest
container:
image: python:3.13-alpine
permissions:
contents: read
steps:
- name: Install OS dependencies
run: apk add --no-cache taplo
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
- name: Run schema validation
run: taplo validate --schema file:${PWD}/schema/0.1.0.schema.json
- name: Run format validation
run: taplo format --check
4 changes: 4 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
include = [
"data/**/*.toml"
]

[formatting]
align_comments = false
align_entries = false
Expand Down
188 changes: 188 additions & 0 deletions schema/0.1.0.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Anchore Security Identifier",
"type": "object",
"additionalProperties": false,
"properties": {
"security": {
"$ref": "#/$defs/security"
}
},
"required": [
"security"
],
"$defs": {
"securityAliases": {
"type": "object",
"additionalProperties": true,
"properties": {
"cve": {
"type": "array",
"items": {
"type": "string"
}
},
"gcve": {
"type": "array",
"items": {
"type": "string"
}
},
"github": {
"type": "array",
"items": {
"type": "string"
}
},
"openssf_malicious_packages": {
"type": "array",
"items": {
"type": "string"
}
},
"chainguard": {
"type": "array",
"items": {
"type": "string"
}
},
"bitnami": {
"type": "array",
"items": {
"type": "string"
}
},
"psf": {
"type": "array",
"items": {
"type": "string"
}
},
"pypa": {
"type": "array",
"items": {
"type": "string"
}
},
"go": {
"type": "array",
"items": {
"type": "string"
}
},
"rustsec": {
"type": "array",
"items": {
"type": "string"
}
},
"rconsortium": {
"type": "array",
"items": {
"type": "string"
}
},
"almalinux": {
"type": "array",
"items": {
"type": "string"
}
},
"debian": {
"type": "array",
"items": {
"type": "string"
}
},
"redhat": {
"type": "array",
"items": {
"type": "string"
}
},
"rockylinux": {
"type": "array",
"items": {
"type": "string"
}
},
"suse": {
"type": "array",
"items": {
"type": "string"
}
},
"opensuse": {
"type": "array",
"items": {
"type": "string"
}
},
"ubuntu": {
"type": "array",
"items": {
"type": "string"
}
},
"minimos": {
"type": "array",
"items": {
"type": "string"
}
},
"echo": {
"type": "array",
"items": {
"type": "string"
}
},
"openeuler": {
"type": "array",
"items": {
"type": "string"
}
},
"amazonlinux": {
"type": "array",
"items": {
"type": "string"
}
},
"oraclelinux": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"security": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^ANCHORE-[0-9]{4}-[0-9]+$"
},
"duplicates": {
"type": "array",
"items": {
"type": "string",
"pattern": "^ANCHORE-[0-9]{4}-[0-9]+$"
}
},
"allocated": {
"type": "string",
"format": "date-time"
},
"aliases": {
"$ref": "#/$defs/securityAliases"
}
},
"additionalProperties": false,
"required": [
"id",
"allocated"
]
}
}
}