After setting up a Git Repository Integration, OpsLevel can continuously scan your code repositories and verify all of the operational best practices you’ve defined.
Along with the integration comes two new checks: the Repo File Check and the Repo Search Check.
The Repo File Check
With the Repo File Check, you can verify the existence or contents of a file in your repo.
Why would you want to do that? Well, let’s see some examples of different kinds of checks you can build:
Repo File Check Examples
Verify Rails is not logging passwords
Part of the Rails Security Guide talks about how to set up Rails to not log passwords. You can verify that your apps have this enabled:
Filename - config/initializers/filter_parameter_logging.rb
Predicate - contains
Contents - config.filter_parameters << :password
Verify CircleCI is setup properly
If you use CircleCI, you can verify any aspect of your continuous integration. For example, you may want to verify that linting is enabled with Danger or that you’re running tests with Rspec.
Filename - .circleci/config.yml .circleci/config.yml
Predicate - contains contains
Contents - bundle exec rspec -run:danger
You can read more about repo file check in our documentation section.