{"slug": "open-source-ai-agent-workflow-for-auditing-solidity-smart-contracts", "title": "Open-source AI agent workflow for auditing Solidity smart contracts", "summary": "Chain-shield released AI Agent Audit, an open-source Rust tool that uses large language models to audit Solidity smart contracts for security vulnerabilities. The tool generates proof-of-concept exploits and professional reports, and has been tested in Code4rena competitions.", "body_md": "AI Agent Audit is a Rust command-line tool for AI-assisted security review of Solidity repositories.\n\n- discovers security vulnerabilities in Solidity and EVM-based codebases\n- deduplicates and validates findings\n- generated runnable PoC for each validated High/Medium finding\n- create professional audit report for each validated finding in markdown\n\nI used this tool to compete in Code4rena competitions and the results were encouraging:\n[https://code4rena.com/@saraswati](https://code4rena.com/@saraswati)\n\nThe repository is in public beta. It is meant to accelerate expert review, not replace manual auditing.\n\n- Public beta.\n- Solidity and EVM-focused.\n- Repository source, docs, and derived context are sent to third-party LLM providers you configure.\n- The current default audit pipeline uses ChatGPT/Codex OAuth for OpenAI access and runs the active review flow on\n`gpt-5.5`\n\n. Deduplication helpers use`gpt-5.4`\n\nwith low reasoning. - Codex is the recommended default path for the current validation workflow and operating model.\n- Startup performs a one-time ChatGPT sign-in if needed and reuses the cached session on later runs until the token expires.\n`OPENAI_API_KEY`\n\nis supported as a secondary fallback for Rust OpenAI calls by setting`AI_AGENT_AUDIT_OPENAI_BACKEND=api`\n\n.`ANTHROPIC_API_KEY`\n\n,`GEMINI_API_KEY`\n\n/`GOOGLE_AI_API_KEY`\n\n, and`DEEPSEEK_API_KEY`\n\nare still supported by the agent layer, but they are not required by the default review path.- Discovery-style runs can be switched to Gemini by changing the defaults in\n[src/config.rs](/chain-shield/ai-agent-audit/blob/develop/src/config.rs)if you want to use Google AI for patterns, actors, and invariants while keeping verification/reporting on OpenAI/Codex. - PoC generation and PoC verification are supported through\n`validation-three-shot`\n\n, which is the primary validation workflow.\n\n- Clones and builds Foundry or Hardhat repositories under\n`~/Desktop/Audit`\n\nby default. - Generates audit scope and protocol docs from README/configured entry files into\n`audit-docs/`\n\n. - Uses Slither-derived call graph and semantic data when static analysis succeeds.\n- Builds inheritance and interface-implementation indexes from Solidity source.\n- Generates contextual codeblocks for each in-scope contract.\n- Uses pattern libraries, invariant prompts, and actor-oriented context to discover candidate findings.\n- Verifies and deduplicates findings before producing report output.\n- Stores local SQLite state in\n`.ai-agent-audit/`\n\n.\n\n- Smart contract auditors and security researchers.\n- Protocol teams doing internal review of Solidity codebases.\n- Engineers experimenting with AI-assisted audit workflows on repos they are allowed to share with external model providers.\n\nThis project is not a hosted service, not a generic SAST scanner for every language, and not a substitute for human validation.\n\n- Rust stable toolchain. Install from\n[rust-lang.org/tools/install](https://www.rust-lang.org/tools/install). - Git. Install from\n[git-scm.com/downloads](https://git-scm.com/downloads). - Slither. Install from\n[github.com/crytic/slither](https://github.com/crytic/slither). - Foundry (\n`forge`\n\n) for Foundry repositories. Install from[book.getfoundry.sh/getting-started/installation](https://book.getfoundry.sh/getting-started/installation). - Node.js 18+ plus\n`npm`\n\n/`npx`\n\n, Yarn, pnpm, or Bun for JavaScript/Hardhat repositories. Install Node.js from[nodejs.org](https://nodejs.org/). Install Bun from[bun.sh](https://bun.sh/)if the target repo uses`bun.lock`\n\n/`bun.lockb`\n\n. - Optional\n`GITHUB_TOKEN`\n\nfor private GitHub repositories.\n\n- Clone this repository and enter it.\n\n```\ngit clone https://github.com/chain-shield/ai-agent-audit.git\ncd ai-agent-audit\n```\n\n- Create a local env file from the template.\n\n```\ncp .env.example .env\n```\n\n- Edit\n`.env`\n\nand set the values you actually need:\n\n```\nRUST_LOG=info\nAI_AGENT_AUDIT_OPENAI_BACKEND=codex\n# Codex is the recommended default for cost. Optional Rust API fallback:\n# AI_AGENT_AUDIT_OPENAI_BACKEND=api\n# OPENAI_API_KEY=your_openai_api_key\n# Optional non-OpenAI provider keys:\n# ANTHROPIC_API_KEY=...\n# GEMINI_API_KEY=...\n# DEEPSEEK_API_KEY=...\n```\n\n-\nThe first Codex-backed run will prompt you to sign in with ChatGPT if there is no cached Codex session yet. After that, the session is reused automatically until expiry. If you set\n\n`AI_AGENT_AUDIT_OPENAI_BACKEND=api`\n\n, Rust OpenAI calls use`OPENAI_API_KEY`\n\ninstead and do not require Codex sign-in. -\nCopy the example config and point it at a Solidity repository.\n\n```\ncp examples/audit-config.example.yaml audit-config.yaml\n```\n\nMinimal example:\n\n```\nrepo: \"https://github.com/example/protocol.git\"\naudit_type: \"Client\"\ncode_folders:\n  - \"src\"\n```\n\n- Build and run the tool.\n\n```\ncargo build --release\ncargo run --release -- --config audit-config.yaml\n```\n\nIf you prefer not to use YAML for a simple run:\n\n```\ncargo run --release -- https://github.com/example/protocol.git --audit-type Client\n```\n\nFor repos that keep contracts under `contracts/`\n\ninstead of `src/`\n\n, set `code_folders`\n\naccordingly.\n\nThe main Rust run produces the initial audit artifacts and, by default, emits a ready-to-run `validation-three-shot`\n\njob. That validation workflow is where deeper filtering, PoC generation, PoC verification, and report hardening happen.\n\nIf the target repository is private, set `GITHUB_TOKEN`\n\nbefore running the tool. The clone path uses that token for GitHub HTTPS URLs.\n\n```\nexport GITHUB_TOKEN=...\n```\n\n`--config <file>`\n\nloads YAML, and explicit CLI flags override YAML values. The current example file lives at [examples/audit-config.example.yaml](/chain-shield/ai-agent-audit/blob/develop/examples/audit-config.example.yaml).\n\n`Code4rena`\n\n`Code4renaBounty`\n\n`ImmunefiBugBounty`\n\n`Sherlock`\n\n`Cantina`\n\n`Client`\n\nUse `Client`\n\nfor internal or client-style audits. Use the contest values when you want severity handling and report language aligned more closely with those platforms. Use `Code4renaBounty`\n\nfor C4 bug bounty programs where only currently exploitable Critical/High issues with runnable PoCs should become submission candidates. Use `ImmunefiBugBounty`\n\nwhen the run should derive repo/docs/scope from an Immunefi program page and validate against Immunefi-style impact rules.\n\n`immunefi_bounty`\n\n/`--immunefi-bounty`\n\nDerives repo, docs, and scope from an Immunefi bounty page. This is the standard entrypoint for`ImmunefiBugBounty`\n\n.`code4rena_bounty`\n\n/`--code4rena-bounty`\n\nDerives repo, docs, and scope from a Code4rena bounty page. This is the standard entrypoint for`Code4renaBounty`\n\nwhen you want the tool to gather bounty context for you.`code4rena_contest_repo`\n\n/`--code4rena-contest-repo`\n\nAdds Code4rena contest context and V12 lookup support from a contest GitHub repo URL.`code4rena_contest_url`\n\n/`--code4rena-contest-url`\n\nAlias for`code4rena_contest_repo`\n\n. Provide only one of the two.\n\nExample configs:\n\n```\n# Immunefi-derived run\naudit_type: \"ImmunefiBugBounty\"\nimmunefi_bounty: \"https://immunefi.com/bug-bounty/example/information/\"\n# Code4rena bounty-derived run\naudit_type: \"Code4renaBounty\"\ncode4rena_bounty: \"https://code4rena.com/bounties/example\"\n# Code4rena contest run with extra contest context\nrepo: \"https://github.com/example/protocol.git\"\naudit_type: \"Code4rena\"\ncode4rena_contest_repo: \"https://github.com/code-423n4/2026-01-example\"\n```\n\nFor enum-like values, YAML uses the Rust-style names such as `Code4renaBounty`\n\n, `ImmunefiBugBounty`\n\n, and `HardhatYarn`\n\n. CLI flags use the actual `--help`\n\nspellings, such as `hardhat-yarn`\n\nfor `--builder`\n\n.\n\n| YAML key / CLI flag | Purpose |\n|---|---|\n`repo` / positional `repo` |\nRequired HTTP(S) Git repository URL. |\n`config` / `--config` |\nLoad a YAML config file. |\n`immunefi_bounty` / `--immunefi-bounty` |\nImmunefi program URL used to derive repo, docs, and scope. |\n`code4rena_bounty` / `--code4rena-bounty` |\nCode4rena bounty URL used to derive repo, docs, and scope. |\n`code4rena_contest_repo` / `--code4rena-contest-repo` |\nCode4rena contest GitHub repo URL used to derive contest docs, scope, and V12 context. |\n`code4rena_contest_url` / `--code4rena-contest-url` |\nAlias for `code4rena_contest_repo` ; do not set both. |\n`subfolder` / `--subfolder` |\nAnalyze a subdirectory inside the cloned repo, useful for monorepos. |\n`code_folders` / `--code-folders` |\nSource roots to scan for contracts. Defaults to `[\"src\"]` . |\n`audit_scope` / `--audit-scope` |\nLocal Markdown file containing scope notes or reviewer guidance. |\n`doc_folder` / `--doc-folder` |\nRepo-relative folder containing Markdown docs to ingest. |\n`custom_doc` / `--custom-doc` |\nLocal Markdown file to use instead of auto-discovered root docs. |\n`monorepo_folders` / `--monorepo-folders` |\nLocal text file listing repo-relative package roots for monorepo-aware analysis. |\n`exclude_folders` / `--exclude-folders` |\nRepo-relative folders to exclude from scope. |\n`scoped_files` / `--scoped-files` |\nLocal text file listing repo-relative files that should be treated as in scope. |\n`validation_supervision` / `--validation-supervision` |\nEmit a Codex GUI three-shot validation job after report export. Defaults to `gui` ; set `off` to disable. |\n`validation_supervision_overwrite` / `--validation-supervision-overwrite` |\nReplace an existing non-terminal GUI validation job with the same run id. Defaults to `false` ; use only for intentional reruns. |\n`context` |\nYAML-only block for generated audit scope/docs context. Defaults to `README.md` , `audit-docs` , `force_regenerate: true` , and 5000 tokens per generated Markdown file. |\n`poc` |\nYAML-only block for PoC runtime preferences, including fork policy and network-to-RPC-env mappings used when generated context includes PoC guidance. |\n`benchmark` |\nYAML-only block for benchmark telemetry and stable `run_id` configuration. |\n`audit_type` / `--audit-type` |\nOne of `Code4rena` , `Code4renaBounty` , `ImmunefiBugBounty` , `Sherlock` , `Cantina` , `Client` . |\n`builder` / `--builder` |\nYAML: `Foundry` , `Hardhat` , `HardhatYarn` , `Custom` , `Auto` . CLI: `foundry` , `hardhat` , `hardhat-yarn` , `custom` , `auto` . Default is `Auto` / `auto` . |\n`build_cmd` / `--build-cmd` |\nRequired when `builder: \"Custom\"` is used. |\n`via_ir` / `--via-ir` |\nAdds `--via-ir` to the Foundry build command. |\n`force_rebuild` / `--force-rebuild` |\nRe-clone and rebuild even if a cached workspace already exists. |\n\n`custom_doc`\n\n,`audit_scope`\n\n,`scoped_files`\n\n, and`monorepo_folders`\n\nare read from local files you provide on the machine running the tool.`subfolder`\n\n,`code_folders`\n\n,`doc_folder`\n\n, and`exclude_folders`\n\nare interpreted relative to the cloned target repository.- If no manual\n`custom_doc`\n\n,`audit_scope`\n\n, or`scoped_files`\n\nare provided, the tool generates`<repo-folder>-docs.md`\n\n,`<repo-folder>-scope.md`\n\n, and`<repo-folder>-scope.txt`\n\nin`audit-docs/`\n\n. - The generated filename prefix preserves the cloned repo folder identity, including date/contest prefixes such as\n`2026-04-monetrix`\n\n. `context.force_regenerate`\n\ndefaults to`true`\n\nfor generated context. Legacy YAMLs that already provide all three manual context files are left alone when no`context`\n\nblock is present.\n\nMinimal generated-context config:\n\n```\ncontext:\n  files:\n    - README.md\n  urls: []\n  v12_url: \"auto\"\n  output_dir: \"audit-docs\"\n  force_regenerate: true\n  max_tokens_per_file: 5000\n```\n\nThe generator copies `scope.txt`\n\nfrom the cloned repo when present. If no `scope.txt`\n\nexists, it extracts in-scope Solidity paths from entry context files. By default the only entry file is `README.md`\n\n; `context.files`\n\ncan add or replace entry files. Links found in those entry files are treated as second-level candidates and fetched only when they look relevant to scope, known issues, protocol documentation, prior audits, or Code4rena V12 reports. For `Code4renaBounty`\n\n, the generator also fetches Code4rena's bounty guide and bounty criteria, preserves global bounty out-of-scope rules, and can map contract-name-only scope tables to local Solidity definitions. Fetched second-level pages do not emit more links. If generated `scope.md`\n\nor `docs.md`\n\nexceeds `max_tokens_per_file`\n\n, Codex summarizes it down to the limit; the generator refuses to silently truncate final Markdown.\n\nOptional PoC config:\n\n```\npoc:\n  allow_fork: true\n  prefer_fork: true\n  rpc_env:\n    ethereum-mainnet: \"MAINNET_RPC_URL\"\n    base-mainnet: \"BASE_RPC_URL\"\n```\n\nThe `poc`\n\nblock is YAML-only. It mainly affects generated PoC runtime guidance for workflows that need explicit network and fork assumptions, such as Immunefi bounty validation.\n\n| Variable | Required | Notes |\n|---|---|---|\n| ChatGPT/Codex sign-in | Yes for the default pipeline | Performed interactively once at startup when needed, then cached locally until expiry. |\n`AI_AGENT_AUDIT_OPENAI_BACKEND` |\nNo | `codex` by default. Set to `api` to use direct OpenAI API billing. |\n`OPENAI_API_KEY` |\nOnly for API fallback | Required when `AI_AGENT_AUDIT_OPENAI_BACKEND=api` . Not used by the default Codex path. |\n`GEMINI_API_KEY` |\nNo | Supported by the agent layer, not required by the default path. |\n`GOOGLE_AI_API_KEY` |\nLegacy alias | Accepted as a fallback for Gemini. |\n`ANTHROPIC_API_KEY` |\nNo | Supported by the agent layer, not required by the default path. |\n`DEEPSEEK_API_KEY` |\nNo | Supported by the agent layer, not required by the default path. |\n`GITHUB_TOKEN` |\nNo | Used for private GitHub repo cloning. |\n`AI_AGENT_AUDIT_VALIDATION_SUPERVISION` |\nNo | Overrides validation job emission mode. Supported values: `gui` or `off` . |\n`AI_AGENT_AUDIT_DATA_DIR` |\nNo | Overrides the local cache directory. Defaults to `.ai-agent-audit` . |\n`AI_AGENT_AUDIT_WORKSPACE_ROOT` |\nNo | Overrides where target repos are cloned and built. Defaults to `~/Desktop/Audit` . |\n`AI_AGENT_AUDIT_WORKER_LAUNCHER` |\nNo | Codex-compatible validation worker launcher. Defaults to `codex` on PATH and overrides YAML launcher values. |\n`RUST_LOG` |\nNo | Standard Rust log level, defaults to `info` . |\n\nThe shipped template is [ .env.example](/chain-shield/ai-agent-audit/blob/develop/.env.example).\n\nDiscovery provider/model defaults now live in [src/config.rs](/chain-shield/ai-agent-audit/blob/develop/src/config.rs). Edit `DISCOVERY_PROVIDER`\n\n, `GEMINI_DISCOVERY_MODEL`\n\n, and `DISCOVERY_GEMINI_THINKING_LEVEL`\n\nthere if you want to switch discovery between OpenAI and Gemini.\n\n-\nRepository preparation. The tool validates the repo URL, resolves the current\n\n`HEAD`\n\ncommit, clones the target into a local workspace under`~/Desktop/Audit/<project-id>/`\n\n, and builds it with Foundry, Hardhat, or a custom command. -\nAudit context generation. The tool reads README/configured entry files, follows relevant second-level links, copies or extracts scope, and writes generated scope/docs files under\n\n`audit-docs/`\n\n. -\nSemantic extraction. It runs the Slither-based enrichment path to build a local semantic SQLite database with function metadata and call graph edges.\n\n-\nMetadata context. It generates protocol-level context used later by the audit prompts and saves a metadata Markdown artifact.\n\n-\nSolidity indexing. It builds inheritance information from source and then derives an interface-implementation index.\n\n-\nCodeblock generation. It slices the codebase into contextual per-contract codeblocks using call graph depth and token-budget settings.\n\n-\nAI review. Verification, deduplication, summaries, and report-writing use the configured OpenAI backend: Codex by default, or direct API when\n\n`AI_AGENT_AUDIT_OPENAI_BACKEND=api`\n\n. Discovery-style phases (patterns, actors, invariants) use the provider configured in[src/config.rs](/chain-shield/ai-agent-audit/blob/develop/src/config.rs). Findings are aggregated across contracts and deduplicated at the end. -\nReport export and local persistence. The tool writes Markdown outputs, records findings in local SQLite databases, and keeps cached repo metadata for later runs. By default it also emits a\n\n`validation-three-shot`\n\njob, which is the primary path for deeper validation, PoC generation, PoC verification, and final report polish.\n\nOutputs are written relative to the current working directory. The main output folder is named after the target repo, or `repo/subfolder`\n\nif `subfolder`\n\nis configured.\n\n`<repo_name>/report/audit-report.md`\n\nThe main aggregated audit report.`<repo_name>/report/<sanitized-finding-title>.md`\n\nOne file per finding when a detailed competition-style report was generated for that finding. Filenames are sanitized and truncated.`<repo_name>/metadata-<unique_repo_hash>.md`\n\nSaved metadata context used during analysis.`<repo_name>/<ContractType>-<Contract>-size-<tokens>.md`\n\nExported codeblocks for in-scope contracts.\n\nBy default, the tool stores local state under `.ai-agent-audit/`\n\n:\n\n`.ai-agent-audit/semantic.db`\n\n`.ai-agent-audit/codeblock.db`\n\n`.ai-agent-audit/findings.db`\n\n`.ai-agent-audit/repo_data.db`\n\nSet `AI_AGENT_AUDIT_DATA_DIR`\n\nif you want those files elsewhere.\n\nThe Rust pipeline performs discovery and initial verification, then emits a `validation-three-shot`\n\nconfig/job for deeper validation, PoC generation, PoC verification, and report creation.\n\nCodex-supervised mode is the strongest path for high-stakes work because fresh Codex workers can inspect files, create PoCs, and repair reports round by round:\n\n```\npython3 scripts/three_shot_round.py prepare-scope --config validation-three-shot/config.yaml --write-prompt /tmp/three-shot-r1.md\n```\n\nFor users who want the validation phase to run immediately instead of being monitored by a GUI supervisor:\n\n```\ncp validation-three-shot/config.yaml validation-three-shot/my-run.yaml\n# edit benchmark, run_id, paths.source_root, paths.audit_root, and paths.audit_report\npython3 scripts/three_shot_round.py run --config validation-three-shot/my-run.yaml\n```\n\nFor a cheaper validation-only pass before PoCs and report review:\n\n```\npython3 scripts/three_shot_round.py run --config validation-three-shot/my-run.yaml --skip-poc\n```\n\nThe validation runner uses the Codex CLI by default. These prompts require an agent worker with local file read/write and test execution, so a raw `OPENAI_API_KEY`\n\nalone cannot run the PoC/report validation workflow. Set `AI_AGENT_AUDIT_WORKER_LAUNCHER`\n\nor `workers.default.launcher`\n\nif your Codex-compatible binary or wrapper has a different name; the env var wins for one-off runs.\n\nThe analysis system combines several sources of context:\n\n- Pattern libraries covering access control, reentrancy, accounting and invariant drift, oracle and AMM behavior, governance and timelocks, upgradeability, bridging, token standards, marketplace flows, and more.\n- Invariant analysis across arithmetic, balance, permission, temporal, referential, and state-machine categories.\n- Actor-oriented prompt context for threat modeling each reviewed contract.\n- Contest-aware severity handling for\n`Code4rena`\n\n,`Sherlock`\n\n, and`Cantina`\n\n, bounty-specific handling for`Code4renaBounty`\n\nand`ImmunefiBugBounty`\n\n, plus a more open-ended`Client`\n\nmode.\n\nThe exact prompts and pattern catalogs continue to evolve, so the README intentionally describes this at the capability level instead of freezing brittle counts.\n\n- This project sends code and documentation to external AI providers. Do not use it on repositories you are not allowed to share with those providers.\n- The tool is designed for defensive review support. It can miss real issues and it can produce false positives.\n- The default Rust OpenAI path depends on a valid cached ChatGPT/Codex session. API fallback for Rust OpenAI calls requires\n`AI_AGENT_AUDIT_OPENAI_BACKEND=api`\n\nand`OPENAI_API_KEY`\n\n; deep validation workers still require a Codex-compatible agent launcher. `audit_type`\n\naffects severity, rubric behavior, context gathering, and validation profile selection.`Code4renaBounty`\n\ndisables V12-specific validation stages and uses a stricter Critical/High submit/no-submit flow.`ImmunefiBugBounty`\n\nuses Immunefi-style scope and impact handling.- Runnable PoC generation and verification are supported through the separate\n`validation-three-shot`\n\nworkflow. The main Rust audit pipeline stops after initial artifact generation and job emission. - If the target repo does not build cleanly on the local machine, analysis quality will degrade or the run may fail.\n- Automatic Hardhat/JavaScript build commands may install missing dependencies locally, but they do so with lifecycle scripts disabled, such as\n`npm ci --ignore-scripts`\n\n,`yarn install --ignore-scripts`\n\n,`pnpm install --frozen-lockfile --ignore-scripts`\n\n, or`bun install --frozen-lockfile --ignore-scripts`\n\n. Foundry dependency installation via`forge install`\n\nis not run automatically. Because execution is host-local rather than Docker-isolated, only audit repositories you trust, or provide an explicit`build_cmd`\n\n. - If Slither cannot extract semantic data, the tool falls back to a reduced analysis path with less Slither-derived context.\n\nIf Codex startup cannot authenticate OpenAI access, rerun the tool and complete the ChatGPT/Codex sign-in prompt. The default path does not require `OPENAI_API_KEY`\n\n.\n\nIf you do not have Codex access and want to run the Rust audit path with direct API billing, set:\n\n```\nAI_AGENT_AUDIT_OPENAI_BACKEND=api\nOPENAI_API_KEY=your_openai_api_key\n```\n\nIf the build output shows `No build system detected`\n\n, the target repo likely does not expose a recognizable `foundry.toml`\n\nor `hardhat.config.*`\n\nat the analyzed root. Set `subfolder`\n\n, `monorepo_folders`\n\n, or `builder: \"Custom\"`\n\nplus `build_cmd`\n\n.\n\nThe Docker execution path has been removed. If `git`\n\n, `slither`\n\n, `forge`\n\n, `node`\n\n, `npm`\n\n, `npx`\n\n, `yarn`\n\n, `pnpm`\n\n, or `bun`\n\nis required and missing or incompatible, startup/build/static-analysis will fail with an install note for the missing command. Node-based builds require Node.js 18 or newer. Modern Foundry/solc projects require Slither 0.11.5 or newer.\n\nIf the run finishes but contract coverage looks wrong, check `code_folders`\n\n. The default is `src`\n\n, but many repos use `contracts`\n\n, `src/contracts`\n\n, or multiple package roots.\n\nIf a rerun is clearly using stale build artifacts, set `force_rebuild: true`\n\nor pass `--force-rebuild`\n\n.\n\nThat is expected behavior. The tool can continue in a reduced mode, but some Slither-derived metadata will be skipped.\n\nThe current codebase is organized around these modules:\n\n```\nsrc/\n  main.rs                 CLI entrypoint and top-level orchestration\n  config.rs               environment/config loading and constants\n  cli_args/               clap/YAML argument parsing\n  prepare_code/           repo cloning, generated context, filtering, native builds, repo metadata\n  build_brain/            Slither enrichment and graph DB\n  enumerator/             codeblock generation, Solidity parsing, interface indexing\n  llm_review/             prompt generation, agent setup, findings, review phases\n  reporting/              audit reports, finding reports, exported artifacts\n  cost/                   inference cost tracking\n  utils/                  shared helpers\ntests/                    hermetic and manual integration tests\nscripts/run_ci_tests.sh   curated public CI test runner\n```\n\nPublic CI currently runs:\n\n`cargo fmt --check`\n\n`cargo check --tests`\n\n`bash scripts/run_ci_tests.sh`\n\nThat hermetic test runner is defined in [scripts/run_ci_tests.sh](/chain-shield/ai-agent-audit/blob/develop/scripts/run_ci_tests.sh) and wired through [ .github/workflows/ci.yml](/chain-shield/ai-agent-audit/blob/develop/.github/workflows/ci.yml).\n\nFor local development:\n\n```\ncargo fmt\ncargo check\nbash scripts/run_ci_tests.sh\n```\n\nManual or live-provider diagnostics are kept behind ignored tests:\n\n```\ncargo test -- --ignored\n```\n\nSee [CONTRIBUTING.md](/chain-shield/ai-agent-audit/blob/develop/CONTRIBUTING.md) for contribution expectations and [SECURITY.md](/chain-shield/ai-agent-audit/blob/develop/SECURITY.md) for private vulnerability reporting.\n\nThis project is licensed under the MIT License. See [LICENSE](/chain-shield/ai-agent-audit/blob/develop/LICENSE).", "url": "https://wpnews.pro/news/open-source-ai-agent-workflow-for-auditing-solidity-smart-contracts", "canonical_source": "https://github.com/chain-shield/ai-agent-audit", "published_at": "2026-06-29 22:29:32+00:00", "updated_at": "2026-06-29 22:50:10.221878+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "ai-agents", "developer-tools"], "entities": ["Chain-shield", "OpenAI", "Codex", "ChatGPT", "Gemini", "Anthropic", "DeepSeek", "Code4rena"], "alternates": {"html": "https://wpnews.pro/news/open-source-ai-agent-workflow-for-auditing-solidity-smart-contracts", "markdown": "https://wpnews.pro/news/open-source-ai-agent-workflow-for-auditing-solidity-smart-contracts.md", "text": "https://wpnews.pro/news/open-source-ai-agent-workflow-for-auditing-solidity-smart-contracts.txt", "jsonld": "https://wpnews.pro/news/open-source-ai-agent-workflow-for-auditing-solidity-smart-contracts.jsonld"}}