cfn-nag vs pytest-ansible
cfn-nag
github.compytest-ansible
github.comSide by side
| Figure | cfn-nag | pytest-ansible |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | — |
| Open source | — | — |
| macOS | Yes | — |
| Linux | Yes | Yes |
| Self-hosted | Yes | — |
| Plans published | 1 | 0 |
| Spec score · Infrastructure Testing Tools | 8.0 (#9) | 6.7 (#25) |
| Integrations | The project documents running cfn-nag in GitHub Actions workflows and deploying it in AWS CodePipeline through the AWS Serverless Application Repository. | The documented ecosystem includes pytest, Ansible and Ansible collections, and legacy integration with Molecule. |
| License | The project uses the MIT License, which grants permission to use, copy, modify, merge, publish, distribute, sublicense, and sell the software subject to its terms. | The project says it is free and open source under the MIT license. |
| Purpose | cfn-nag scans CloudFormation templates for patterns that may indicate insecure infrastructure. | pytest-ansible is a pytest plugin for using Ansible in tests, running Ansible collection unit tests with pytest, and exposing Molecule scenarios through a pytest fixture. |
| Support | The project directs users to submit bug reports and feature requests through its GitHub issue tracker. | The README directs users with problems to file a GitHub issue with a detailed description. |
Plans
In their own words
cfn-nag
cfn-nag is free, MIT-licensed software that scans AWS CloudFormation templates for patterns that may indicate insecure infrastructure. It checks for overly permissive IAM policies and security-group rules, disabled access logging or encryption, and password literals. The scanner accepts JSON, .template, YAML, and YML files, and recursively processes subdirectories when given a directory. Results print to standard output, with JSON output available; failures return a non-zero exit code while warnings return success. Installation is documented through RubyGems and Homebrew, with Ruby 2.5 or later required for gem installation. A Dockerfile and Docker Hub image are provided. cfn-nag can run in GitHub Actions and AWS CodePipeline. Profiles, deny lists, per-resource suppressions, and custom rules support policy tailoring. Static analysis needs supplied parameter values to assess them and does not inspect false Fn::If outcomes by default.
pytest-ansible
pytest-ansible has no write-up on Specifiction yet; its figures are above.