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
- macros
macros
- Macros for simplifying
Query
andPlugin
trait implementations - mock
mock_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§
- Named
Query - Pairs a query endpoint name with a particular
Query
trait implementation. - Plugin
Engine - Manages a particular query session.
- Plugin
Server - Runs the Hipcheck plugin protocol based on the user’s implementation of the
Plugin
trait. - Query
Builder - Used for building a up a
Vec
of keys to send to specific hipcheck plugin - Query
Schema - Describes the signature of a particular
NamedQuery
. - Query
Target - Identifies the target plugin and endpoint of a Hipcheck query.
Enums§
Traits§
- Plugin
- The core trait that a plugin author must implement using the Hipcheck SDK.
- Plugin
Config - 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.