Lacan Scan

Lacan Scan

Analyseur de sécurité IA pour dépôts Git

File-trace static scanning for AI and agent risk patterns. Crisp CLI and composite GitHub Action with SARIF output. Current release: v7.6.0 (@v7) — AIS301 flow, experimental AIS002, AIS104, AIS003, AIS004, AIS006, and AIS009.

Install Action Marketplace Repository Download v7.6.0

Install the GitHub Action

Preferred path for repositories on GitHub. Marketplace listing: lacan-scan. Coding agents: follow install-action.md and write the file below to .github/workflows/lacan.yml without inventing another Action name.

  1. Create .github/workflows/lacan.yml.
  2. Paste the workflow from workflows/lacan.yml (shown below).
  3. Commit and merge. Keep permissions.security-events: write so SARIF can upload.
  4. Confirm the run under Actions, then Security → Code scanning (category lacan).
Lacan Scan Action mark
- uses: jose-compu/lacan-scan@v7
  with:
    path: .
    fail-on: HIGH
    output: sarif,cli
    sarif-file: lacan.sarif
    version: "7"
    changed-only: ${{ github.event_name == 'pull_request' }}
    changed-base: ${{ github.event.pull_request.base.sha }}
- uses: github/codeql-action/upload-sarif@v4
  if: always() && hashFiles('lacan.sarif') != ''
  with:
    sarif_file: lacan.sarif
    category: lacan

Full workflow (including on:, permissions, and checkout with fetch-depth: 0): workflows/lacan.yml. Pin Action @v7 and binary version: "7" (or "7.6.0" for a fixed artifact). Earlier rule lines remain on @v1–@v6. Skip a false positive with .lacan.toml or # lacan:skip=AIS008:reason. Experimental rules report and never fail the job.

Lacan Scan badge

Install the CLI

Package name on crates.io is lacan-scan. The binary is lacan.

cargo install lacan-scan --locked
lacan --version
lacan scan . --fail-on HIGH

Or download lacan-<triple>.tar.gz from Releases, verify the .sha256, and put lacan on your PATH. Source builds need Crisp 1.11.1+.

CLI usage

lacan scan . --fail-on HIGH --output cli,sarif
lacan scan . --changed-only origin/main --fail-on HIGH
lacan scan . --skip-rules AIS102

Optional hook: scripts/pre-commit-lacan.sh (requires lacan on PATH). Drop .lacan.toml in the repo to skip rules or paths.

Measured performance

The GitHub Action downloads a checksum-verified release binary. It does not compile on the runner. The figures are a scan of this repository on 13 November 2026, lacan 7.2.1, zero findings. The scan itself took 0.13 s on ubuntu-latest (run 43451601929). The whole job took 13 s. Most of that is checkout and the SARIF upload. Downloading the binary took 0.7 s. A local release binary on Apple silicon took 0.18 s, the median of three runs. Checks are from CI run 43450353100: 159 Crisp tests, 35 Rust shim tests, 61 fixture directories.

Measured scan of this repository, 13 November 2026 Local scan 0.18 seconds. Action scan 0.13 seconds. Whole Action job 13 seconds. CI ran 159 Crisp tests, 35 shim tests, and 61 fixture directories. MEASURED PERFORMANCE 13 November 2026, lacan 7.2.1, zero findings THE SCAN Local, Apple silicon 0.18 s Action scan, Ubuntu 0.13 s 0 0.08 0.16 0.24 s THE ACTION JOB Whole job 13 s SARIF upload 7 s Checkout 1 s Binary download 0.7 s 0 3.5 7 14 s CHECKS ON CI Crisp tests 159 Fixture directories 61 Rust shim tests 35 The Action downloads a release binary. It does not compile. Run 43451601929, ubuntu-latest. CI run 43450353100. 13 November 2026. Both scans reported zero findings.

Hand-scored noise and large-repo timing for issue #4 are in the README precision baseline (14 November 2026) in release v7.2.2. v7.6.0 adds experimental AIS006 (MCP unpinned or remote launch in mcp.json and related configs; never fails the job). v7.5.0 adds experimental AIS009 (committed authorized_keys, shell startup files, and crontabs; never fails the job). v7.4.0 adds experimental AIS004 (npm install hooks and setup.py cmdclass; never fails the job). v7.3.0 adds experimental AIS003 (VS Code folderOpen tasks; never fails the job). v7.2.3 narrows AIS102: no bare system prompt: label; HIGH only on the matched line inside an HTML comment or alt= attribute.

v7 detectors

RuleSeverityDetects
AIS301HIGHSame Python or TypeScript function: an LLM value reaches eval, exec, or a shell. Parsing is this check only.
AIS002CRITICAL, experimentalUntrusted CI input reaches an AI step in a job with secrets or write permissions (never fails the job)
AIS104MEDIUM, experimentalRetrieved or user data reaches a system prompt in the same function (never fails the job)
AIS003HIGH, experimental.vscode/tasks.json task with runOn set to folderOpen (never fails the job)
AIS004MEDIUM, experimentalpackage.json npm lifecycle scripts preinstall, install, or postinstall; setup.py cmdclass (never fails the job)
AIS006MEDIUM, experimentalmcp.json, .mcp.json, or claude_desktop_config.json unpinned npx/uvx/pipx or remote MCP launch (never fails the job)
AIS009MEDIUM, experimentalCommitted authorized_keys, shell startup dotfiles, or crontab paths (cron.d and related); never fails the job)

v6 detectors

RuleSeverityDetects
AIS208MEDIUM, experimentalBackdoor n-gram triggers in labelled datasets (never fails the job)
AIS209LOW, experimentalSafety-stripping / obedience fine-tune phrasing (never fails the job)
AIS210MEDIUMScripts that harvest model outputs at scale (distillation / logits)
AIS304MEDIUMLogprobs/logits exposed without an obvious rate limit
AIS107HIGH, experimentalContent-dependent chat template (fuel-capped render)
AIS110MEDIUM, experimentalRAG corpus text addressed to the model
AIS205HIGH, experimentalMalformed safetensors header
AIS206MEDIUM, experimentalBroken GGUF header; embedded chat template checked as AIS106
AIS207HIGH, experimentalNumPy object arrays, joblib, Keras Lambda
AIS211MEDIUM, experimentalLocalized safetensors tensor change

Release lines

MajorActionHighlights
v7@v77.6.0 experimental AIS006; 7.5.0 experimental AIS009; 7.4.0 experimental AIS004; 7.3.0 experimental AIS003; 7.2.3 AIS102 patch; 7.2.2 precision baseline; 7.2.1 fixture patch; 7.2.0 experimental AIS104; 7.1.0 experimental AIS002; 7.0.0 AIS301 flow
v6@v66.1.0 adds experimental AIS107, AIS110, AIS205–207, AIS211; 6.0.0 shipped AIS208–210, AIS304
v5@v5AIS106 / AIS108 / AIS109; crates.io lacan-scan
v4@v4.lacan.toml and inline skip comments
v3@v3Changed-only PR scans, pre-commit helper
v2@v2AIS105, AIS204, AIS401, AIS504
v1@v1Core detectors, SARIF Action
Ionic column motif
Fleur-de-lis motif
Parisian facade motif