Skip to main content

iridium-core

Local AST extraction, dependency graph assembly, SQLite cache, and payload models for Iridium security scanning.

No network I/O. No httpx dependency.

Install

pip install iridium-core

Library API

WorkspaceIndexer

Primary entry point — indexes a repository into a ClientScanPayload:

from pathlib import Path
from iridium_core import WorkspaceIndexer

indexer = WorkspaceIndexer(Path("/path/to/repo"))
payload = indexer.index()

print(payload.dependency_count, payload.entrypoint_count)
print(payload.languages)
print(payload.to_json())

Options:

Parameter Default Description
use_cache True SQLite AST cache (WAL, cross-mount fallback to ~/.cache/iridium)
use_process_pool True ProcessPool batches for large repos (disable for small targets)
extractors DEFAULT_EXTRACTORS Custom LanguageExtractor plugins

Payload validation

from iridium_core.models.payload import ClientScanPayload

validated = ClientScanPayload.model_validate(payload.model_dump())
api_dict = validated.to_api_dict()  # ready for POST /api/v1/client/scan

Modules

Module Purpose
iridium_core.extract Python/JavaScript LanguageExtractor plugins
iridium_core.graph Tarjan SCC, bounded BFS, adjacency
iridium_core.deps Lockfile parsing (pip, npm, etc.)
iridium_core.sanitize Pre-AST scrubbing (PEM, JWT, API keys)
iridium_core.cache Content-addressed AST cache
iridium_core.git Tree hash / commit fingerprint

Development

Part of the Iridium monorepo. From repo root:

uv sync
uv run pytest packages/iridium-core/tests -v

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iridium_core-0.2.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iridium_core-0.2.0-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file iridium_core-0.2.0.tar.gz.

File metadata

  • Download URL: iridium_core-0.2.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for iridium_core-0.2.0.tar.gz
Algorithm Hash digest
SHA256 35fe44b9c1e527a4e4bb418916ae64d7bc05179fd984a77fe2554fe7f3e03a2d
MD5 f2e7f8a047fd744978761afe1a0cd874
BLAKE2b-256 324a5c307da74260614d63a65ee1cbf41d8eccf8d2c63b8cb3cdf9db447dd583

See more details on using hashes here.

Provenance

The following attestation bundles were made for iridium_core-0.2.0.tar.gz:

Publisher: release.yml on mziqudhd92/Iridium

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iridium_core-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: iridium_core-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for iridium_core-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5c868b38f0364ff9d0e4ed32af8433b928df8e4ec6cb82ab4a112d77030a299
MD5 3e71f0109ce7875a5ee5979013d39643
BLAKE2b-256 2fcb3817cdfdb417e39ed4dcdeed8d022fbba016643f26e4d036883ed29805ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for iridium_core-0.2.0-py3-none-any.whl:

Publisher: release.yml on mziqudhd92/Iridium

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page