Skip to main content

aictem: repository and AI asset discovery

aictem inventories a repository from the inside and reports what it finds as assets, relationships and findings. It covers dependencies, container images, cloud resources, CI pipelines, committed secrets, and AI systems (model providers, frameworks, agents and their tools, RAG pipelines, vector stores, MCP servers and clients, and model files).

  • Works offline, anywhere. The standard library is the only dependency, so it runs in any CI image with Python 3.11 or later.
  • Safe by design. Model files are disassembled, never loaded. Secret values are never stored or printed; findings carry a prefix, the length and a fingerprint.
  • Accurate. Agent, tool, import and risky-flag patterns only count when they appear in real code, not in strings or comments. AI usage seen only in tests is labelled as such.
  • Connects to the platform. --upload sends the inventory to CTEM Platform with an upload-only pipeline token. Results merge with the platform's own analysis, because identifiers and rule names match.

Install

pipx install aictem        # or: uv tool install aictem
pip install aictem         # into the current environment
uvx aictem discover .      # or run it without installing

From a checkout of this repository: pipx install ./cli.

Use

aictem discover                               # scan the current directory; terminal summary
aictem discover ~/code/app --all              # list every asset and finding
aictem discover . -f json -o inventory.json   # full report (also the upload format)
aictem discover . -f sarif -o aictem.sarif      # for GitHub code scanning and other SARIF dashboards
aictem discover . --approved-providers openai,anthropic   # other providers are reported as shadow AI
aictem discover . --vulns                     # look up known vulnerabilities in pinned packages (osv.dev)
aictem discover . --fail-on high              # exit 1 if a high or critical finding is present

Send the inventory to the platform. Create a token under Integrations → CI/CD pipelines:

export CTEM_URL=https://ctem.example.com CTEM_CI_TOKEN=ctem_ci_...
aictem discover . --upload --gate high        # exit 3 if the platform's gate fails

Inside GitHub Actions, GitLab CI, Jenkins, Azure Pipelines, CircleCI or Bitbucket, the upload records the provider and the pipeline URL automatically, together with the repository, branch and commit from git.

What it finds

Area Sources Assets Findings (examples)
Dependencies requirements, pyproject, Pipfile, poetry/uv locks, package.json, npm/pnpm/yarn locks, go.mod, Cargo, Gemfile.lock, composer, pom.xml, Gradle, .csproj package (purl), repository Known vulnerabilities with --vulns, or by the platform on upload
AI providers and serving Imports, dependencies, endpoint URLs, environment variables, containers, IaC ai_provider, llm_endpoint Unapproved provider (shadow AI)
AI frameworks and agents LangChain/LangGraph, LlamaIndex, Haystack, CrewAI, AutoGen, OpenAI Agents SDK, Pydantic AI, smolagents, Semantic Kernel, Google ADK, Strands, Vercel AI SDK, Mastra, function-calling tool schemas ai_framework, ai_agent (with tools and capabilities) High-impact tools without an approval step, disabled LangChain safety flags, model output passed to exec/eval
Retrieval Vector store clients plus retrievers, loaders, splitters and embeddings rag_application, vector_database
MCP Client configs (Claude Desktop, Cursor, VS Code, Windsurf, Claude Code and more) and servers implemented in the repository mcp_client, mcp_server Plaintext transport, literal credentials, unpinned packages, broad filesystem roots, privileged launch, auto-approved tools, tool-description poisoning
Models Pickle, PyTorch, safetensors, ONNX, GGUF, Keras and more; Hugging Face model references ai_model Code-execution callables in pickle streams, unsafe formats, trust_remote_code=True, torch.load without weights_only
Containers Dockerfile, Compose, Kubernetes manifests container_image, k8s_resource Root user, unpinned base image, privileged containers
Cloud (IaC) Terraform, CloudFormation, including SageMaker, Bedrock, Vertex AI and Azure OpenAI storage, database, identity, llm_endpoint, ... Public buckets, publicly accessible databases
CI/CD GitHub Actions and other pipeline files (attributes) Unpinned third-party actions, pull_request_target running PR code, write-all tokens
Secrets AI provider keys, cloud and SaaS tokens, private keys Committed credential (value never stored)

Exclude paths with --exclude GLOB or a .aictemignore file (one glob per line). Dependency folders such as node_modules, .venv, dist and build are always skipped.

Exit codes

Code Meaning
0 Success
1 --fail-on threshold reached
2 Usage or upload error
3 Upload succeeded, but the platform's --gate failed

Development

cd cli && uv run --with pytest pytest

MIT licensed.

Releasing

Versions follow the project's CHANGELOG.md. A release is a tag: GitHub Actions runs the tests on Python 3.11-3.13, builds the sdist and wheel, installs the built wheel and runs it, then publishes to PyPI and opens a GitHub release.

# 1. set the new version in cli/pyproject.toml and note the changes in CHANGELOG.md, then commit
# 2. tag it; the tag must match the version, or the workflow stops before publishing
git tag cli-v0.2.0 && git push origin cli-v0.2.0

workflow_dispatch runs the same workflow without publishing, for checking a release before tagging.

One-time PyPI setup

Publishing uses trusted publishing, so no API token is stored in the repository: GitHub proves the workflow's identity over OpenID Connect and PyPI issues a short-lived token for that one upload. Before the first release, add the publisher on PyPI (Your projects -> aictem -> Publishing, or Publishing under your account for a project that does not exist yet):

Field Value
Owner d0gra
Repository name AI-CTEM
Workflow name release-cli.yml
Environment name pypi

The environment is created by the first run, so nothing is needed on the GitHub side. To require an approval before each upload, add a protection rule to that environment in the repository settings.

Metadata

Release files for aictem 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aictem 0.1.1
File Size Uploaded Provenance Actions
aictem-0.1.1.tar.gz 63.5 kB With provenance Details for aictem-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aictem 0.1.1
File Interpreter ABI Platform Actions
aictem-0.1.1-py3-none-any.whl Python 3 none any Details for aictem-0.1.1-py3-none-any.whl

Total release size: 128.3 kB

Release files / aictem-0.1.1.tar.gz

Download URL aictem-0.1.1.tar.gz
Size 63.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e4e7ff1841f3cceadb872982b869dce7284e4bfe2c474efee90be88d3c53b977
BLAKE2b-256 checksum
How to use checksums
749b0e714676cb123aee3a4fa33e8ce8a0d0e0e394fde356b554d346e6f1b009
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / aictem-0.1.1-py3-none-any.whl

Download URL aictem-0.1.1-py3-none-any.whl
Size 64.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e31771b4f1d647925c23e21d38ab01abaa6d71ae09484b779fc55d17a526714
BLAKE2b-256 checksum
How to use checksums
f218038e35420345294b2f33cc0a08db16ca4da686882a99e848993707eef055
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Security for aictem 0.1.1

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.

Select from 2 files

Attestation for aictem-0.1.1.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 Nov 15, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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