{"id":19069336,"url":"https://github.com/milonoir/yaml_rulz","last_synced_at":"2026-05-08T14:04:42.732Z","repository":{"id":62590434,"uuid":"44263457","full_name":"milonoir/yaml_rulz","owner":"milonoir","description":"Yaml validator","archived":false,"fork":false,"pushed_at":"2017-05-21T19:06:25.000Z","size":24,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-27T08:55:16.523Z","etag":null,"topics":["python","python3","yaml","yaml-validator"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milonoir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-14T17:09:50.000Z","updated_at":"2017-07-14T16:43:10.000Z","dependencies_parsed_at":"2022-11-03T22:47:00.602Z","dependency_job_id":null,"html_url":"https://github.com/milonoir/yaml_rulz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/milonoir/yaml_rulz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fyaml_rulz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fyaml_rulz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fyaml_rulz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fyaml_rulz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milonoir","download_url":"https://codeload.github.com/milonoir/yaml_rulz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milonoir%2Fyaml_rulz/sbom","scorecard":{"id":647435,"data":{"date":"2025-08-11","repo":{"name":"github.com/milonoir/yaml_rulz","commit":"ee8e3f4d2892aa636832970dddc044d0ca86c691"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T12:30:20.112Z","repository_id":62590434,"created_at":"2025-08-21T12:30:20.112Z","updated_at":"2025-08-21T12:30:20.112Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32783452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","python3","yaml","yaml-validator"],"created_at":"2024-11-09T01:13:59.211Z","updated_at":"2026-05-08T14:04:42.695Z","avatar_url":"https://github.com/milonoir.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"YAML Rulz!\n==========\n\nA YAML validator written in Python.\n\n[![][travis img]][travis]\n[![][codecov img]][codecov]\n[![][pypi img]][pypi]\n\nCheck the validity of your yaml files in three steps:\n\n1. Create new yaml schema files or turn your yaml files into schemas by using simple rules without\nbreaking the original structure.\n2. Optionally, exclude certain keys or subsections from validation.\n3. Run the validator.\n\n\nTerminology\n-----------\n\n- Key: In a yaml structure a key identifies a node (or leaf) in the tree structure.\n- Value: The data stored in yaml keys.\n- List items: Denoted by a hyphen (`-`) it can be a set of single values without keys or subsections (subtrees).\n- Rules: Special string values parsed by the validator.\n- Schema: A special yaml file where the values are rules.\n- Resource: A common yaml file whose validity is checked by the validator.\n- Exclusions: List of keys or subsections in the resource whose validity will not be checked.\n- Prototypes: List items in schemas; resource list items should match one of these.\n\n\nRules\n-----\n\nA rule consists of a __token__ and a __criterion__. See tokens in the _Rulebook_ section. For example:\n\n`~ ETC/Utc` where the tilde (`~`) character is a known __token__ and the string `ETC/Utc` is a valid __criterion__ for\nthat rule.\n\nRules can be chained together by using the pipe (`|`) separator character:\n\n`\u003e 24 | ! .*:vlan_tag` which checks if the given number is greater than 24 and also validates uniqueness. Note that the\ncolon character (`:`) is the default separator in the yaml handlers.\n\n\nRulebook\n--------\n\nList of rules:\n\n- __Omission__ (`*`): This rule always evaluates to `True`. If no rule is given then validator defaults to this rule.\n- __Boolean__ (`?`): Use this rule for validating boolean values. Criterion can be any of `true`, `yes`, `on` and\n`false`, `no`, `off` for `True` and `False` values respectively. The evaluation of the criterion is case insensitive.\n- __Greater/Less than__ (`\u003e` / `\u003c`): Both the criterion and resource data will be evaluated and compared. Only numbers\nor mathematical expressions can be used. The evaluated criterion is always exclusive.\n- __RegExp__ (`~`): Validates against a regular expression. Note that backslash (`\\`) is an escape character in yaml\nfiles so it must be always doubled.\n- __Pre-defined RegExp__ (`@`): Validates against a common pre-defined regular expression, e.g.: IPv4, IPv6, etc.\n- __Uniqueness__ (`!`): This one is different from the others above. The criterion here is always a regular expression\nwhich should match multiple keys in the resource. Their values are collected and each of them must be unique in the\ncollection.\n\n\nCross reference\n---------------\n\n__Boolean__ and __Greater/Less than__ rules are able to use other resource keys' values as criteria. If the original\ncriterion is a regular expression that matches to one or more keys in the resource then validation will be performed\nby using their values as criteria (just like how __Uniqueness__ works). The validation stops at the first failure.\n\n\nExclusions\n----------\n\nIt is possible that there are minor deviations between resources for a given schema. In this case certain subsections\nmight fail in the validation. The validator, however, can be configured not to fail. Validation issues for keys or\nsubsections matching to regular expressions listed in a so-called __exclusions file__ will count as warnings instead\nof errors. The validator returns with exit code 0 if there were only warnings.\n\nConsider the following schema:\n\n```yaml\n---\nbase:\n section_a:\n   name: \"* name of section A\"\n   location: \"* location of section A\"\n section_b:\n   name: \"* name of section B\"\n   location: \"* location of section B\"\n```\n\nFor example one of your resources lacks `section_b` for some reason. Since the schema contains it the validator\nwould think that it is missing. To prevent this validation error you have to pass an exclusion file to the validator\nin which you put a regular expression matching `section_b`:\n\n```\nbase:section_b\n```\n\nLet's say that one of your resources have both sections, but lacks all `location` keys. Your exclusion file should\nlook like this:\n\n```\nbase:section.*:location\n```\n\nNote that the colon character (`:`) is the default separator in the yaml handlers.\n\n\nList validation\n---------------\n\nList types are handled differently. Each list item in the schema will be a __prototype__ item of that list it\nbelongs to. A prototype is also a bunch of key-value pairs, thus the values contain rules. When the validator\nencounters the same list in the resource it tries to find a matching prototype. First it looks if there is a prototype\nwith the same key set, then rule validation follows. The order or list item validation might be different each time.\n\n\nOutput\n------\n\nThere are two types of representation available for displaying validation results. Default is printing a table to\nstdout:\n\n```\n+----------+-----------------------------------+---------------------+-----------+---------------------+-------+-----+\n| Severity | Message                           | Schema              | Criterion | Resource            | Value | Ref |\n+----------+-----------------------------------+---------------------+-----------+---------------------+-------+-----+\n| Error    | Value must be less than criterion | root:less_than_rule | 1500      | root:less_than_rule | 1500  |     |\n+----------+-----------------------------------+---------------------+-----------+---------------------+-------+-----+\n```\n\nIf `raw` flag is set, then results are printed to stdout in JSON format:\n\n```javascript\n[\n  {\n    'criterion': '1500',\n    'message': 'Value must be less than criterion',\n    'ref': false,\n    'resource': 'root:less_than_rule',\n    'severity': 'Error',\n    'schema': 'root:less_than_rule',\n    'value': 1500\n  }\n]\n```\n\nExplanation:\n\n- __Severity__: `Error` or `Warning` depending on whether resource key is excluded or not. Validator returns with exit\ncode 1 if there is at least one issue with `Error` severity.\n- __Message__: Textual explanation of the issue.\n- __Schema__: Key in the schema file.\n- __Criterion__: Validation was performed against this value.\n- __Resource__: Key in the resource file.\n- __Value__: Value for the resource key.\n- __Ref__: If there is an asterisk (`*`) here, then criterion is taken from a cross referenced resource key and\n`Schema` field indicates which.\n\n\nLicense\n-------\nYAML Rulz! is made available under the [MIT License].\n\n\nCredits\n-------\nYAML Rulz! is written and managed by Milan Boleradszki.\n\n\n[travis img]:https://api.travis-ci.org/milonoir/yaml_rulz.svg?branch=master\n[travis]:https://travis-ci.org/milonoir/yaml_rulz\n[codecov img]:https://codecov.io/github/milonoir/yaml_rulz/coverage.svg?branch=master\n[codecov]:https://codecov.io/github/milonoir/yaml_rulz?branch=master\n[pypi img]:https://badge.fury.io/py/yaml-rulz.svg\n[pypi]:https://badge.fury.io/py/yaml-rulz\n[MIT License]:http://www.opensource.org/licenses/mit-license.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilonoir%2Fyaml_rulz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilonoir%2Fyaml_rulz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilonoir%2Fyaml_rulz/lists"}