CodescanBot — AI Security Assistant
CodescanBot is an AI security engineer built directly into the scanner. It has full context on every vulnerability you've scanned — CVE data, CVSS scores, EPSS exploit probability, CISA KEV status — and can explain, prioritise, and apply fixes directly to your files, both in the web scanner and on your local filesystem via the CLI.
Knows the exact vulnerability, file, line, CVE IDs, CVSS score, and exploit maturity. Answers are specific to your code — not generic advice.
Calls the AI fix engine directly when you ask. The patched file updates in the scanner instantly — no copy-paste required.
Explains exactly how an attacker would exploit the vulnerability and what the real-world blast radius is.
Writes a failing test that proves the bug exists and a passing test that proves the fix works, in your language's test framework.
Opening CodescanBot
- Click the ◈ CodescanBot button in the scanner header
- Press Ctrl + K anywhere in the scanner
- Click ◈ Ask CodescanBot for plan in the risk widget
- Click any quick-action chip (Why dangerous?, Show the fix, etc.) in the vulnerability detail panel
Context — what the bot knows
When you select a vulnerability, CodescanBot automatically receives:
Quick Actions
When a vulnerability is selected, the bot panel shows five quick-action chips:
| Action | What it does |
|---|---|
| ⚡ Apply fix | Triggers the AI fix engine. The bot applies the patch to your file in the scanner immediately — no button clicks needed. Appears only when file content is loaded. |
| Why dangerous? | Explains the attack scenario — what an attacker can do with this vulnerability and the real-world blast radius. |
| Show the fix | Displays BEFORE and AFTER code with an explanation of every change made. Use this to review before applying. |
| How urgent? | Synthesises CVSS, EPSS, and CISA KEV status into a concrete prioritisation recommendation. |
| OWASP context | Maps the finding to the OWASP Top 10, explains what the category means, and gives OWASP's recommended remediations. |
How auto-fix works in the web UI
When you ask CodescanBot to apply a fix (or click ⚡ Apply fix), the following happens automatically:
Applying fixes to your local filesystem — CLI
To let the AI fix engine write patches directly to your codebase (not just in the web UI), use the CLI. No configuration beyond logging in is required.
Step 1 — Install the CLI
npm install -g codescan-flowlogStep 2 — Log in
codescan login
# Enter your codesscan.com email and password
# Session saved to ~/.codescan/config.jsonStep 3 — Fix a single file
Scans the file, generates AI patches for all auto-fixable vulnerabilities, and writes the fixed version. The original is overwritten by default.
codescan fix ./src/auth.ts
# To review before overwriting:
codescan fix ./src/auth.ts --output ./src/auth.fixed.ts
diff ./src/auth.ts ./src/auth.fixed.tsStep 4 — Fix an entire directory automatically
The autofix command is the CLI equivalent of CodescanBot — it scans every file in a directory, generates patches for all findings above the severity threshold, and writes them back to disk with no manual steps.
# Scan and fix all high+ findings
codescan autofix --dir ./src
# Only critical
codescan autofix --dir ./src --severity critical
# Dry run first — see what would change without writing
codescan autofix --dir ./src --dry-run
# Apply after reviewing the dry run
codescan autofix --dir ./srcTypical workflow
# 1. Dry run to review
codescan autofix --dir ./src --dry-run
# 2. Apply fixes
codescan autofix --dir ./src
# 3. Review the diff
git diff
# 4. Run your test suite
npm test
# 5. Commit
git add -A && git commit -m "fix: apply CodescanBot security patches"Example conversation
Plan requirements
| Feature | Plan required |
|---|---|
| CodescanBot chat (ask questions, explain vulnerabilities) | Free |
| Bot auto-fix in web UI (⚡ Apply fix) | Starter |
| CLI codescan fix (single file) | Starter |
| CLI codescan autofix (batch, writes to disk) | Starter |
| AI security test generation | Starter |
| CVE / CVSS / EPSS / CISA KEV enrichment in chat | Starter / Pro |