{"id":24017579,"url":"https://github.com/piraces/kube-score-ga","last_synced_at":"2025-04-15T15:37:01.595Z","repository":{"id":59546012,"uuid":"289036148","full_name":"piraces/kube-score-ga","owner":"piraces","description":"Github action to execute kube-score with selected manifests (YAML, Helm or Kustomize)","archived":false,"fork":false,"pushed_at":"2022-09-17T14:54:06.000Z","size":6197,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-01T14:33:44.065Z","etag":null,"topics":["analysis","automation","charts","ci","github-actions","helm","kube-score","kubernetes","linter","security","static-code-analysis"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/piraces.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}},"created_at":"2020-08-20T15:02:55.000Z","updated_at":"2024-04-11T10:59:57.000Z","dependencies_parsed_at":"2023-01-05T05:03:10.177Z","dependency_job_id":null,"html_url":"https://github.com/piraces/kube-score-ga","commit_stats":{"total_commits":90,"total_committers":1,"mean_commits":90.0,"dds":0.0,"last_synced_commit":"3e9c2cf293ee5cc1950a357288a60fe5b1d6e6a7"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piraces%2Fkube-score-ga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piraces%2Fkube-score-ga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piraces%2Fkube-score-ga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piraces%2Fkube-score-ga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piraces","download_url":"https://codeload.github.com/piraces/kube-score-ga/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249099190,"owners_count":21212625,"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":["analysis","automation","charts","ci","github-actions","helm","kube-score","kubernetes","linter","security","static-code-analysis"],"created_at":"2025-01-08T09:41:45.045Z","updated_at":"2025-04-15T15:37:01.568Z","avatar_url":"https://github.com/piraces.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kube-score Github Action\n\n![Node.js CI (build, test, lint)](https://github.com/piraces/kube-score-ga/workflows/Node.js%20CI/badge.svg)\n![Action CI](https://github.com/piraces/kube-score-ga/workflows/Action%20CI/badge.svg)\n\nThis action executes [kube-score](https://kube-score.com/) with selected manifests (with support for YAML, Helm or Kustomize manifests).\n\n## Features\n\n💻 Compatible with Windows, Linux and Darwin Operating Systems.\n\n🏗 Supported architectures: ARMv6, ARM64, x64.\n\n📂 Multiple folders and files supported within one run of the action (with wildcards support).\n\n📤 Export all analysis results to an output file.\n\n🔢 All versions of kube-score can be selected and used.\n\n⚡ Support for caching kube-score tool to improve speed in subsequent runs.\n\n## Inputs\n\n### `kube-score-version`\n\n*(Optional)*: The version of kube-score to use. Defaults to the latest available.\n\n### `manifests-folders`\n\n**Required**: An array of relative paths containing manifests to analyze with kube-score (separated with commas). It is mandatory to establish a wildcard for the files or the concrete filename.\n\nExample: `./manifests/*.yml,./other/manifests/*.yml`\n\n### `ignore-exit-code`\n\n*(Optional)*: Will ignore the exit code provided by `kube-score`, will always pass the check. This could be useful in case of using the action in an information way.\n\n### `output-file`\n\n*(Optional)*: Generate an output file with the results of `kube-score` analysis for each manifest file (instead of printing in the standard output).\nEach analysis is separated by a text block.\n\n## Outputs\n\nThis action does not contain outputs. Only if `output-file` is provided, then a file will be generated but no handled as an output.\n\n## Example usage\n**Note**: it is necessary to perform a checkout of the repository before running the action.\n```\n- name: Checkout\n  uses: actions/checkout@v2\n- name: kube-score check\n  uses: piraces/kube-score-ga@v0.1.3\n  with:\n    manifests-folders: './manifests/*.yml'\n```\n\n## Usage with Helm or Kustomize\n[![Action CI (Helm)](https://github.com/piraces/kube-score-ga/actions/workflows/test-action-helm.yml/badge.svg)](https://github.com/piraces/kube-score-ga/actions/workflows/test-action-helm.yml)\n\n[![Action CI (Kustomize)](https://github.com/piraces/kube-score-ga/actions/workflows/test-action-kustomize.yml/badge.svg)](https://github.com/piraces/kube-score-ga/actions/workflows/test-action-kustomize.yml)\n\n**This action and kube-score itself can work with the output of [helm](https://helm.sh/) and [kustomize](https://kustomize.io/)**, some examples are provided in the workflows `.github/workflows/test-action-helm.yml` and `.github/workflows/test-action-kustomize.yml` which runs can be seen clicking in the badges above.\n\n**It is important to note that kube-score only parses static `yaml`**. Nevertheless, since `helm` and `kustomize` produce them, we can use the tool to scan them.\n\n### Helm\n\nIn the case for Helm, we can previously build the desired template, redirect the output to a file and then executing the action. For example:\n\n```\n- name: Checkout\n  uses: actions/checkout@v2\n- uses: azure/setup-helm@v3\n  name: Setup Helm\n  with:\n    token: ${{ secrets.GITHUB_TOKEN }} # only needed if version is 'latest'\n  id: install\n- name: Make temporal output directory\n  run: mkdir -p out/helm\n- name: Helm Template to standard template\n  run: helm template .\\sample-manifests\\helm\\example-chart \u003e ./out/helm/sample-helm.yaml\n- name: kube-score check\n  uses: piraces/kube-score-ga@v0.1.3\n  with:\n    manifests-folders: './out/helm/*.yml'\n```\n\nIn this case we are doing the same behaviour of the following command:\n```bash\nhelm template .\\sample-manifests\\helm\\example-chart | kube-score score -\n```\n\n### Kustomize\n\nThe case for Kustomize is mostly the same as Helm, we can previously build the desired template, redirect the output to a file and then executing the action. For example:\n\n```\n- name: Checkout\n  uses: actions/checkout@v2\n- uses: azure/setup-kubectl@v3\n  id: install\n- name: Make temporal output directory\n  run: mkdir -p out/kustomize\n- name: kustomize build to standard template\n  run: kubectl kustomize sample-manifests/kustomize/overlays/production \u003e ./out/kustomize/sample-kustomize.yaml\n- name: kube-score check\n  uses: piraces/kube-score-ga@v0.1.3\n  with:\n    manifests-folders: './out/kustomize/*.yml'\n```\n\nIn this case we are doing the same behaviour of the following command:\n```bash\nkustomize build sample-manifests/kustomize/overlays/production | kube-score score -\n```\n\nOr with `kubectl`:\n```bash\nkubectl kustomize sample-manifests/kustomize/overlays/production | kube-score score -\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiraces%2Fkube-score-ga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiraces%2Fkube-score-ga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiraces%2Fkube-score-ga/lists"}