Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

spanlint

Latest version: v0.2.1

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
PyPI package Publisher: inormis
2 Versions
130 Downloads

Scan summary

spanlint was last scanned on 27 Nov 2026 at version 0.2.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 27 Nov 2026.
  • Findings: No rules fired in version 0.2.1.
  • Downloads: 130 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.1 LATEST 27 Nov 2026 No rules fired
0.2.0 17 Nov 2026 No rules fired

No rules fired in 0.2.1

Findings

Findings for v0.2.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.2.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

spanlint

ci PyPI

Checks whether GenAI telemetry actually matches the OpenTelemetry GenAI semantic conventions.

Most AI frameworks now emit OpenTelemetry spans for model calls, and the GenAI semantic conventions say what those spans are supposed to contain. The two do not always agree. Attributes get left out. Old names stick around long after the spec renames them. Token metrics turn up without the right unit. Required events are missing entirely.

You normally find this out from a dashboard, when a panel is empty and nobody can say which layer dropped the attribute.

spanlint reads the telemetry a framework really emits and reports where it diverges from the spec.

Not Weaver, not the conformance suite

Weaver works on the convention registries: the YAML that defines what an attribute is, code generation from it, and, with weaver registry live-check, validation of sample telemetry against them. The OpenTelemetry project runs that live-check over scenario programs for several dozen GenAI library and instrumentation pairs in semantic-conventions-conformance and publishes the results. If you maintain an instrumentation, that is where its conformance is tracked.

spanlint is for the other side. You have an application, it exports telemetry, and you want to know in CI whether what it exports still matches the conventions. It reads OTLP JSON files or captures spans in a pytest fixture, needs no mock server and no scenario, and tells you which spans came from which framework. It also carries a few checks the suite does not have today, span kind among them, and fixtures from runtimes the suite does not run (.NET, Node). The first comparison across nine frameworks is in docs/conformance/2026-11.md.

Install

pip install spanlint

Usage

Point spanlint check at an OTLP JSON export of your telemetry:

$ spanlint check trace.json
no findings

Divergences from the GenAI conventions show up as one line each, with the target span, the message, and the rule name:

$ spanlint check broken.json
chat: gen_ai.request.model must be a string [gen_ai.request.model.type]
1 finding

The exit code is nonzero whenever there are findings, so this fits a CI step. Pass --format json for a machine-readable report:

$ spanlint check trace.json --format json
{
  "findings": []
}

Line-delimited OTLP exports (.jsonl, one export per line, which is what the OTel Collector's file exporter writes) are read the same way. The parser is picked by the file's extension.

spanlint matrix <dir> runs the bundled framework adapters over a tree of exports laid out as <dir>/<framework>/*.json and prints a markdown table of finding counts per framework and rule. The fixtures in this repository are laid out that way, so spanlint matrix tests/fixtures reproduces the table in docs/conformance/2026-11.md.

Use in CI

In GitHub Actions, spanlint-action installs spanlint and checks a set of OTLP exports, for example the traces your integration tests write through the Collector's file exporter:

- uses: inormis/spanlint-action@v1
  with:
    files: traces/**/*.json

Findings show up as warnings on the files and in the job summary, and the step fails if there are any.

Supported frameworks

Framework detection is what tells spanlint which spans came from where, so per-framework conformance can be reported without mixing everything together.

  • openai-python: spans from the OpenTelemetry contrib instrumentation (opentelemetry-instrumentation-openai-v2, scope opentelemetry.instrumentation.openai_v2) and from Traceloop's OpenAI instrumentation (scope opentelemetry.instrumentation.openai.v1). Identification falls back to gen_ai.system=openai or gen_ai.provider.name=openai when the scope name is not one of the expected values; that is also how the contrib instrumentation's gen_ai_latest_experimental output is recognised, since that path emits from opentelemetry-util-genai's own opentelemetry.util.genai.handler scope.
  • LangChain: spans emitted by Traceloop's opentelemetry-instrumentation-langchain, which is also what the Traceloop SDK installs, and by Arize's openinference-instrumentation-langchain. Identification falls back to gen_ai.provider.name being langchain or langgraph when the scope name is not one of those.
  • LlamaIndex: spans from LlamaIndex's own OpenTelemetry bridge (llama-index-observability-otel), from Traceloop's opentelemetry-instrumentation-llamaindex, and from Arize's openinference-instrumentation-llama-index. Scope name only; none of the three puts a LlamaIndex-specific attribute on every span.
  • LiteLLM: spans from LiteLLM's own OpenTelemetry callback (tracer name litellm), from Traceloop's opentelemetry-instrumentation-litellm, and from Arize's openinference-instrumentation-litellm. Scope name only.
  • Semantic Kernel (Python): spans from Semantic Kernel's own telemetry, which is off until SEMANTICKERNEL_EXPERIMENTAL_GENAI_ENABLE_OTEL_DIAGNOSTICS is set. Every tracer there is named after its module, so any scope starting with semantic_kernel. counts.
  • Microsoft.Extensions.AI (.NET): spans from the library's UseOpenTelemetry chat client, which puts them on the Experimental.Microsoft.Extensions.AI activity source unless the application names its own. Scope name only. The attributes are plain gen_ai.*, so a span from a renamed source goes unrecognised.
  • Vercel AI SDK (Node): spans from @ai-sdk/otel, which is where AI SDK 7 keeps its OpenTelemetry support. Its OpenTelemetry integration puts the invoke_agent, agent_step and chat spans on a tracer named gen_ai; the LegacyOpenTelemetry one puts the older ai.generateText spans on a tracer named ai. Either scope name counts. A legacy span under an application-supplied tracer is still recognised by its ai.operationId attribute; a semconv one carries nothing of the SDK's own, so it is not.
  • Langfuse: spans from the Langfuse Python SDK, which is built on OpenTelemetry and puts everything it emits, the @observe decorator and its OpenAI and LangChain integrations included, on one tracer named langfuse-sdk. Scope name only. The langfuse.* attributes are no help because the SDK also copies propagated ones onto third-party spans.
  • Traceloop SDK: the workflow, task, agent and tool spans that the traceloop-sdk decorators emit under the traceloop.tracer scope. Spans from Traceloop's per-framework instrumentations are claimed by the framework adapters above, not by this one.

More adapters land as work on them starts.

Status

Early, but it runs. You can feed it an OTLP JSON export and get a list of findings back, in text or JSON. The rules follow the GenAI conventions as of November 2026 (the registry is pinned to a semantic-conventions-genai commit, see scripts/refresh_registry.sh): gen_ai.operation.name on every GenAI span and gen_ai.provider.name where the span definitions require it, renamed and removed attribute names, the open operation name enum, span kind per operation, attribute types, the two legacy message/choice events, and the token/duration histograms. It recognises spans from the OpenAI contrib instrumentation, LangChain, LlamaIndex, LiteLLM, Semantic Kernel, Microsoft.Extensions.AI, the Vercel AI SDK, Langfuse and the Traceloop SDK, and spanlint matrix turns a tree of exports into the per-framework table in docs/conformance/. There is also a pytest fixture that grabs whatever spans your test emits so you can lint them in place.

On PyPI as of 0.2.0, and runs in GitHub Actions through spanlint-action. Next up: a second dataset once the conventions move again.

Apache-2.0

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases spanlint

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229