Before you start
- Python 3.10 or later for
certone-submitand the Python SDK. - A
memberAPI key, set asCERTONE_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
adminrole in your organization. - A
viewerkey 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| Option | Default | Meaning |
|---|---|---|
--project | . | The folder to send. Caches, virtual environments and VCS folders are left out. |
--asset | required | The AI system's name in CertOne. |
--environment | ci | ci, cli, cloud, edge, api, jupyter or vscode. |
--country-code | ZZ | Where the system operates. |
--tee | amd_sev_snp | amd_sev_snp or kata_cc. |
--fail-on | high | Lowest severity that fails the verdict. |
--timeout | 1800 | Seconds to wait for the verdict. |
--report-out | Write the full report as JSON. | |
--attestation-out | Write the signed attestation, on a pass. | |
--sarif-out | Write findings as SARIF for code scanning tools. | |
--markdown-out | Append a Markdown summary, for example to a CI job summary. | |
--api-key-vault | Read 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
| Language | Install | Requires |
|---|---|---|
| Python | pip install certone-sdk | Python 3.10+ |
| JavaScript and TypeScript | npm install @certkor/certone | Node.js 18+ or a browser |
| Rust | cargo add certone | stable Rust |
| C | certone-c-0.1.0.tar.gz, built with CMake | C11 and libcurl |
| C++ | certone-cpp-0.1.0.tar.gz, built with CMake (includes the C SDK) | C++17 and libcurl |
| Java | Build from certkorai/certone-sdks | Java 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.