sdk

package module
v1.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README

Privateer SDK

The Privateer SDK provides the interface and utilities needed for developing Privateer plugins. It includes common logic, cloud provider utilities, and an evaluation framework that can be reused across multiple plugins.

Documentation

For complete SDK documentation, visit privateerproj.com/docs/developers/sdk/

The website includes:

  • Detailed SDK overview and components
  • Plugin development guides
  • API reference and examples
  • Best practices and patterns

Quick Start

Installation

Add the SDK to your Go project:

go get github.com/privateerproj/privateer-sdk
Usage

Import the SDK in your plugin:

import (
    "github.com/privateerproj/privateer-sdk/pluginkit"
    "github.com/privateerproj/privateer-sdk/config"
    "github.com/privateerproj/privateer-sdk/shared"
)

See the plugin development guide for detailed usage examples.

API Reference

Local Development

Prerequisites
  • Go 1.25.1 or later - Required for building and testing
  • Make - For using the Makefile build targets
Building
make build
Testing

Run all tests:

make test

Run tests with coverage:

make testcov
Available Make Targets
  • make build - Build all packages
  • make test - Run tests and vet checks
  • make testcov - Run tests with coverage report
  • make tidy - Clean up go.mod dependencies
  • make quick - Alias for make build

Project Structure

privateer-sdk/
├── command/        # CLI command utilities
├── config/         # Configuration management
├── pluginkit/      # Core plugin kit functionality
├── shared/         # Shared plugin interfaces
└── utils/          # Utility functions

Contributing

We welcome contributions! See our Contributing Guidelines for details.

All contributions are covered by the Apache 2 License at the time the pull request is opened, and all community interactions are governed by our Code of Conduct.

Security

For vulnerability reporting, please reference our Security Policy. For security questions, please search our closed issues and open a new issue if your question has not yet been answered.

Documentation

Overview

Package sdk provides the core SDK for building Privateer plugins.

Directories

Path Synopsis
ai
Package ai is the single-import surface for the SDK's AI subsystem.
Package ai is the single-import surface for the SDK's AI subsystem.
anthropic
Package anthropic is the Anthropic Messages API adapter for the provider-neutral AI client contract.
Package anthropic is the Anthropic Messages API adapter for the provider-neutral AI client contract.
assist
Package assist is the plugin-facing accelerator for AI-assisted assessment steps: it asks a provider-neutral client for a structured verdict against an SDK-owned schema and packages the answer as auditable gemara.Evidence.
Package assist is the plugin-facing accelerator for AI-assisted assessment steps: it asks a provider-neutral client for a structured verdict against an SDK-owned schema and packages the answer as auditable gemara.Evidence.
openai
Package openai is the OpenAI Chat Completions adapter for the provider-neutral AI client contract.
Package openai is the OpenAI Chat Completions adapter for the provider-neutral AI client contract.
provider
Package provider defines the provider-neutral contract callers use to talk to any AI backend, plus the shared base every concrete adapter builds on.
Package provider defines the provider-neutral contract callers use to talk to any AI backend, plus the shared base every concrete adapter builds on.
Package command provides command-line interface functionality for Privateer plugins.
Package command provides command-line interface functionality for Privateer plugins.
harness
Package harness is the import surface for Privateer harnesses (the pvtr CLI and future similar tools) — the commands that drive plugins rather than the commands a plugin serves about itself.
Package harness is the import surface for Privateer harnesses (the pvtr CLI and future similar tools) — the commands that drive plugins rather than the commands a plugin serves about itself.
Package config provides configuration management for Privateer plugins.
Package config provides configuration management for Privateer plugins.
internal
auth
Package auth implements pvtr's OIDC device-grant login and credential storage for authenticated publishing to grc.store.
Package auth implements pvtr's OIDC device-grant login and credential storage for authenticated publishing to grc.store.
install
Package install installs Privateer plugins — from grc.store (pulled and verified end-to-end) or from a local binary path.
Package install installs Privateer plugins — from grc.store (pulled and verified end-to-end) or from a local binary path.
oci
Package oci holds the grc.store OCI mechanics shared by `pvtr publish` (push a signed plugin index) and `pvtr install` (pull + verify one).
Package oci holds the grc.store OCI mechanics shared by `pvtr publish` (push a signed plugin index) and `pvtr install` (pull + verify one).
publish
Package publish is the grc.store producer path: assemble a multi-platform OCI plugin index from a GoReleaser dist directory, push it to the hub's registry, keyless-sign it, and /sync so the hub ingests and verifies it.
Package publish is the grc.store producer path: assemble a multi-platform OCI plugin index from a GoReleaser dist directory, push it to the hub's registry, keyless-sign it, and /sync so the hub ingests and verifies it.
verify
Package verify implements the §6 consumer verification contract for grc.store-sourced plugins: keyless signature verification over a pinned public-good Sigstore trusted root, an identity policy (camp (b) TOFU), and the full digest-chain walk index → child → config/layer → bytes.
Package verify implements the §6 consumer verification contract for grc.store-sourced plugins: keyless signature verification over a pinned public-good Sigstore trusted root, an identity policy (camp (b) TOFU), and the full digest-chain walk index → child → config/layer → bytes.
Package pluginkit provides the core plugin kit functionality for building Privateer plugins.
Package pluginkit provides the core plugin kit functionality for building Privateer plugins.
Package shared provides shared functionality for Privateer plugins.
Package shared provides shared functionality for Privateer plugins.
Package utils provides general utility methods.
Package utils provides general utility methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL