Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chain bench config file and output assertion rules #57

Open
itaywol opened this issue Jul 8, 2022 · 2 comments
Open

chain bench config file and output assertion rules #57

itaywol opened this issue Jul 8, 2022 · 2 comments

Comments

@itaywol
Copy link
Contributor

itaywol commented Jul 8, 2022

My idea here is creating a .chain-benchrc | chain-bench.config.json file that the repository will hold
And upon running the cli in the context of that repository it will read that config file for any configuration for chain-bench

Leveraging that config file, add rules key into the json with sub keys pass and fail those will hold assertions over the json output of chain-bench that will decide what will be the exit code.

For now when I want to assert over the chain bench output (JSON format), I am doing it with jq or rego.

@itaywol itaywol changed the title chain bench config file and rules chain bench config file and output assertion rules Jul 8, 2022
@itaywol
Copy link
Contributor Author

itaywol commented Jul 8, 2022

Something like so

{
    "quiet":true, // Other configurations here
    "rules": {
        "https://github.com/aquasecurity/*": { // Supporting wildcards
            "fail":{
                "1.1.3": {
                    "result":"Failed"
                },
                "1.1.14": ["Failed","Unknown"] // Alternatively supporting couple of results
            }
        }

    }
}

So everytime you run chain-bench against any repository in aquasecurity the following rules will be applied

@naortalmor1
Copy link
Collaborator

Like that! will be great feature, we'll take it 🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants