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.1.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.1.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: iridium_core-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 b52a8c03acf100d740c1417856ee905e9e84a329148aed5453e5a361177a8fce
MD5 21e72d6c18546f370d8f12ffc015a974
BLAKE2b-256 4c5230994b332409008df3f5fc5444a5b5aef66c544348fe3dc2adccb1abc71e

See more details on using hashes here.

Provenance

The following attestation bundles were made for iridium_core-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: iridium_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e11a80c6ce4aa50e5ed985b5ef3c7b2ae2102a3e48a89679b657cc6abff0be26
MD5 067d38ae5472c2546b740fadc96012d9
BLAKE2b-256 ad80e76bbf5d21a7652382ddbb33c30a56dd533a7a1984bb60381e456593d138

See more details on using hashes here.

Provenance

The following attestation bundles were made for iridium_core-0.1.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

0.2.0

2 files

This release

0.1.0 This release

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