Before you start
- A CertOne organization and a
memberAPI key. - The key stored as a repository or organization secret, for example
CERTONE_API_KEY. - Workflow permissions
contents: readand, for code scanning,security-events: write.
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.
Add the workflow
Create .github/workflows/certone.yml. The action, certkorai/certone-action@v1, sets up Python, installs certone-sdk and runs the scan; the second step uploads the findings to code scanning.
YAML
name: CertOne
on: [pull_request]
permissions:
contents: read
security-events: write
jobs:
certone:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: CertOne confidential scan
uses: certkorai/certone-action@v1
with:
api-key: ${{ secrets.CERTONE_API_KEY }}
path: .
asset: ADAS Forward Perception
country-code: EU
tee: amd_sev_snp
fail-on: high
- name: Findings in code scanning
if: always()
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: certone.sarifTo scan several AI systems in one repository, use a job matrix with one
path and asset per system. Each one appears as its own check on the pull request.Inputs
| Input | Default | Meaning |
|---|---|---|
api-key | required | The CertOne API key. |
path | . | The project folder inside the repository. |
asset | repository name | The AI system's name in CertOne. |
country-code | ZZ | Where the system operates, for example EU, US or CA. |
tee | amd_sev_snp | amd_sev_snp or kata_cc. |
fail-on | high | Lowest severity that fails: low, medium, high or none. |
sarif | certone.sarif | Where the SARIF file is written. |
report | certone-report.json | Where the full report is written. |
attestation | certone-attestation.json | Written only when the verdict passes. |
soft-fail | false | When true, a failing verdict does not fail the job. |
api-url | https://platform.certkor.ai | The CertOne platform. |
Outputs: verdict (pass, fail or error), scan-id and sarif-path.
What you see
- The pull request shows the CertOne job as a check, passing or failing on the verdict.
- The job summary shows the verdict, the counts by severity, where the scan ran and a table of findings.
- Code scanning lists each finding under the tool
CertOne: high as error, medium as warning, low as note. - The job log shows the progress and one line per finding:
Log
CertOne: packing adas-perception for a confidential scan ...
submitted 'ADAS Forward Perception' for confidential processing: scan 3f2c... (sha256:...)
verdict: FAIL (4 finding(s): 4 high, 0 medium, 0 low)
executed in: ...
[HIGH] ... (src/ecu_config.h:30)How it gates
- A passing verdict exits 0 and the check passes.
- A failing verdict exits 1 and the check fails, unless
soft-failistrue. - An error (for example an invalid key) always fails the job.