Get Started
Tools
AI Tools
AI Code Scanner
🛡️ AI Code Scanner
Scan GitHub repositories for package vulnerabilities using native security tools combined with AI-powered analysis. Supports auto-fix with automatic PR creation.
Installation
Install the AI CLI globally:
npm install -g @nayan-ui/ai
Or use directly with npx:
npx @nayan-ui/ai scan <repo-url> --token ghp_xxx
Prerequisites
Codex CLI (default LLM) — login first:
npx @openai/codex login
Claude Code CLI (optional) — if using
--llm claude:claude login
Usage
Basic scan — detect and analyze all projects in the repo:
nayan-ai scan https://github.com/owner/repo --token ghp_xxx
Scan specific paths in the repo:
nayan-ai scan https://github.com/owner/repo --token ghp_xxx --paths packages/api,packages/web
Auto-fix vulnerabilities and create a PR:
nayan-ai scan https://github.com/owner/repo --token ghp_xxx --fix
Auto-fix with custom branch name:
nayan-ai scan https://github.com/owner/repo --token ghp_xxx --fix --branch nayan-ai/security-updates
Use Claude Code instead of Codex:
nayan-ai scan https://github.com/owner/repo --token ghp_xxx --llm claude
Options
| Option | Description |
|---|---|
| -t, --token | GitHub personal access token (required) |
| -l, --llm | LLM provider: codex (default) or claude |
| -p, --paths | Comma-separated list of paths to scan for projects |
| -f, --fix | Auto-fix vulnerabilities and create a PR |
| -b, --branch | Branch name for fix PR (default: nayan-ai/security-fixes-<timestamp>) |
Supported Project Types
| Type | Manifest | Native Scanner |
|---|---|---|
| npm | package.json | npm audit |
| Python | requirements.txt | pip-audit |
| Go | go.mod | govulncheck |
| Rust | Cargo.toml | cargo audit |
| Ruby | Gemfile | bundle audit |
| PHP | composer.json | composer audit |
| Java | pom.xml | mvn dependency-check |
| .NET | *.csproj | dotnet list --vulnerable |
Auto-Fix Workflow
When using
--fix, Nayan AI will:1. Analyze
Analyze vulnerabilities and generate fixes using AI
2. Create Branch
Create a new branch with the security fixes
3. Update Files
Update manifest files (package.json, requirements.txt, etc.)
4. Create PR
Commit, push, and create a Pull Request with detailed description