Skip to main content

Welcome to the Python SDK for writing plugins for the Hipcheck analysis tool.

User / Plugin Developer Information

The guide for developing plugins with this SDK can be found here.

The API documentation for this package can be found here.

A dummy example plugin using the SDK can be found here.

Python SDK Developer Information

You must have uv installed. Installation instructions can be found here.

Running unit tests

From sdk/python, run

uv run pytest ./tests

Regenerating auto-generated code

The contents of src/hipcheck_sdk/gen is generated Python code from multiple sources. Some files are generated by the grpcio Python library using the Hipcheck protobuf protocol spec. An additional file contains Python classes automatically derived from the Hipcheck Target object schema. To regenerate these files, you can run the following:

uv run scripts/update-gen.py

Testing example plugin listening on port

From sdk/python, run

uv run tests/example-plugin/main.py --port <PORT>`.

Or from hipcheck repository root, run

uv run --project sdk/python sdk/python/tests/example-plugin/main.py --port <PORT>

Testing example plugin in Hipcheck analysis

From the Hipcheck repository root, use a policy with the following plugins entry:

    plugin "mitre/example" version="0.0.0" manifest="sdk/python/tests/example-plugin/local-plugin.kdl"

Currently, this will get through configuration and receive the query from Hipcheck core, but the plugin will appear as an error in the final report because it is not currently written to accept Target objects.

Building the HTML

From docs/, run the following:

uv run make html # Build the html in the build/ directory
cp -r build/html <DESTINATION_DIR>

Metadata

Release files for hipcheck-sdk 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hipcheck-sdk 0.2.1
File Size Uploaded
hipcheck_sdk-0.2.1.tar.gz 320.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hipcheck-sdk 0.2.1
File Interpreter ABI Platform
hipcheck_sdk-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 351.7 kB

Release files / hipcheck_sdk-0.2.1.tar.gz

Download URL hipcheck_sdk-0.2.1.tar.gz
Size 320.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fa81e237833b507380819ef3623579906defc822b6014699813424542fd7bee4
BLAKE2b-256 checksum
How to use checksums
43c43a8dea2d1ee507f1d461f274e3ea45376a36c72787973d6b80dbf85089e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.2

Release files / hipcheck_sdk-0.2.1-py3-none-any.whl

Download URL hipcheck_sdk-0.2.1-py3-none-any.whl
Size 31.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e00eda13853bdcfb417ea628000e835784677d2ce6a4e417fabfbc3803c73be
BLAKE2b-256 checksum
How to use checksums
eac956d84fdeb4ea0309b27fbbd60ea83733e007fa654842a27d9ce05f8a852c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.2

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page