{"id":13408165,"url":"https://github.com/plexsystems/konstraint","last_synced_at":"2026-01-14T20:27:28.176Z","repository":{"id":37027137,"uuid":"208185891","full_name":"plexsystems/konstraint","owner":"plexsystems","description":"A policy management tool for interacting with Gatekeeper","archived":false,"fork":false,"pushed_at":"2025-09-10T22:01:39.000Z","size":1428,"stargazers_count":391,"open_issues_count":18,"forks_count":50,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-08T14:52:24.233Z","etag":null,"topics":["conftest","gatekeeper","kubernetes","opa","open-policy-agent","policy","rego"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plexsystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-13T03:02:46.000Z","updated_at":"2025-08-12T11:33:09.000Z","dependencies_parsed_at":"2023-02-19T12:31:38.923Z","dependency_job_id":"e5ddf991-b7d7-45d2-b582-213e1ba9526a","html_url":"https://github.com/plexsystems/konstraint","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/plexsystems/konstraint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexsystems%2Fkonstraint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexsystems%2Fkonstraint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexsystems%2Fkonstraint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexsystems%2Fkonstraint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plexsystems","download_url":"https://codeload.github.com/plexsystems/konstraint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexsystems%2Fkonstraint/sbom","scorecard":{"id":737759,"data":{"date":"2025-08-11","repo":{"name":"github.com/plexsystems/konstraint","commit":"76901b5726522cf8872fb3f6022d83c40e1ed711"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Maintained","score":5,"reason":"5 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":7,"reason":"Found 7/9 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/cron_e2e.yaml:1","Warn: no topLevel permission defined: .github/workflows/pull_request.yaml:1","Warn: no topLevel permission defined: .github/workflows/release.yaml:1","Warn: no topLevel permission defined: .github/workflows/update_cli_docs.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cron_e2e.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/cron_e2e.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cron_e2e.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/cron_e2e.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cron_e2e.yaml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/cron_e2e.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cron_e2e.yaml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/cron_e2e.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cron_e2e.yaml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/cron_e2e.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cron_e2e.yaml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/cron_e2e.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:165: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:186: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:189: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:100: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:105: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:126: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:129: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:137: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yaml:151: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/pull_request.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/release.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/release.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/release.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update_cli_docs.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/update_cli_docs.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update_cli_docs.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/update_cli_docs.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_cli_docs.yaml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/plexsystems/konstraint/update_cli_docs.yaml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:15: pin your Docker image by updating alpine:3.22.0 to alpine:3.22.0@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715","Warn: npmCommand not pinned by hash: .github/workflows/pull_request.yaml:57","Warn: npmCommand not pinned by hash: .github/workflows/pull_request.yaml:61","Info:   0 out of  22 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  14 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.43.0 not signed: https://api.github.com/repos/plexsystems/konstraint/releases/224201279","Warn: release artifact v0.42.0 not signed: https://api.github.com/repos/plexsystems/konstraint/releases/216380187","Warn: release artifact v0.41.0 not signed: https://api.github.com/repos/plexsystems/konstraint/releases/203185102","Warn: release artifact v0.40.0 not signed: https://api.github.com/repos/plexsystems/konstraint/releases/200538709","Warn: release artifact v0.39.0 not signed: https://api.github.com/repos/plexsystems/konstraint/releases/199228489","Warn: release artifact v0.43.0 does not have provenance: https://api.github.com/repos/plexsystems/konstraint/releases/224201279","Warn: release artifact v0.42.0 does not have provenance: https://api.github.com/repos/plexsystems/konstraint/releases/216380187","Warn: release artifact v0.41.0 does not have provenance: https://api.github.com/repos/plexsystems/konstraint/releases/203185102","Warn: release artifact v0.40.0 does not have provenance: https://api.github.com/repos/plexsystems/konstraint/releases/200538709","Warn: release artifact v0.39.0 does not have provenance: https://api.github.com/repos/plexsystems/konstraint/releases/199228489"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/pull_request.yaml:77"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3787 / GHSA-fv92-fjc5-jj9h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T16:24:27.285Z","repository_id":37027137,"created_at":"2025-08-22T16:24:27.285Z","updated_at":"2025-08-22T16:24:27.285Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["conftest","gatekeeper","kubernetes","opa","open-policy-agent","policy","rego"],"created_at":"2024-07-30T20:00:51.147Z","updated_at":"2026-01-14T20:27:28.156Z","avatar_url":"https://github.com/plexsystems.png","language":"Go","funding_links":[],"categories":["Go","Tools and Libraries","kubernetes","Kubernetes","Tools"],"sub_categories":["Security and Compliance","Built with Wasm","Others"],"readme":"# Konstraint\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/plexsystems/konstraint)](https://goreportcard.com/report/github.com/plexsystems/konstraint)\n[![GitHub release](https://img.shields.io/github/release/plexsystems/konstraint.svg)](https://github.com/plexsystems/konstraint/releases)\n\n![logo](images/logo.png)\n\nKonstraint is a CLI tool to assist with the creation and management of templates and constraints when using [Gatekeeper](https://github.com/open-policy-agent/gatekeeper).\n\n## Installation\n\n```text\ngo install github.com/plexsystems/konstraint@latest\n```\n\nA docker image is also provided for each release:\n\n```text\ndocker run -v $PWD:/konstraint ghcr.io/plexsystems/konstraint create /konstraint/examples\n```\n\n## Usage\n\nTo create the Gatekeeper resources, use `konstraint create \u003cpolicy_dir\u003e`.\n\nTo generate the accompanying documentation, use `konstraint doc \u003cpolicy_dir\u003e`.\n\nBoth commands support the `--output` flag to specify where to save the output. For more detailed usage documentation, see the [CLI Documentation](docs/cli/konstraint.md).\n\n## Why this tool exists\n\n### Automatically copy Rego to the ConstraintTemplate\n\nWhen writing policies for Gatekeeper, the Rego must be added to [ConstraintTemplates](https://github.com/open-policy-agent/gatekeeper#constraint-templates) in order for Gatekeeper to enforce the policy. This creates a scenario in which the Rego is written in a `.rego` file, and then copied into the ConstraintTemplate. When a change is needed to be made to the Rego, both instances must be updated.\n\n### Automatically update all ConstraintTemplates with library changes\n\nGatekeeper supports importing _libraries_ into `ConstraintTemplates` with the `libs` field. If a change is required to the imported library, every template must be updated to include this new change.\n\n### Enable writing the same policies for Conftest and Gatekeeper\n\nWith Gatekeeper, policies are evaluated in the context of an [AdmissionReview](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#webhook-request-and-response). This means that policies are typically written with a prefix of `input.review.object`.\n\nWith [Conftest](https://github.com/open-policy-agent/conftest), policies are written against `yaml` files.\n\nThis creates a scenario where the policy needs to be written differently depending upon the context in which the policy is being evaluated in.\n\n### Kubernetes Libraries\n\nIn the [examples/lib](examples/lib) directory, there are multiple libraries that enable policies to be written for both Conftest and Gatekeeper.\n\nYou can include as little or as many of these libraries into your policies as desired.\n\n#### Purpose\n\nBy first validating the Kubernetes manifests with `Conftest` on a local machine, we can catch manifests that would otherwise violate policy without needing to deploy to a cluster running Gatekeeper.\n\n## FAQ\n\n**Konstraint ran without error, but I don't see any new files.**\n\nThis typically means no policies were found, or the policies did not have any `violation[]` rules, so they are not compatible with Gatekeeper.\n\nFor more information, see [How Constraints are Created](docs/constraint_creation.md).\n\n**My ConstraintTemplates are missing the input parameters**\n\nInput parameters can be specified by using one or more `@parameter \u003cname\u003e \u003ctype\u003e` tags in the comment header block. If you use input parameters, Konstraint will skip generating the `Constraint` resource for that policy.\n\nFor more information, see [Using Input Parameters](docs/constraint_creation.md#using-input-parameters).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplexsystems%2Fkonstraint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplexsystems%2Fkonstraint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplexsystems%2Fkonstraint/lists"}