GithubHelp home page GithubHelp logo

redhat-cop / rego-policies Goto Github PK

View Code? Open in Web Editor NEW
151.0 12.0 36.0 3.3 MB

Rego policies collection

License: Apache License 2.0

Open Policy Agent 34.96% Shell 65.04%
container-cop rego opa conftest gatekeeper

rego-policies's Introduction

Run conftest-unittests.sh Check POLICIES.md is up-to-date Lint policies with Regal Run gatekeeper-k8s-integrationtests.sh OpenSSF Scorecard

rego-policies

Rego policies collection.

Policies

For a full list of policies, see the auto-generated POLICIES.md

The naming of the policies follows the Gatekeeper format, as described here.

Want to run the policies on a k8s/OCP cluster? See TESTING.md

Tools

Conftest

conftest is a CLI to execute rego policies. It can be used to test locally before pushing to OPA.

OPA Playground

OPA provides a web based playground, which can highlight which lines have been activated. Having issues with your policy? check it out with "Coverage" enabled:

Slack for all things

Stuck on a problem?

rego-policies's People

Contributors

anderseknert avatar austinpray-mixpanel avatar ckavili avatar dependabot[bot] avatar deweya avatar garethahealy avatar monodot avatar pabrahamsson avatar renovate[bot] avatar sabre1041 avatar springdo avatar tegioz avatar tylerauerbeck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rego-policies's Issues

Should the package be set per policy?

Currently, all the policies live in the package main as that's what the OPA examples tell you. But if you look at "real world" examples in gatekeeper, they are all in their own packages. I presume this is so multiple policies don't fire for one constraint - not 100% sure.

If we did update the packages to be unique per policy, it would make the testing easier as their would be no cross-firing of rules, i.e.: 1 rule fires against its own test data, vs currently, all rules fire against 1 set of test data.

Come up with a policy testing strategy

How should a new or updated policy be tested to verify it does the right thing?
This will also be helpful for reviewing PRs and can be used for CI as well.

Trigger other repos when merged into master

I think it would be a good idea to trigger other repos ci which contain conftest. As raised by:

It would be good to know that this repo doesn't break other repos. It will also improve the reliability of this repo overall.

Current repos with conftest:

The changes required are described here:

Since the bot has access to these repos, I'd guess that would be the best "person" to get a token off.

@pabrahamsson ; thoughts?

Update docs

konstraint has changed the doc format, so need to update our stuff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.