OpenViSTAI · Agents · Blockchain · Crypto
Menu
Agent Security & Sandboxing

Cain

Cain is a Python command-line AI penetration-testing agent for authorized security assessments. Built on the Claude Agent SDK, it uses a deterministic pipeline and scope enforcement, and includes a cloud assessment module for AWS, Azure, Google Cloud, Alibaba Cloud, Tencent Cloud and Huawei Cloud.

Independent OpenViST project profile, based on linked sources.

Cain — OpenViST project profile in Agent Security & Sandboxing.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Cain when conducting an authorized assessment with a defined target scope and a need for a structured CLI workflow and report artifacts.

Who it is for

  • Security practitioners running authorized assessments of enterprise assets or bug-bounty targets.
  • Cloud security teams assessing supported provider environments.
  • Teams that want assessment findings and evidence summaries in Markdown and JSON.

Documented uses

  • Run an AI-assisted penetration-testing workflow against an explicitly scoped target.
  • Assess cloud environments across the six named providers.
  • Produce findings, evidence-chain digests, validation summaries and remediation advice for review.
Before you choose

Requirements & limits

Cain is distributed through a public GitHub repository under the Apache-2.0 license. It is installed locally as a Python CLI.

  • The default backend is Claude; the optional pi backend requires Node.js 20 or newer and a one-time bridge installation.
  • Provider credentials and model configuration are required according to the selected pi provider.
  • The optional [cloud] extra adds AWS S3, Huawei OBS and Kubernetes checks.
  • Assessment output is written to a workspace report/ directory and includes Markdown, aggregate JSON and validation-summary JSON.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Cain and verify the CLI

Install Cain in editable mode and check that its command-line entry point responds.

Before you start

  • A local environment capable of cloning the GitHub repository.
  • Python package installation with pip or uv.

Steps

  1. Clone https://github.com/cdxiaodong/cain-agent and change into the cain-agent directory.

  2. Install the project with the command below or the command below.

    Documented command
    pip install -e .
    Documented command
    uv pip install -e .
  3. Run cain-agent --version to verify the CLI entry point.

Expected outcome

The project is installed in editable mode and the CLI version command has been run.

Guide limitations

  • This guide covers installation and the CLI check only; it does not configure an AI backend or run an assessment.
Source-based practical guide

Start a scoped assessment

Run Cain against an authorized target with an explicit time budget using its default Claude backend.

Before you start

  • Cain installed and its default Claude backend configured for use.
  • Authorization to assess the target.

Steps

  1. Choose the authorized target and set it as the --target value.

  2. Run cain-agent run --target https://app.example.com --total-budget 1800, replacing the example URL and budget as appropriate.

  3. Review the completed run’s report/ directory in the workspace for report.md, aggregated-report.json and validation-summary.json.

Expected outcome

Cain runs the assessment with the target recorded in `scope.yaml` and provides the documented report artifacts when the run finishes.

Guide limitations

  • The documented command uses the default Claude backend; alternative backend and provider setup is separate.
  • Only assess targets for which authorization has been obtained.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
5 November 2026
Original website title
cdxiaodong/cain-agent · Official homepage title · retained in its source language