https://github.com/crowdsecurity/crowdsec-yaml-schemas
https://github.com/crowdsecurity/crowdsec-yaml-schemas
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/crowdsecurity/crowdsec-yaml-schemas
- Owner: crowdsecurity
- Created: 2022-09-26T21:04:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-10-14T12:20:19.000Z (8 months ago)
- Last Synced: 2026-02-09T15:51:46.005Z (4 months ago)
- Size: 98.6 KB
- Stars: 4
- Watchers: 8
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# crowdsec-yaml-schema
## Yaml schema
This repository provides three yaml schema files that may be used to
check parsers/scenarios/postoverflows/collection yaml file.
## What's the plan
One has to use
https://github.com/redhat-developer/yaml-language-server as a lsp
server. This is included basically in all yaml package plugin proposed
with most common editors.
The lsp server has to know the schema it has to apply to each yaml
file. For example if one edits github ci workflow files, the lsp
server will recognize the file and apply its schema by leveraging the
path of the filesystem. The information the lsp server is using is
stored on https://www.schemastore.org/json/. It seems easy to add ours
there, but I want the schemas thoroughly tested before proceeding.
## How to test it
For now, we can indicate to the lsp server how to apply the schema by
adding a line on top on the parsed yaml file.
`# yaml-language-server: $schema=https://raw.githubusercontent.com/crowdsecurity/crowdsec-yaml-schemas/main/parser_schema.yaml`
As it is undserstood by the lsp server, it will be working in most
common editors. Obviously the url has to be updated accordingly to the kind of item schema one wants.
## What's left to be done
* Testing this as much as possible and report issues in this repository
* having it added to https://www.schemastore.org/json/