{"id":18538946,"url":"https://github.com/eitrtechnologies/pre-commit-yamlpolicy","last_synced_at":"2026-03-05T02:02:46.075Z","repository":{"id":120633474,"uuid":"448112240","full_name":"eitrtechnologies/pre-commit-yamlpolicy","owner":"eitrtechnologies","description":"pre-commit hooks to allow an organization to specify YAML usage policy.","archived":false,"fork":false,"pushed_at":"2023-02-03T19:26:55.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T16:53:28.007Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eitrtechnologies.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-14T21:29:04.000Z","updated_at":"2023-08-23T06:11:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1dd1fac-6337-45c4-a085-1bee739ae3b1","html_url":"https://github.com/eitrtechnologies/pre-commit-yamlpolicy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/eitrtechnologies/pre-commit-yamlpolicy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitrtechnologies%2Fpre-commit-yamlpolicy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitrtechnologies%2Fpre-commit-yamlpolicy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitrtechnologies%2Fpre-commit-yamlpolicy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitrtechnologies%2Fpre-commit-yamlpolicy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eitrtechnologies","download_url":"https://codeload.github.com/eitrtechnologies/pre-commit-yamlpolicy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitrtechnologies%2Fpre-commit-yamlpolicy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30106144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:39:18.192Z","status":"online","status_checked_at":"2026-03-05T02:00:06.710Z","response_time":93,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-06T19:45:37.630Z","updated_at":"2026-03-05T02:02:46.039Z","avatar_url":"https://github.com/eitrtechnologies.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pre-commit-yamlpolicy\npre-commit hooks to deny commits which don't conform to organizational YAML\nusage policies.\n\nSee also: \u003chttps://github.com/pre-commit/pre-commit\u003e\n\n### Using pre-commit-yamlpolicy with pre-commit\n\nAdd this to your `.pre-commit-config.yaml`\n\n```yaml\nrepos:\n- repo: https://github.com/eitrtechnologies/pre-commit-yamlpolicy\n  rev: v1.3.0  # Use the ref you want to point to\n  hooks:\n    - id: bannedk8skinds\n    - id: disallowunquoted\n    - id: valueregex\n      args:\n        - --jmespath\n        - '*.matchers[].match'\n        - --regex\n        - '\\([^ ]|[^ ]\\)'\n        - --error-message\n        - Found parentheses too close together. Can haz fix plz?\n```\n\n### Hooks Available\n\n#### `bannedk8skinds`\nDeny commits of certain Kubernetes object types.\n  - `--allow-multiple-documents` - allow yaml files which use the\n    [multi-document syntax](http://www.yaml.org/spec/1.2/spec.html#YAML)\n  - `--kinds` - Specify a comma-separated list of\n    [Kubernetes object types](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds)\n    which will be denied in a commit to the repo. Defaults to `Secret`\n\n#### `disallowunquoted`\nDeny commits where certain YAML values are found but not quoted.\n  - `--values` - Specify a comma-separated list of YAML values to disallow.\n    Defaults to `on,off,yes,no,y,n`.\n  - `--case-sensitive` - Flag to turn off case insensitivity when searching for\n    values. Operation defaults to ignore case.\n\n#### `valueregex`\nDeny commits where certain YAML values are found and match a given regex. A\nJMESPath query is used in conjunction with a regular expression to match string\nvalues in YAML.\n  - `--jmespath` - [JMESPath expression](https://jmespath.org/) which returns\n    the values to run a regex against. *REQUIRED*\n  - `--regex` - Regex which will cause the hook to fail if it matches any of the\n    values returned by the JMESPath query. *REQUIRED*\n  - `--error-message` - Message to display when a match is found. This allows\n    a more user-friendly message to be displayed for a given regex match.\n  - `--allow-multiple-documents` - Allow YAML files which use the\n    [multi-document syntax](http://www.yaml.org/spec/1.2/spec.html#YAML)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitrtechnologies%2Fpre-commit-yamlpolicy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feitrtechnologies%2Fpre-commit-yamlpolicy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitrtechnologies%2Fpre-commit-yamlpolicy/lists"}