{"id":18940741,"url":"https://github.com/aws-cloudformation/resource-schema-guard-rail","last_synced_at":"2025-04-15T19:31:36.302Z","repository":{"id":171436636,"uuid":"539651479","full_name":"aws-cloudformation/resource-schema-guard-rail","owner":"aws-cloudformation","description":"The CloudFormation Resource Schema Guard Rail allows you to evaluate resource schema compliance against CloudFormation enforced best practices","archived":false,"fork":false,"pushed_at":"2024-04-12T18:55:24.000Z","size":149,"stargazers_count":6,"open_issues_count":3,"forks_count":2,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-04-14T15:23:30.117Z","etag":null,"topics":["aws","aws-cloudformation","cfn-guard","cloudformation"],"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/aws-cloudformation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-09-21T19:24:11.000Z","updated_at":"2024-04-15T19:36:46.427Z","dependencies_parsed_at":"2024-04-15T19:49:31.064Z","dependency_job_id":null,"html_url":"https://github.com/aws-cloudformation/resource-schema-guard-rail","commit_stats":null,"previous_names":["aws-cloudformation/resource-schema-guard-rail"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-cloudformation%2Fresource-schema-guard-rail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-cloudformation%2Fresource-schema-guard-rail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-cloudformation%2Fresource-schema-guard-rail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-cloudformation%2Fresource-schema-guard-rail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws-cloudformation","download_url":"https://codeload.github.com/aws-cloudformation/resource-schema-guard-rail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223090235,"owners_count":17085827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws","aws-cloudformation","cfn-guard","cloudformation"],"created_at":"2024-11-08T12:24:01.465Z","updated_at":"2024-11-08T12:24:02.213Z","avatar_url":"https://github.com/aws-cloudformation.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudFormation - Resource Schema Guard Rail\n![Apache 2.0 License](https://img.shields.io/github/license/aws-cloudformation/resource-schema-guard-rail)\n[![Pull Request CI](https://github.com/aws-cloudformation/resource-schema-guard-rail/actions/workflows/pr-ci.yml/badge.svg?branch=main)](https://github.com/aws-cloudformation/resource-schema-guard-rail/actions/workflows/pr-ci.yml)\n[![PyPI](https://img.shields.io/pypi/v/resource-schema-guard-rail?label=pypi)](https://badge.fury.io/py/resource-schema-guard-rail)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/resource-schema-guard-rail?label=python)](https://pypi.org/project/resource-schema-guard-rail/)\n\n### Notes\nThis is not a stable version (Beta), it's still under development\n\n## Overview\nAWS CloudFormation Resource Schema Guard Rail is an open-source tool, which uses [CloudFormation Guard](https://github.com/aws-cloudformation/cloudformation-guard/) policy-as-code evaluation engine to assess resource schema compliance. It validates json resource schemas against the AWS CloudFormation modeling best practices.\n\n### Contribute\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.\n#### Rule Development\nRead [Guard Rail: Rule Development](docs/RULE_DEVELOPMENT.md) for more information on how to write resource schema rules.\n\n### How to use it?\nSchema guard rail package has a built-in library of rules, that CloudFormation believe are the best practices that resource modelers should follow. It supports two types of evaluation - Basic Linting \u0026 Breaking Change;\n\n#### Basic Linter (Stateless)\nLinter works only with current version of resource schema and runs CloudFormation authored rules, which will highlight problematic schema constructs. A provider developers can run multiple independent schemas at once as well as attach custom rules.\n\nIn order to start using Basic Linting you need to run following command:\n```bash\n$ guard-rail --schema file://path-to-schema-1 --schema file://path-to-schema-2 --rule file://path-to-custom-ruleset1 --rule file://path-to-custom-ruleset2\n```\n\n**[List of Linting Rules](docs/BASIC_LINTING.md)**\n\n#### Breaking Change (Stateful)\nAlong with basic linting, guard rail supports capability of breaking change evaluation. Provider developer must provider two json objects - previous \u0026 current versions of the same resource schema. CloudFormation authored rules will be run and evaluation current version of the schema whether it is compliant or not.\n\nIn order to start using Basic Linting you need to run following command:\n```bash\n$ guard-rail --schema file://path-to-schema-1 --schema file://path-to-schema-2 --rule ... --stateful\n```\n\n**[List of Breaking Change Rules](docs/BREAKING_CHANGE.md)**\n\n\n*Additionally, you can specify `format` argument, which will produce a nicely formatted output.\n\n### How to install it locally?\n\nUse following commands\n\n#### Clone github repo\n```bash\n$ git clone git@github.com:aws-cloudformation/resource-schema-guard-rail.git\n```\n#### Create Virtual Environment \u0026 Activate\n```\npython3 -m venv env\nsource env/bin/activate\n```\n\n#### Install Package Locally from the root\n\n```\npip install -e . -r requirements.txt\npre-commit install\n```\n\n#### Run CI Locally\n\n```\n# run all hooks on all files, mirrors what the CI runs\npre-commit run --all-files\n```\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n\n## Community\n\nJoin us on Discord! Connect \u0026 interact with CloudFormation developers \u0026\nexperts, find channels to discuss and get help for our CLI, cfn-lint, CloudFormation registry, StackSets,\nGuard and more:\n\n[![Join our Discord](https://discordapp.com/api/guilds/981586120448020580/widget.png?style=banner3)](https://discord.gg/9zpd7TTRwq)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-cloudformation%2Fresource-schema-guard-rail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws-cloudformation%2Fresource-schema-guard-rail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-cloudformation%2Fresource-schema-guard-rail/lists"}