HomeDocs

Introduction

Arcaix is an open-source security scanner powered by AI. It analyzes your codebase for vulnerabilities, detects hardcoded secrets, and provides intelligent fix suggestions.

Early access
Arcaix is under active development. This page describes the intended interface; some commands, packages and integrations may not be published yet. Check the repository for what is currently released.
Built into your workflow
Runs in the editor, the terminal and pull requests
AI-assisted analysis
Findings are explained, not just listed
Actionable
Get fixes, not just warnings

Features

Static Application Security Testing (SAST)
Software Composition Analysis (SCA)
Secrets and credential detection
AI-powered fix suggestions
CI/CD integration
VS Code extension
Formal verification guarantees for critical rules
Supply chain & SBOM (CycloneDX/SPDX, VEX)
EU compliance reports (NIS2, CRA, GDPR, DORA)

Installation

Install Arcaix globally using your preferred package manager:

npm
npm install -g arcaix
yarn
yarn global add arcaix
pnpm
pnpm add -g arcaix
Local Installation
You can also install Arcaix as a dev dependency: npm install --save-dev arcaix

Verify Installation

arcaix --version

Quick Start

The fastest way to get started:

npx arcaix@latest init

Or scan your project directly:

arcaix scan .
Pro Tip
Add scripts to your package.json for easy access:
package.json
{
  "scripts": {
    "security": "arcaix scan .",
    "security:fix": "arcaix scan . --fix"
  }
}

CLI Commands

arcaix scan

Scan files or directories for security vulnerabilities.

arcaix scan [path] [options]

# Examples
arcaix scan .                    # Scan current directory
arcaix scan ./src                # Scan specific directory  
arcaix scan ./src/api/users.ts   # Scan specific file

arcaix fix

Automatically fix detected vulnerabilities.

arcaix fix [path]

# Preview changes without applying
arcaix fix . --dry-run

CLI Options

OptionDescriptionDefault
--formatOutput format (json, sarif, html, table)table
--output, -oWrite output to filestdout
--fail-onExit with error if severity foundhigh
--fixAuto-fix vulnerabilitiesfalse
--dry-runPreview fixes without applyingfalse
--config, -cPath to config filearcaix.config.js
--quiet, -qSuppress non-error outputfalse

Output Formats

Table

Human-readable terminal output

arcaix scan . --format table

JSON

Machine-readable for programmatic use

arcaix scan . --format json -o report.json

SARIF

Standard format for GitHub Code Scanning

arcaix scan . --format sarif -o results.sarif

HTML

Visual report for sharing

arcaix scan . --format html -o report.html

Configuration File

Create an arcaix.config.js file in your project root:

arcaix.config.js
/** @type {import('arcaix').Config} */
module.exports = {
  // Directories to scan
  include: ['src/**/*.{js,ts,jsx,tsx}', 'api/**/*.{js,ts}'],

  // Patterns to exclude
  exclude: ['node_modules', 'dist', '**/*.test.{js,ts}'],

  // Severity level that causes non-zero exit
  failOn: 'high',

  // Enable/disable specific rules
  rules: {
    'sql-injection': 'error',
    'xss': 'error',
    'hardcoded-secret': 'error',
    'prototype-pollution': 'warn',
  },

  // AI-powered features
  ai: {
    enabled: true,
    autoFix: false,
  },
};

Rules Configuration

Each rule can be set to:

"off" Disabled"warn" Warning"error" Fails scan
arcaix.config.js
module.exports = {
  rules: {
    // Injection vulnerabilities
    'sql-injection': 'error',
    'nosql-injection': 'error',
    'command-injection': 'error',
    
    // XSS
    'xss': 'error',
    'xss-stored': 'error',
    
    // Secrets
    'hardcoded-secret': 'error',
    'weak-password': 'warn',
    
    // Other
    'path-traversal': 'error',
    'ssrf': 'error',
  },
};

Ignore Patterns

.arcaixignore File

.arcaixignore
# Dependencies
node_modules/

# Build outputs
dist/
build/

# Test files
**/*.test.ts
__tests__/

Inline Comments

// arcaix-disable-next-line sql-injection
const query = `SELECT * FROM users WHERE id = ${id}`;

// arcaix-disable sql-injection
function legacyCode() {
  // This entire function is ignored
}
// arcaix-enable sql-injection

SQL Injection

Detects SQL injection vulnerabilities from unsanitized user input.

❌ Vulnerable
const query = `SELECT * FROM users WHERE id = ${userId}`;
await db.query(query);
✓ Secure
const query = 'SELECT * FROM users WHERE id = ?';
await db.query(query, [userId]);

Cross-Site Scripting (XSS)

Detects XSS vulnerabilities where user input is rendered without sanitization.

❌ Vulnerable
element.innerHTML = userInput;
✓ Secure
import DOMPurify from 'dompurify';
element.innerHTML = DOMPurify.sanitize(userInput);

Secrets Detection

Arcaix detects hardcoded secrets, API keys, and credentials.

AWS Keys
Google Cloud
Azure
GitHub Tokens
Stripe
JWT Secrets
Database URLs
Private Keys
OAuth Tokens
Use environment variables for secrets: process.env.API_KEY

Dependency Scanning

Scans your dependencies for known vulnerabilities using CVE databases.

# Scan dependencies only
arcaix scan . --deps-only

# Include dev dependencies
arcaix scan . --include-dev-deps

Formal Verification

For selected high‑risk vulnerability classes (like SQL injection and command injection), Arcaix can provide formal guarantees: sound analyses with documented coverage bounds.

  • SMT‑based specifications for sources, sinks, and sanitizers
  • Proof artifacts you can attach to audits and security reviews
  • Configurable coverage targets, with the achieved bounds documented per rule
The formal verification engine is a research goal and is not available yet. See the vision page and the roadmap for the plan.

Supply Chain & SBOM

Arcaix can generate a Software Bill of Materials (SBOM) aligned with emerging EU requirements under the Cyber Resilience Act (CRA).

  • Support for CycloneDX and SPDX formats
  • Vulnerability and license annotations per component
  • VEX (Vulnerability Exploitability eXchange) statements for known CVEs
  • Explicit mapping to CRA SBOM‑related obligations (for example, Article 11)
SBOM and VEX generation are designed to plug directly into CI/CD and release workflows so that every build can ship with an auditable software inventory.

EU Compliance Suite

Beyond developer‑focused findings, Arcaix can emit reports that speak the language of EU regulators and auditors.

  • Checklist‑style mapping for NIS2 and the EU CRA
  • Technical‑controls view for GDPR (logging, data minimisation, access control)
  • DORA alignment for financial services (resilience, testing, incident response)
  • Exportable PDF/JSON reports intended for boards, CISOs, and regulators
The compliance suite turns Arcaix from a pure developer scanner into an EU‑compliance enabler, bridging security engineering and regulatory reporting.

VS Code Extension

Get real-time security feedback in your editor.

code --install-extension arcaix.arcaix-vscode
Real-time scanning
Inline warnings
Quick fixes
Problems panel

GitHub Actions

.github/workflows/security.yml
name: Security Scan
on: [push, pull_request]

permissions:
  contents: read
  security-events: write

jobs:
  arcaix:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Run Arcaix Scan
        uses: arcaix-dev/scan-action@v1
        with:
          fail-on: high
          format: sarif
          output: results.sarif
      
      - name: Upload SARIF
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: results.sarif

GitLab CI

.gitlab-ci.yml
arcaix-scan:
  stage: security
  image: node:20-alpine
  script:
    - npm install -g arcaix
    - arcaix scan . --format json --output gl-sast-report.json
  artifacts:
    reports:
      sast: gl-sast-report.json

Pre-commit Hooks

# Install husky
npm install --save-dev husky
npx husky init

# Add pre-commit hook
echo "npx arcaix scan . --fail-on high" > .husky/pre-commit

Node.js API

import { scan } from 'arcaix';

const results = await scan({
  path: './src',
  config: {
    failOn: 'high',
    rules: {
      'sql-injection': 'error',
    },
  },
});

console.log(results.vulnerabilities);

REST API

curl -X POST https://api.arcaix.dev/v1/scan \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"repository": "https://github.com/your-org/repo"}'