{"id":21664006,"url":"https://github.com/datreeio/codefresh-datree","last_synced_at":"2025-07-17T13:33:52.813Z","repository":{"id":102935415,"uuid":"501205123","full_name":"datreeio/codefresh-datree","owner":"datreeio","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-10T05:45:28.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T00:09:09.860Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/datreeio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-06-08T10:35:48.000Z","updated_at":"2022-06-20T05:49:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"792b2199-aea8-438f-b0f4-dbfe462ce143","html_url":"https://github.com/datreeio/codefresh-datree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/datreeio/codefresh-datree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fcodefresh-datree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fcodefresh-datree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fcodefresh-datree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fcodefresh-datree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datreeio","download_url":"https://codeload.github.com/datreeio/codefresh-datree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fcodefresh-datree/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265611343,"owners_count":23797866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-25T10:30:23.925Z","updated_at":"2025-07-17T13:33:52.795Z","avatar_url":"https://github.com/datreeio.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nA Codefresh plugin that runs the Datree CLI.  \nUse this plugin to easily scan your k8s manifest files, Helm charts and Kustomizations for misconfigurations as part of your CI.\n\nClick [here](https://codefresh.io/steps/step/datree%2Fdatree-policy-check) to view the plugin in the Codefresh marketplace.\n\n## Setup\nGet started in 2 simple steps:  \n\n* Obtain your Datree account token by following the instructions described [here](https://hub.datree.io/account-token).\n* Configure your token by passing it directly to the 'DATREE_TOKEN' parameter, or by setting it as a [shared secret variable](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/shared-configuration/) in your codefresh dashboard (see examples below).\n\n## Usage\n\nThe following parameters determine the plugin's behavior:  \n| Setting | Required | Description |\n| --- | ----------- | --- |\n| **DATREE_TOKEN** | Yes | your Datree CLI token. |\n| **INPUT_PATH** | Yes | A path to the file/s you wish to run your Datree test against. This can be a single file or a [Glob pattern](https://www.digitalocean.com/community/tools/glob) signifying a directory. |\n| **CLI_ARGUMENTS** | No | The desired [Datree CLI arguments](https://hub.datree.io/cli-arguments) for the policy check. |\n| **IS_HELM_CHART** | No | Specify whether the given path is a Helm chart. If this option is unused, the path will be considered as a regular yaml file. |\n| **HELM_ARGUMENTS** | No | The Helm arguments to be used, if the path is a Helm chart. |\n| **IS_KUSTOMIZATION** | No | Specify whether the given path is a directory containing a \"kustomization.yaml\" file. If this option is unused, the path will be considered as a regular yaml file. |\n| **KUSTOMIZE_ARGUMENTS** | No | The Kustomize arguments to be used, if the path is a Kustomization directory. |  \n\n*For more information and examples of using this plugin with Helm/Kustomize, see below*\n\n## Examples\nHere is an example pipeline that runs a Datree policy check on a file in the repository. This example uses a shared secret variable for the CLI token called DATREE_TOKEN (can be configured via the codefresh dashboard):\n```yaml\nversion: \"1.0\"\nstages:\n  - \"clone\"\n  - \"datree-policy-check\"\n\nsteps:\n  clone:\n    title: \"Cloning repository\"\n    type: \"git-clone\"\n    repo: \"myOrg/myRepo\"\n    revision: \"${{CF_BRANCH}}\"\n    git: \"github\"\n    stage: \"clone\"\n    \n  datree-policy-check:\n    title: Run Datree policy check\n    type: datree/datree-policy-check\n    stage: \"datree-policy-check\"\n    arguments:\n      DATREE_TOKEN: \"${{DATREE_TOKEN}}\"\n      INPUT_PATH: 'fileName.yaml'\n```\n\n### Using Helm\nThis plugin enables performing policy checks on Helm charts, by utilizing the [Datree Helm plugin](https://github.com/datreeio/helm-datree).\nTo test a Helm chart, simply set `IS_HELM_CHART` to 'true', and add any Helm arguments you wish to use to the `HELM_ARGUMENTS` parameter, like so:\n```yaml\ndatree-policy-check:\n    title: Run Datree policy check\n    type: datree/datree-policy-check\n    stage: \"datree-policy-check\"\n    arguments:\n      DATREE_TOKEN: \"${{DATREE_TOKEN}}\"\n      INPUT_PATH: 'my/chart/directory'\n      IS_HELM_CHART: true\n      HELM_ARGUMENTS: \"--values values.yaml\"\n```\n\n### Using Kustomize\nThis plugin utilizes the Datree CLI's built-in Kustomize support. To use the plugin to test a kustomization, set `IS_KUSTOMIZATION` to 'true', and add any Kustomize arguments you wish to use to the `KUSTOMIZE_ARGUMENTS` parameter, like so:\n```yaml\ndatree-policy-check:\n    title: Run Datree policy check\n    type: datree/datree-policy-check\n    stage: \"datree-policy-check\"\n    arguments:\n      DATREE_TOKEN: \"${{DATREE_TOKEN}}\"\n      INPUT_PATH: 'my/kustomization/directory'\n      IS_KUSTOMIZATION: true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatreeio%2Fcodefresh-datree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatreeio%2Fcodefresh-datree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatreeio%2Fcodefresh-datree/lists"}