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
Metadata
Release files for iridium-core 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iridium_core-0.6.0.tar.gz | 20.0 kB | With provenance | Details for iridium_core-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iridium_core-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for iridium_core-0.6.0-py3-none-any.whl |
Total release size: 44.2 kB
Release files / iridium_core-0.6.0.tar.gz
| Download URL | iridium_core-0.6.0.tar.gz |
|---|---|
| Size | 20.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b95e0aac2b367b344ba73c7d7a0bde8364810191e65e9976c35ddb8fefab641
|
|
BLAKE2b-256 checksum How to use checksums |
f4f614a09e675eee7218c63b2c6b59d4b76354c0ade6268b48b5568d6975c37a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logRelease files / iridium_core-0.6.0-py3-none-any.whl
| Download URL | iridium_core-0.6.0-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60f81ce29879873bcadca1d7e9e80ba7593112c6b7ceee09f99518f5b6a24fda
|
|
BLAKE2b-256 checksum How to use checksums |
16679236a01ecba3702585088210b6b5c6d6d4aae3f146b04570d06ec44fc9e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logSecurity for iridium-core 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for iridium_core-0.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.