Documentation›GitHub Actions
Integrations

GitHub Actions

Scan every pull request in a confidential VM and fail the check when the verdict does not pass.

Before you start

  • A CertOne organization and a member API key.
  • The key stored as a repository or organization secret, for example CERTONE_API_KEY.
  • Workflow permissions contents: read and, 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 admin role in your organization.
  • A viewer key 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.sarif
To 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

InputDefaultMeaning
api-keyrequiredThe CertOne API key.
path.The project folder inside the repository.
assetrepository nameThe AI system's name in CertOne.
country-codeZZWhere the system operates, for example EU, US or CA.
teeamd_sev_snpamd_sev_snp or kata_cc.
fail-onhighLowest severity that fails: low, medium, high or none.
sarifcertone.sarifWhere the SARIF file is written.
reportcertone-report.jsonWhere the full report is written.
attestationcertone-attestation.jsonWritten only when the verdict passes.
soft-failfalseWhen true, a failing verdict does not fail the job.
api-urlhttps://platform.certkor.aiThe 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-fail is true.
  • An error (for example an invalid key) always fails the job.