{"id":20237121,"url":"https://github.com/blinkk/amagaki-plugin-kintaro","last_synced_at":"2026-06-05T04:31:52.031Z","repository":{"id":40340767,"uuid":"375522477","full_name":"blinkk/amagaki-plugin-kintaro","owner":"blinkk","description":"Amagaki plugin that provides Kintaro integration for content management. Features include creating routes from Kintaro collections and locale integration.","archived":false,"fork":false,"pushed_at":"2022-09-09T22:29:07.000Z","size":972,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-25T21:03:21.787Z","etag":null,"topics":["amagaki","headlesscms","kintaro"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blinkk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-10T00:18:52.000Z","updated_at":"2022-01-10T18:28:02.000Z","dependencies_parsed_at":"2022-08-09T17:41:05.189Z","dependency_job_id":null,"html_url":"https://github.com/blinkk/amagaki-plugin-kintaro","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/blinkk/amagaki-plugin-kintaro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinkk%2Famagaki-plugin-kintaro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinkk%2Famagaki-plugin-kintaro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinkk%2Famagaki-plugin-kintaro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinkk%2Famagaki-plugin-kintaro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blinkk","download_url":"https://codeload.github.com/blinkk/amagaki-plugin-kintaro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinkk%2Famagaki-plugin-kintaro/sbom","scorecard":{"id":243464,"data":{"date":"2025-08-11","repo":{"name":"github.com/blinkk/amagaki-plugin-kintaro","commit":"acd6b494715b9b9ac5968c2423b695b56fde2874"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","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":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","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":"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/release-please.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml: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":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-please.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/blinkk/amagaki-plugin-kintaro/release-please.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-please.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/blinkk/amagaki-plugin-kintaro/release-please.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-please.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/blinkk/amagaki-plugin-kintaro/release-please.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/blinkk/amagaki-plugin-kintaro/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/blinkk/amagaki-plugin-kintaro/test.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:25","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand 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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 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":0,"reason":"58 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-x77j-w7wf-fjmw","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-7v5v-9h63-cj86","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-p3vf-v8qc-cwcr","Warn: Project is vulnerable to: GHSA-gx9m-whjm-85jf","Warn: Project is vulnerable to: GHSA-mmhx-hmjr-r674","Warn: Project is vulnerable to: GHSA-vhxf-7vqr-mrjg","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4r62-v4vq-hr96","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-g954-5hwp-pp24","Warn: Project is vulnerable to: GHSA-h755-8qp9-cq85","Warn: Project is vulnerable to: GHSA-4943-9vgg-gr5r","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"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-17T07:03:48.024Z","repository_id":40340767,"created_at":"2025-08-17T07:03:48.024Z","updated_at":"2025-08-17T07:03:48.024Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33930307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["amagaki","headlesscms","kintaro"],"created_at":"2024-11-14T08:24:49.266Z","updated_at":"2026-06-05T04:31:52.002Z","avatar_url":"https://github.com/blinkk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amagaki-plugin-kintaro\n\n[![NPM Version][npm-image]][npm-url]\n[![GitHub Actions][github-image]][github-url]\n[![TypeScript Style Guide][gts-image]][gts-url]\n\nAn experimental Amagaki plugin for integration with Kintaro, a headless CMS.\n\nFeatures include:\n\n- **Dynamic routing**: Create Amagaki routes from Kintaro collections.\n- **Translation importing**: Import Kintaro translations to Amagaki locales.\n\n## Usage\n\n1. Install the plugin.\n\n```shell\nnpm install --save @amagaki/amagaki-plugin-kintaro\n```\n\n2. Authenticate. See [authentication](#authentication) for details.\n\n3. Access the plugin in `amagaki.ts`:\n\n```typescript\nimport {BuilderPlugin, Pod, ServerPlugin} from '@amagaki/amagaki';\nimport {KintaroPlugin} from '@amagaki/amagaki-plugin-kintaro';\n\nexport default (pod: Pod) =\u003e {\n  const kintaro = KintaroPlugin.register(pod, {\n    repoId: '\u003cKintaro Repo ID\u003e',\n    projectId: '\u003cKintaro Project ID\u003e',\n  });\n\n  // Download and bind kintaro collections\n  const serverPlugin = pod.plugins.get('ServerPlugin') as ServerPlugin;\n  serverPlugin.register(async () =\u003e {\n    try {\n      await kintaro.bindCollection({\n        collectionPath: '/content/kintaro/',\n      });\n    } catch (err) {\n      console.warn(`[Kintaro Plugin] Unable to download; ${err}`);\n    }\n  });\n\n  // Create Amagaki routes from a Kintaro collection.\n  const setup = async () =\u003e {\n    await kintaro.addRouteProvider({\n      collectionId: '\u003cKintaro Collection ID\u003e',\n      path: '/posts/${doc.basename}/${doc.fields.slug}/',\n      view: '/views/base.njk',\n    });\n  };\n\n  const builder = pod.plugins.get('BuilderPlugin') as BuilderPlugin;\n  builder.addBeforeBuildStep(async () =\u003e {\n    await setup();\n  });\n\n  const server = pod.plugins.get('ServerPlugin') as ServerPlugin;\n  server.register(async () =\u003e {\n    await setup();\n  });\n\n  // Import translations to your Amagaki project.\n  await kintaro.importTranslations({\n    stringKeyPatterns: [\n      '_label$',\n      '.label$',\n      '.text$',\n      '.title$',\n      '^cta_text_alt$',\n      '^description$',\n      '^headline$',\n      '^next$',\n      '^previous$',\n      '^site_name$',\n      '^title$',\n    ],\n  });\n};\n```\n\n[github-image]: https://github.com/blinkk/amagaki-plugin-kintaro/workflows/Run%20tests/badge.svg\n[github-url]: https://github.com/blinkk/amagaki-plugin-kintaro/actions\n[npm-image]: https://img.shields.io/npm/v/@amagaki/amagaki-plugin-kintaro.svg\n[npm-url]: https://npmjs.org/package/@amagaki/amagaki-plugin-kintaro\n[gts-image]: https://img.shields.io/badge/code%20style-google-blueviolet.svg\n[gts-url]: https://github.com/google/gts\n\n## Features\n\n### Dynamic routing\n\n(To be documented)\n\n- Similar to other tools that integrate with Kintaro, you may use the `?flush`\n  query parameter to reset the cache. Add `?flush` to reload Kintaro content\n  without restarting the server.\n\n### Translation importing\n\n(To be documented)\n\n## Authentication\n\nThere are two ways to authenticate. We recommend using the application default\nidentity (option 1), but using a service account key file is acceptable as well.\n\n### Option 1: Using application default credentials\n\n1. Install the `gcloud SDK`. [See instructions](https://cloud.google.com/sdk/docs/downloads-interactive).\n2. Login and set the application default credentials. Ensure you provide the required scopes.\n\n```bash\ngcloud auth application-default login \\\n  --scopes=openid,https://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/kintaro\n```\n\n3. That's it! Now, Amagaki will use the signed in Google Account to fetch content.\n\n### Option 2: Using a service account key file\n\n1. Acquire a service account key file. You can do this interactively, from the IAM section of the Google Cloud Console, or you can do this via the `gcloud` CLI (see below for an example).\n\n```\nPROJECT=\u003cGoogle Cloud Project ID\u003e\n\n# Create a service account named `amagaki`.\ngcloud --project=$PROJECT \\\n  iam service-accounts create \\\n  amagaki\n\n# Create a JSON key and download it to `key.json`.\ngcloud --project=$PROJECT \\\n  iam service-accounts keys create \\\n  --iam-account amagaki@$PROJECT.iam.gserviceaccount.com \\\n  key.json\n```\n\n2. Ensure `key.json` is added to your `.gitignore`.\n3. Ensure Kintaro (workspace) is shared with the service account. Service\n   accounts that have never accessed Kintaro before must be whitelisted.\n4. Pass `keyFile` to the plugin.\n\n```typescript\nKintaroPlugin.register(pod, {\n  keyFile: 'key.json',\n  repoId: '\u003cKintaro Repo ID\u003e',\n  projectId: '\u003cKintaro Project ID\u003e',\n});\n```\n\n## Simulate webhooks\n\nKintaro does not support webhooks – as a result there is no inbuilt way to run\nbuilds when a workspace is published. As a workaround, you can deploy a Google\nCloud Function to poll Kintaro for the last time a workspace was published. When\na publish event is observed via the polling mechanism, a new cloud build is\nsubmitted.\n\n### Configuration\n\nEnsure the following permissions are configured:\n\n1. The Cloud Function must be able to:\n   1. Read Kintaro\n   2. Read/write Cloud Datastore\n   3. Submit Cloud Builds\n2. The Cloud Build must be able to:\n   1. Read Kintaro\n3. The Cloud Scheduler task must be able to:\n   1. Invoke the Cloud Function\n\n### Usage\n\n1. Create a `apps/kintaro-webhook-simulator/index.js`:\n\n```javascript\nimport {WebhookSimulator} from '@amagaki/amagaki-plugin-kintaro';\nimport functions from '@google-cloud/functions-framework';\n\nfunctions.http('syncKintaroRepoStatus', WebhookSimulator.getCloudFunction({\n  // `branchName` to use when submitting the Cloud Build.\n  branchName: '\u003cstring\u003e',\n  // GCP project that owns the Cloud Build trigger and Datastore instance. This should usually be omitted.\n  gcpProject: '\u003cstring | undefined\u003e',\n  // Kintaro \"project\" ID. Same as a Kintaro \"workspace\". Should be left as `undefined` to trigger only published content.\n  kintaroProjectId: '\u003cstring | undefined\u003e',\n  // Kintaro \"repo\" ID. Same as a Kintaro \"site\".\n  kintaroRepoId: '\u003cstring\u003e',\n  // UUID of the Cloud Build trigger.\n  buildTriggerId: '\u003cstring\u003e',\n}));\n```\n\n2. Create a `apps/kintaro-webhook-simulator/package.json`:\n\n```\n{\n  \"main\": \"index.js\",\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@amagaki/amagaki-plugin-kintaro\": \"^2.0.1\",\n    \"@google-cloud/functions-framework\": \"^3.0.0\"\n  }\n}\n```\n\n3. Deploy the Cloud Function using the `gcloud` CLI:\n\n```\ngcloud functions deploy \\\n  syncKintaroRepoStatus \\\n  --runtime nodejs16 \\\n  --trigger-http\n```\n\n4. Create a Cloud Scheduler task that runs the function every minute.\n\nConfigure this from the Cloud Scheduler page:\n\n```\nhttps://console.cloud.google.com/cloudscheduler?project=\u003cGCP PROJECT ID\u003e\n```\n\nUse the following configuration:\n\n- **Frequency:** `* * * * *`\n- **Target type:** `http`\n- **URL:** `https://us-central1-\u003cGCP PROJECT ID\u003e.cloudfunctions.net/syncKintaroRepoStatus`\n- **HTTP method:** `GET`\n- **Auth header:** `Add OIDC token`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblinkk%2Famagaki-plugin-kintaro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblinkk%2Famagaki-plugin-kintaro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblinkk%2Famagaki-plugin-kintaro/lists"}