Getting Started
Get Arcaix running on your project in a few minutes.
Quick Start
The fastest way to get started is using npx:
npx arcaix@latest initThis will initialize Arcaix in your project and run your first security scan.
Or scan your project directly:
arcaix scan .Pro tip: Add scripts to your package.json for easy access:
{
"scripts": {
"security": "arcaix scan .",
"security:fix": "arcaix scan . --fix"
}
}Installation
Install Arcaix globally using your preferred package manager:
npm install -g arcaixYou can also install Arcaix as a dev dependency: npm install --save-dev arcaix
npm install --save-dev arcaixVerify Installation
arcaix --versionBasic Usage
Scan your project
Run a security scan on your current directory:
arcaix scan .Scan specific path
Target a specific directory or file:
arcaix scan ./src/apiOutput formats
Export results in different formats (same as in Docs):
# Table (default) - human-readable terminal output
arcaix scan . --format table
# JSON - machine-readable
arcaix scan . --format json -o report.json
# SARIF - for GitHub Code Scanning
arcaix scan . --format sarif -o results.sarif
# HTML - visual report
arcaix scan . --format html -o report.htmlAuto-fix vulnerabilities
Fix detected issues with arcaix scan . --fix or the fix command:
arcaix scan . --fix
# Preview changes without applying
arcaix fix . --dry-runAlways review auto-fixes before committing.
CI/CD Integration
Add to .github/workflows/security.yml (same as Docs):
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.sarifConfiguration
Create an arcaix.config.js file in your project root (same as Docs):
/** @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,
},
};