Skip to content

    Type a page, a command such as keryn scan, or a rule id.

    Quickstart

    View as Markdown

    Open keryn.app, drop a folder, paste a public GitHub URL or pick an example from the Demo menu. The scan runs inside your browser tab. A folder is read in the browser and never uploaded; a repository is read from its host, or through api.keryn.app without storage if you choose the fast archive.

    The recorded AI-BOM scan below shows a Flask endpoint that calls a hosted model. The result lists the library and model references with their line numbers. Save the example as a Python file in its own folder and use the AI-BOM command in step 2 to scan that folder.

    Scan a small fileExample result
    import os
    from flask import Flask, request
    from openai import OpenAI
    
    app = Flask(__name__)
    client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
    
    
    @app.post("/summarize")
    def summarize():
        text = request.json["text"]
        reply = client.chat.completions.create(
            model="gpt-4o-mini",
            messages=[{"role": "user", "content": "Summarize: " + text}],
        )
        return {"summary": reply.choices[0].message.content}

    2 findings · 29 of 29 rules ran on 1 file

    • infokeryn.inv.lib.openailine 3proof 0 inventory

      References the OpenAI SDK.

      Edge depends_on

      from openai import OpenAI
    • infokeryn.inv.model.openailine 13proof 0 inventory

      Hard-coded OpenAI model identifier.

      Edge depends_on

      model="gpt-4o-mini",

    AI-BOM delta: 2 new components vs an empty baseline

    • + library openai (openai) · line 3
    • + model gpt-4o-mini (openai) · line 13

    Agent reach POST /summarize

    Example policy pass

    Result computed when this page was built. Run an example with the CLI

    One run can write several outputs. Keryn recognises its own earlier outputs (by content) and leaves them out of the next scan, and it skips what .gitignore lists; coverage reports the checked and excluded scope. A folder such as keryn-out/ keeps them together:

    Terminal window
    keryn scan . --aibom keryn-out/bom.cdx.json --sarif keryn-out/keryn.sarif --json keryn-out/result.json --markdown keryn-out/summary.md
    Output Format Use it for
    --aibom CycloneDX 1.6 inventory, Dependency-Track, audits
    --sarif SARIF 2.1.0 GitHub code scanning, IDE SARIF viewers
    --json Keryn result scripts, evidence bundles
    --markdown Markdown a pull or merge request comment
    --junit, --gitlab-sast, --codequality JUnit, GitLab CI test tabs and merge request widgets

    Formats shows real sample files.

    Terminal window
    keryn init # writes .keryn.yml and .keryn/policy.yml
    keryn policy lint .keryn/policy.yml
    keryn scan . # now gates on the policy too

    init sets rules: bundled:all, the same rules keryn scan uses with no config (vulnerability, audit and AI-BOM inventory), and prints what is included; narrow it to bundled:aibom for the inventory only. Edit .keryn/policy.yml to list your approved model providers. Policies explains the format and the templates.

    Terminal window
    keryn scan . --base origin/main --fail-on-added

    This compares against the base branch: new components and new findings are marked, and --fail-on-added fails when a change adds an AI component. Wire it into your pipeline with CI.