Skip to main content

Reference

CLI Reference

Every command, flag, exit code, and scan phase in the Sigil CLI. Eight scan phases run locally — no account required for the open-source tier.

Setup commands

sigil install

Install Sigil and set up the default directory structure under ~/.sigil. Creates the quarantine, approved, logs, and reports directories.

bash
sigil install

# Creates:
#   ~/.sigil/quarantine/
#   ~/.sigil/approved/
#   ~/.sigil/logs/
#   ~/.sigil/reports/
#   ~/.sigil/config

sigil aliases

Output shell alias configuration for your current shell. Adds drop-in replacements that route commands through Sigil's quarantine-first workflow.

bash
# Add to your .bashrc / .zshrc
eval "$(sigil aliases)"

# Preview aliases without writing to shell config
sigil aliases --print
FlagDescription
--printPrint aliases to stdout without modifying shell config

Available aliases:

AliasExpands toDescription
gclonesigil cloneQuarantine-first git clone
safepipsigil pipQuarantine-first pip install
safenpmsigil npmQuarantine-first npm install
safefetchsigil fetchQuarantine-first URL fetch
auditsigil scanScan a target
auditheresigil scan .Scan the current directory
qlssigil listList quarantined items
qapprovesigil approveApprove a quarantined item
qrejectsigil rejectReject a quarantined item

sigil config

View or modify the Sigil configuration. Without flags, prints the current config.

bash
# Print current config
sigil config

# Generate a default config file
sigil config --init
FlagDescription
--initGenerate a default ~/.sigil/config file with all options documented

sigil hooks

Install git hooks that automatically scan commits and pushes. Adds a pre-commit hook that runs Sigil on staged changes.

bash
sigil hooks

# Installs .git/hooks/pre-commit that runs sigil scan on staged files

Audit commands

sigil clone

Clone a git repository into quarantine, scan it, then move to your workspace if approved. Drop-in replacement for git clone.

bash
sigil clone <repo-url> [directory] [flags]

# Examples
sigil clone https://github.com/user/repo
sigil clone git@github.com:user/repo.git my-folder
sigil clone https://github.com/user/repo --auto-approve=low

sigil pip

Install a Python package into quarantine, scan it, then install to your environment if approved. Drop-in replacement for pip install.

bash
sigil pip <package> [flags]

# Examples
sigil pip requests
sigil pip flask==3.0.0
sigil pip -r requirements.txt

sigil npm

Install an npm package into quarantine, scan it, then install to your project if approved. Drop-in replacement for npm install.

bash
sigil npm <package> [flags]

# Examples
sigil npm express
sigil npm lodash@4.17.21
sigil npm --save-dev typescript

sigil scan

Scan a package, directory, or URL. Runs all six analysis phases and outputs a verdict with a risk score.

bash
sigil scan <target> [flags]

# Examples
sigil scan npm:express
sigil scan pypi:requests
sigil scan ./local-directory
sigil scan https://github.com/user/repo

sigil fetch

Download a URL into quarantine, scan it, then move to your workspace if approved. Works with tarballs, zip archives, and raw files.

bash
sigil fetch <url> [flags]

# Examples
sigil fetch https://example.com/package.tar.gz
sigil fetch https://example.com/script.sh

Quarantine management

sigil list

List all items currently in quarantine. Shows the scan verdict, score, and timestamp for each item.

bash
sigil list

# Example output:
#   ID       TARGET              SCORE  VERDICT      DATE
#   q_01a..  npm:express@4.18.2  0      LOW RISK     2025-01-15
#   q_02b..  pypi:requests       3      LOW RISK     2025-01-15
#   q_03c..  github.com/u/repo   27     HIGH RISK    2025-01-14

sigil approve

Approve a quarantined item, moving it from the quarantine directory to the approved directory. The package is then available for use.

bash
sigil approve <id>

# Example
sigil approve q_01a

sigil reject

Reject a quarantined item, permanently removing it from the quarantine directory. The package is deleted and never installed.

bash
sigil reject <id>

# Example
sigil reject q_03c

Account commands

sigil login

Authenticate with the Sigil cloud API. Required for Pro and Team features including cloud threat intelligence and the web dashboard.

bash
# Interactive login (opens browser)
sigil login

# Non-interactive login (for CI/CD)
sigil login --email user@example.com --password
FlagDescription
--emailEmail address for non-interactive login
--passwordPrompt for password on stdin (never passed as argument)

sigil logout

Clear the stored authentication token. Reverts the CLI to open-source mode.

bash
sigil logout

Scan phases

Every scan runs six analysis phases. Each phase has a weight multiplier that determines how much findings contribute to the total risk score.

#PhaseWeightWhat it scans
1Install Hooks10xsetup.py cmdclass, npm postinstall, Makefile targets
2Code Patterns5xeval(), exec(), pickle.loads, child_process, subprocess shell=True
3Network / Exfil3xrequests.post, fetch(), axios, WebSockets, ngrok, Discord/Telegram webhooks
4Credentials2xos.environ, .aws/credentials, SSH keys, API key patterns
5Obfuscation5xbase64.b64decode, atob(), String.fromCharCode, hex escapes
6Provenance1-3xGit history depth, binary files, hidden dotfiles, large files
7Prompt Injection5xHidden instructions in comments, docstrings, markdown, and config files targeting AI agents
8AI Skill Security10xMalicious AI skills, MCP servers, suspicious permissions, and publisher reputation signals

Supplementary checks

In addition to the eight core phases, Sigil integrates with external scanners when available on your system:

  • semgrep — advanced multi-language pattern matching
  • bandit — Python-specific security linting
  • trufflehog — deep secret detection across git history
  • safety — Python CVE scanning
  • npm audit — JS dependency vulnerability scanning
  • Dependency analysis — transitive dependency tree inspection
  • Permission / scope analysis — file system and network permission checks

Verdicts and scoring

Each scan produces a numeric risk score and a corresponding verdict. The score is the weighted sum of all findings across the six phases.

ScoreVerdictMeaningRecommended action
0–9LOW RISKNo known malicious patterns detectedAuto-approve eligible
10–24MEDIUM RISKMultiple findingsManual review
25–49HIGH RISKSignificant suspicious patternsDo not approve without thorough review
50+CRITICAL RISKMultiple strong indicators of malicious intentReject and report

Exit codes

Exit codes map directly to verdict severity, making it straightforward to gate CI/CD pipelines on scan results.

CodeMeaning
0LOW RISK — score 0–9, or command completed successfully
1CRITICAL RISK — score 50+, or command error
2HIGH — score 25–49
3MEDIUM — score 10–24
4LOW — score 1–9
CI/CD usage
Use the exit code to gate deployments. Exit codes 1 and 2 indicate high-severity findings that should block a pipeline.
bash
# Block on HIGH or CRITICAL findings
sigil scan ./project
if [ $? -ge 2 ]; then echo "High-risk findings"; exit 1; fi

Environment variables

Override default paths and behavior with environment variables. Useful for CI/CD pipelines and custom directory structures.

VariableDefaultDescription
SIGIL_QUARANTINE_DIR~/.sigil/quarantineQuarantine directory
SIGIL_APPROVED_DIR~/.sigil/approvedApproved packages directory
SIGIL_LOG_DIR~/.sigil/logsScan logs directory
SIGIL_REPORT_DIR~/.sigil/reportsScan reports directory
SIGIL_CONFIG~/.sigil/configConfig file path
SIGIL_TOKEN~/.sigil/tokenAuthentication token path
SIGIL_API_URLhttps://api.sigil.nomark.devCloud API URL

File types scanned

Sigil scans the following file extensions by default. Files outside this list are ignored during analysis.

.py.js.mjs.ts.tsx.jsx.sh.yaml.yml.json.toml

External scanner integration

Sigil automatically detects and integrates with these external scanners when they are available on your system. Install any of them to enrich your scan results.

ScannerInstallDescription
semgreppip install semgrepAdvanced multi-language pattern matching
banditpip install banditPython-specific security linting
trufflehogbrew install trufflehogDeep secret detection across git history
safetypip install safetyPython CVE scanning
npm auditBundled with npmJS dependency vulnerability scanning
Optional, not required
External scanners are optional. Sigil's eight core phases run without any external dependencies. External scanners add depth to the analysis but are not required for a complete scan.

Need help?

Ask a question in GitHub Discussions or check the troubleshooting guide.