Local-first, developer-first code security scanner for your own repositories. CodeSentry runs on your machine, audits source code and dependencies, and presents findings in a fast TUI with remediation detail and diff view — without sending code to the cloud.
- Local-first by default. Your code never leaves your machine unless you opt in.
- Actionable results with clear remediation guidance and diff previews.
- CI-ready with SARIF support for GitHub code scanning.
- Extensible via rule packs and a Python enrichment plugin.
- TUI-first UX: findings list, details, remediation diff, warnings panel
- OWASP-aligned rules (SQLi, XSS, SSRF, command injection, weak crypto, etc.)
- Secrets engine with confidence scoring (AWS/GitHub/Stripe/Slack/Google/private keys)
- Dependency inventory + optional OSV scan
- Markdown, JSON, SARIF reports
- Diff-aware scanning for PRs (
--changed) - Rule marketplace support (drop YAML packs into
rules/)
Live TUI scan with findings, details, and remediation diff.
CodeSentry TUI showing findings, details, and remediation diff panel.
local-first security scanner, open-source SAST, code security audit, AI code review, OWASP Top 10 scanner, GitHub Actions security, SARIF code scanning, dependency vulnerability scan, CLI security tool, TUI security dashboard, static analysis for developers
codesentry, appsec, sast, owasp, owasp-top-10, security, secure-coding, code-security, static-analysis, devsecops, github-actions, sarif, dependency-scanning, cli, tui, local-first
git clone https://github.com/Ritiksuman07/codesentry
cd codesentry
go build ./cmd/codesentryOr install via Go:
go install github.com/Ritiksuman07/codesentry/cmd/codesentry@latestCodeSentry opens a beautiful TUI by default:
codesentry --path C:\Users\YourName\Projects\my-appShorthand alias:
codesentry -sc C:\Users\YourName\Projects\my-appcodesentry scan --path C:\Users\YourName\Projects\my-app --format markdownOutputs codesentry-report.md by default.
codesentry --path .Homebrew:
brew install ritiksuman07/tap/codesentryPrebuilt binaries:
- Download from GitHub Releases and put the binary on your PATH.
One-command install:
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/Ritiksuman07/codesentry/main/scripts/install.sh | shWindows (PowerShell):
iwr https://raw.githubusercontent.com/Ritiksuman07/codesentry/main/scripts/install.ps1 -UseBasicParsing | iexCreate a codesentry.yml in your repo root (a starter file is included):
scan:
ignore_paths:
- .git
- node_modules
- vendor
- dist
- build
- .github
- docs
exclude_extensions:
- .md
- .yml
- .yaml
max_findings: 200
rules:
dir: rules
enabled:
SEC-001: true
SEC-002: true
SEC-003: true
SEC-004: true
SEC-005: true
SEC-006: true
SEC-007: true
SEC-008: true
SEC-009: true
SEC-010: true
severity:
SEC-003: MEDIUM
threshold:
severity: HIGH
dependencies:
enable: true
osv:
enable: false
timeout_seconds: 10
analysis:
python:
enable: false
command: "python plugins/python_analysis/runner.py"
secrets:
min_confidence: 0.6CLI flags override config:
codesentry scan --path . --format sarif --out codesentry-report.sarif --fail-on HIGH --osvDiff-aware scan (PR-friendly):
codesentry --changed --base origin/mainDrop YAML rule packs into rules/ to extend CodeSentry without code changes. A sample pack is provided at rules/marketplace.yml.
.github/workflows/codesentry.ymlruns scans and uploads SARIF on push..github/workflows/codesentry-pr-comment.ymlposts a PR summary comment.
- Markdown for humans
- JSON for automation
- SARIF for GitHub code scanning
The optional plugin lives in plugins/python_analysis/. It enriches findings and emits a python_analysis payload when enabled.
- AST-backed analysis (tree-sitter) beyond secrets
- Richer taint tracking
- Full OWASP Top 10 coverage
- PR comment bot enhancements (diff-aware comments)
- Python analysis plugin execution + enrichment UI
- Rule pack registry + community marketplace
- Baseline/ignore workflow (accept-risk with justification)
- SBOM export (CycloneDX) + dependency policy gates
- Multi-repo scanning + caching for monorepos
- IDE integrations (VS Code, JetBrains)
PRs are welcome. Please open an issue or start a discussion if you want to add rules or language support.
MIT
Hashtags: #CodeSentry #AppSec #SAST #OWASP #Security #SecureCoding #OpenSource #DevSecOps #GitHubActions #CLI #TUI
Note: Tree-sitter string extraction for secrets is enabled when CGO is available. Without CGO, CodeSentry falls back to regex-only detection.