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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35fe44b9c1e527a4e4bb418916ae64d7bc05179fd984a77fe2554fe7f3e03a2d
|
|
| MD5 |
f2e7f8a047fd744978761afe1a0cd874
|
|
| BLAKE2b-256 |
324a5c307da74260614d63a65ee1cbf41d8eccf8d2c63b8cb3cdf9db447dd583
|
Provenance
The following attestation bundles were made for iridium_core-0.2.0.tar.gz:
Publisher:
release.yml on mziqudhd92/Iridium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iridium_core-0.2.0.tar.gz -
Subject digest:
35fe44b9c1e527a4e4bb418916ae64d7bc05179fd984a77fe2554fe7f3e03a2d - Sigstore transparency entry: 2609651474
- Sigstore integration time:
-
Permalink:
mziqudhd92/Iridium@dfaef1e9be33a096cbe358937aa1c1dfb4997102 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/mziqudhd92
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dfaef1e9be33a096cbe358937aa1c1dfb4997102 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5c868b38f0364ff9d0e4ed32af8433b928df8e4ec6cb82ab4a112d77030a299
|
|
| MD5 |
3e71f0109ce7875a5ee5979013d39643
|
|
| BLAKE2b-256 |
2fcb3817cdfdb417e39ed4dcdeed8d022fbba016643f26e4d036883ed29805ec
|
Provenance
The following attestation bundles were made for iridium_core-0.2.0-py3-none-any.whl:
Publisher:
release.yml on mziqudhd92/Iridium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iridium_core-0.2.0-py3-none-any.whl -
Subject digest:
c5c868b38f0364ff9d0e4ed32af8433b928df8e4ec6cb82ab4a112d77030a299 - Sigstore transparency entry: 2609652264
- Sigstore integration time:
-
Permalink:
mziqudhd92/Iridium@dfaef1e9be33a096cbe358937aa1c1dfb4997102 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/mziqudhd92
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dfaef1e9be33a096cbe358937aa1c1dfb4997102 -
Trigger Event:
push
-
Statement type: