PageSourceSearch

https://ratify.dev/assets/js/0b827cb8.a7dd6dac.js

js ratify.dev collected 2026-09-24 19:29:01 UTC 4,236 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkratify=globalThis.webpackChunkratify||[]).push([[3599],{28453(e,i,r){r.d(i,{R:()=>a,x:()=>o});var n=r(96540);const t={},s=n.createContext(t);function a(e){const i=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function o(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),n.createElement(s.Provider,{value:i},e.children)}},79189(e,i,r){r.r(i),r.d(i,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"quickstarts/creating-plugins","title":"Creating Plugins","description":"Ratify supports plugins for stores and verifiers so that users can add capabilities that aren\'t included in the core application. This document is a guide on creating your own plugins.","source":"@site/versioned_docs/version-1.2/quickstarts/creating-plugins.md","sourceDirName":"quickstarts","slug":"/quickstarts/creating-plugins","permalink":"/docs/1.2/quickstarts/creating-plugins","draft":false,"unlisted":false,"editUrl":"https://github.com/ratify-project/ratify-web/blob/main/versioned_docs/version-1.2/quickstarts/creating-plugins.md","tags":[],"version":"1.2","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Install Ratify for High Availability","permalink":"/docs/1.2/quickstarts/ratify-high-availability"},"next":{"title":"Developer getting started","permalink":"/docs/1.2/quickstarts/developer-getting-started"}}');var t=r(74848),s=r(28453);const a={},o="Creating Plugins",l={},c=[{value:"Overview",id:"overview",level:2},{value:"Verifier",id:"verifier",level:2},{value:"Store",id:"store",level:2}];function u(e){const i={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.header,{children:(0,t.jsx)(i.h1,{id:"creating-plugins",children:"Creating Plugins"})}),"\n",(0,t.jsxs)(i.p,{children:["Ratify supports plugins for ",(0,t.jsx)(i.a,{href:"/docs/1.2/reference/store",children:"stores"})," and ",(0,t.jsx)(i.a,{href:"/docs/1.2/reference/verifier",children:"verifiers"})," so that users can add capabilities that aren't included in the core application. This document is a guide on creating your own plugins."]}),"\n",(0,t.jsx)(i.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(i.p,{children:"At a high level, Ratify will execute plugins as child processes, passing environment variables and JSON over STDIN. A plugin will perform its work and return JSON over STDOUT. There is no restriction for what programming language must be used for a plugin executable. For convenience, plugin skeletons have been created for programs written in Go which handle inputs and provide simple functions for authors to implement."}),"\n",(0,t.jsx)(i.h2,{id:"verifier",children:"Verifier"}),"\n",(0,t.jsxs)(i.p,{children:["The easiest way to get started is to use ",(0,t.jsx)(i.a,{href:"https://github.com/ratify-project/ratify-verifier-plugin",children:"deislabs/ratify-verifier-plugin"}),", which is a template repository that stubs out a working verifier plugin."]}),"\n",(0,t.jsx)(i.h2,{id:"store",children:"Store"}),"\n",(0,t.jsxs)(i.p,{children:["There is a sample store plugin located at ",(0,t.jsx)(i.a,{href:"https://github.com/notaryproject/ratify/blob/main/plugins/referrerstore/sample/sample.go",children:"plugins/referrerstore/sample/sample.go"})]}),"\n",(0,t.jsx)(i.p,{children:"To build the plugin and place it into your plugins dir:"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-shell",children:"cd plugins/referrerstore/sample/\nCGO_ENABLED=0 go build -o ~/.ratify/plugins/sample .\n"})}),"\n",(0,t.jsxs)(i.p,{children:["To use the plugin, add the following in your ",(0,t.jsx)(i.code,{children:"config.json"}),":"]}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-json",children:'"store": {\n  "version": "1.0.0",\n  "plugins": [\n    {\n      "name": "oras"\n    },\n    {\n      "name": "sample"\n    }\n  ]\n},\n'})})]})}function d(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.