Quickstart

Scan your first repository in 60 seconds.

The distribution name is aegis-ai-sast. Until the first PyPI upload succeeds, pip install aegis-ai-sast cannot work; install from a clone with pip install -e .. See PyPI Trusted Publishing.

Option 1: CLI (recommended)

# From a clone (PyPI name is still unpublished)
pip install -e .

# Scan current directory
aegis .

# Or scan a remote repo
aegis --repo https://github.com/your-org/your-repo

Option 2: Web Dashboard

Start this server from the clone and open /app. Paste a code snippet or repo URL. A hosted aegis.io signup is not provided by this repository.

Option 3: API

A hosted API at aegis.io is not provided by this repository. Against a server you run:

curl -X POST http://127.0.0.1:5000/api/scan/code \
  -H "Authorization: Bearer aegis_..." \
  -H "Content-Type: application/json" \
  -d '{"code": "import pickle; pickle.load(open(\"m.pkl\"))"}'

Option 4: GitHub Action (CLI + SARIF)

Complete workflow for an AI-app repo. Until PyPI, pip installs AEGIS from GitHub.com — an editable install of that checkout cannot provide the aegis CLI. The repository is private, so the install step needs credentials that can read it. For a remote scan against this server, download Settings → GitHub Actions instead.

name: AEGIS CLI SARIF
on: [push, pull_request]
jobs:
  aegis:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      security-events: write
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
      - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
        with:
          python-version: '3.12'
      - name: Scan and write SARIF
        run: |
          pip install "git+https://github.com/ThomasGenua/aegis.git"
          aegis . --fail-on critical --quiet --format sarif --output aegis.sarif
      - name: Upload AEGIS SARIF
        if: always() && hashFiles('aegis.sarif') != ''
        continue-on-error: true
        uses: github/codeql-action/upload-sarif@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3.34.1
        with:
          sarif_file: aegis.sarif
          category: aegis-ai-sast

Option 5: Pre-commit hook

aegis install-hook [--fail-on high]

Now every commit is scanned. --fail-on sets the hook default (env AEGIS_FAIL_ON still overrides). The hook exits 1 if aegis is not on PATH (or AEGIS_PATH is unset), or if it cannot read staged files. Bypass with git commit --no-verify when needed.