An SDK for developing Hipcheck plugins
Project description
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>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hipcheck_sdk-0.2.1.tar.gz
.
File metadata
- Download URL: hipcheck_sdk-0.2.1.tar.gz
- Upload date:
- Size: 320.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa81e237833b507380819ef3623579906defc822b6014699813424542fd7bee4 |
|
MD5 | 8e23d7f9a7d7ced779f7753fcb9f21cc |
|
BLAKE2b-256 | 43c43a8dea2d1ee507f1d461f274e3ea45376a36c72787973d6b80dbf85089e7 |
File details
Details for the file hipcheck_sdk-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: hipcheck_sdk-0.2.1-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e00eda13853bdcfb417ea628000e835784677d2ce6a4e417fabfbc3803c73be |
|
MD5 | c6e8d5052a8a936ae83a1c91193ea2cc |
|
BLAKE2b-256 | eac956d84fdeb4ea0309b27fbbd60ea83733e007fa654842a27d9ce05f8a852c |