1. Install

You need Python 3.11+ and pip. Foundry is optional but strongly recommended.

Repository access required

The SIREEN source repository is not publicly readable today, so git clone below will fail until access is granted. Request access from the project owner at github.com/0766243478. See the download page for details. Checked 2026-10-15.

git clone https://github.com/0766243478/goalaif.git
cd goalaif/gaolaif/backend
python -m pip install -r requirements.txt
python -m pip install -e .

Verify the installation:

sireen --help

Expected output: usage information for the sireen command.

Tip

If sireen is not found, your Python Scripts directory may not be on PATH. Use python -m sireen_cli as a fallback.

2. Configure your API key (optional)

SIREEN works fully offline. An API key enables AI-assisted hypothesis generation. You can use any LLM provider key — OpenRouter accepts keys from OpenAI, Anthropic, Google, DeepSeek, and others.

  1. Go to openrouter.ai and sign up (free).
  2. Either create a new OpenRouter key (sk-or-v1-...) or link an existing provider key.
  3. In the backend directory, run: cp .env.example .env.local
  4. Edit .env.local and add your key: OPENROUTER_API_KEY=sk-or-v1-YOUR-KEY-HERE
Security reminder

.env.local is gitignored. Never commit it. Never share it. Each researcher must use their own key. If leaked, revoke it immediately.

3. Run your first analysis

We will use the built-in test fixture VulnerableVault.sol, a contract with a known reentrancy bug.

sireen audit ../../test_projects/critical_reentrancy/src/VulnerableVault.sol --report

This command:

  • Reads the contract source
  • Discovers functions, state variables, and external calls
  • Generates a reentrancy hypothesis
  • Produces a Foundry PoC test file
  • Attempts to compile and run it with Forge (if available)
  • Writes a Markdown report

Without Forge, the audit completes in a few seconds. With Forge, it may take 10–30 seconds depending on compilation time.

Tip

Use --json for machine-readable output, or --project to audit an entire Foundry project directory.

4. Read the output

After the audit finishes, you will see a summary like this:

SIREEN
Forge-backed adversarial security workbench

FILE
../../test_projects/critical_reentrancy/src/VulnerableVault.sol

DISCOVERY       OK
HYPOTHESIS      1 generated
ATTACK PATH     1 inspectable
POC             GENERATED
FORGE
Version: unavailable
Compile: FAILED
Test: NOT_RUN
Executed: 0

FINDINGS
REENTRANCY [NEEDS REVIEW] Reentrancy on withdrawEntireBalance
Evidence: evd-ce5159fb8f56

TERMINAL STATE
DEGRADED

What each field means

FieldMeaning
terminal_stateThe overall verdict: CONFIRMED, CLEAN_WITH_COVERAGE, DEGRADED, UNVERIFIED, or FAILED
findings[].confirmedtrue only if Forge executed the PoC and it passed
findings[].needs_reviewtrue when a PoC exists but was not executed (Forge missing) or the test failed
reasoning_modeHEURISTIC (offline) or LLM_ASSISTED (AI involved)
execution_statusllm_executed, llm_unavailable, heuristic_only, or llm_error
evidence[].poc_sourceThe complete generated Foundry test file

Terminal states explained

StateWhat it meansYour action
CONFIRMEDForge verified at least one finding. Evidence is complete.Review the evidence pack and consider remediation.
CLEAN_WITH_COVERAGENo findings. Every hypothesis received a real Forge attempt.Continue with manual review for out-of-scope vectors.
DEGRADEDFindings exist but could not be fully verified.Manually triage each needs_review finding.
UNVERIFIEDCoverage was insufficient to classify.Check if the contract has supported patterns (external calls, state variables).
FAILEDPipeline crashed or every PoC failed compilation.Check Python/Forge versions and file a bug report.

5. Review findings

If a finding is CONFIRMED

You have machine-verified evidence. The PoC compiled, ran, and its security assertions passed. Treat this as high-confidence evidence of a real vulnerability.

  1. Open the evidence pack via sireen show <audit-id>.
  2. Copy the poc_source into a file named PoC.t.sol.
  3. Run it yourself: forge test --match-path '*PoC*'
  4. If it passes, the vulnerability is independently reproducible.

If a finding is needs_review

This is the most common outcome when Forge is not installed. The heuristic detected a suspicious pattern and generated a PoC, but the PoC was not executed.

  1. Read the poc_source in the evidence pack.
  2. Judge whether the attack path is realistic.
  3. If you have Forge, copy the PoC into a test file and run it.
  4. If the test passes, the vulnerability is real.
  5. If the test fails or the PoC is nonsensical, it is likely a false positive.

Common false positives

  • Accounting inconsistency: Any function that updates multiple state variables is flagged. Legitimate accounting code often triggers this.
  • Reentrancy on guarded functions: The heuristic may flag an external call even when a nonReentrant modifier is present.
  • Access control on view functions: A function that reads privileged state but does not mutate it may be incorrectly flagged.

6. Report bugs and false positives

Your feedback directly improves the engine. Please report:

  • False positive: A safe contract flagged as vulnerable
  • False negative: An obviously vulnerable contract returns CLEAN_WITH_COVERAGE
  • Crash: FAILED terminal state with an error
  • CLI/extension mismatch: Same file produces different results
  • AI quality issue: LLM output is nonsense or irrelevant

Contact the project owner through their GitHub profile and include:

  1. The exact command you ran
  2. The contract source (or a minimal reproduction)
  3. The full output (use --json)
  4. Your environment: OS, Python version, Forge version
  5. Whether you had an OpenRouter key configured
Quick command reference
# Audit one file
sireen audit ./Contract.sol
sireen audit ./Contract.sol --json
sireen audit ./Contract.sol --report

# Audit a project
sireen audit ./my-foundry-project --project

# Inspect results
sireen audits
sireen show <audit-id>
sireen report <audit-id> --output report.md

# Start backend server (for VS Code extension)
python -m uvicorn main:app --host 127.0.0.1 --port 7432