Crate hipcheck_sdk

Source
Expand description

Hipcheck Plugin SDK in Rust.

§What is Hipcheck?

Hipcheck is a command line interface (CLI) tool for analyzing open source software packages and source repositories to understand their software supply chain risk. It analyzes a project’s software development practices and detects active supply chain attacks to give you both a long-term and immediate picture of the risk from using a package.

Part of Hipcheck’s value is its plugin system, which allows anyone to write a new data source or analysis component, or build even higher level analyses off of the results of multiple other components.

§The Plugin SDK

This crate is a Rust SDK to help developers focus on writing the essential logic of their Hipcheck plugins instead of worrying about session management or communication with Hipcheck core. The essential steps of using this SDK are to implement the Query trait for each query endpoint you wish to support, then implement the Plugin trait to tie your plugin together and describe things like configuration parameters.

For more, see our detailed guide on writing plugins using this crate.

Modules§

deps
Re-export of user-facing third-party dependencies
error
macrosmacros
Macros for simplifying Query and Plugin trait implementations
mockmock_engine
Tools for unit-testing plugin Query implementations
prelude
A utility module containing everything needed to write a plugin, just write use hipcheck_sdk::prelude::*.
types
The definitions of Hipcheck’s analysis Target object and its sub-types for use in writing query endpoints.

Structs§

NamedQuery
Pairs a query endpoint name with a particular Query trait implementation.
PluginEngine
Manages a particular query session.
PluginServer
Runs the Hipcheck plugin protocol based on the user’s implementation of the Plugin trait.
QueryBuilder
Used for building a up a Vec of keys to send to specific hipcheck plugin
QuerySchema
Describes the signature of a particular NamedQuery.
QueryTarget
Identifies the target plugin and endpoint of a Hipcheck query.

Enums§

LogLevel

Traits§

Plugin
The core trait that a plugin author must implement using the Hipcheck SDK.
PluginConfig
The trait used to deserialized plugin config input from the Policy File. The trait is applied to a plugin RawConfig struct and works in tandem with the derive_plugin_config procedural macro re-imported to this sdk crate via hipcheck_sdk_macros.
Query
Defines a single query endpoint for the plugin.

Functions§

init_tracing_logger
Initializes a tracing-subscriber for plugin logging and forwards logs to Hipcheck core.

Type Aliases§

DynQuery
A Query trait object.