Documentation›SDKs and CLI
Integrations

SDKs and CLI

Submit a project and wait for the verdict from any script, with the certone-submit command or the SDK.

Before you start

  • Python 3.10 or later for certone-submit and the Python SDK.
  • A member API key, set as CERTONE_API_KEY.

In the CertOne console, open Developer Hub, then API keys. Name the key, choose the member role and select New key.

  • Copy the secret right away: it is shown only once.
  • Keys start with ck_ and expire after at most 365 days.
  • Creating keys requires the admin role in your organization.
  • A viewer key can read results but cannot submit scans.

Command line

Shell
pip install certone-sdk
export CERTONE_API_KEY=ck_...
certone-submit --project . --asset "RAG Answering Service" --country-code EU \
  --environment ci --tee kata_cc --fail-on high \
  --report-out report.json --sarif-out certone.sarif
OptionDefaultMeaning
--project.The folder to send. Caches, virtual environments and VCS folders are left out.
--assetrequiredThe AI system's name in CertOne.
--environmentcici, cli, cloud, edge, api, jupyter or vscode.
--country-codeZZWhere the system operates.
--teeamd_sev_snpamd_sev_snp or kata_cc.
--fail-onhighLowest severity that fails the verdict.
--timeout1800Seconds to wait for the verdict.
--report-outWrite the full report as JSON.
--attestation-outWrite the signed attestation, on a pass.
--sarif-outWrite findings as SARIF for code scanning tools.
--markdown-outAppend a Markdown summary, for example to a CI job summary.
--api-key-vaultRead the key from Azure Key Vault instead of the environment.

Exit codes: 0 when the verdict passes, 1 when it does not, 2 on an error or timeout.

Python

Python
from pathlib import Path
from certone_sdk import CertOneClient, ProgressPrinter, submit_and_wait

client = CertOneClient("https://platform.certkor.ai", token=os.environ["CERTONE_API_KEY"])
sub = submit_and_wait(client, Path("rag-service-kata"), asset="RAG Answering Service",
                      country_code="EU", tee="kata_cc", on_progress=ProgressPrinter())
print(sub.verdict, sub.report["by_severity"])
raise SystemExit(0 if sub.passed else 1)

submit_and_wait returns the result with verdict, passed, report, attestation and scan_id. Errors raise CertOneError.

Seven languages

LanguageInstallRequires
Pythonpip install certone-sdkPython 3.10+
JavaScript and TypeScriptnpm install @certkor/certoneNode.js 18+ or a browser
Rustcargo add certonestable Rust
Ccertone-c-0.1.0.tar.gz, built with CMakeC11 and libcurl
C++certone-cpp-0.1.0.tar.gz, built with CMake (includes the C SDK)C++17 and libcurl
JavaBuild from certkorai/certone-sdksJava 17+
C#Build from certkorai/certone-sdks.NET 8
Python, JavaScript and Rust install from their registries; C and C++ ship as release archives. All SDKs are open source at certkorai/certone-sdks under the Apache 2.0 license. Java and C# packages are coming; build them from the repository until then.