codesentinel-cli
v1.0.2
Published
Code Sentinel AST & AI Security Auditor CLI - Scan local repositories, SD cards, live URLs, and GitHub repos for security flaws and hardcoded secrets.
Maintainers
Readme
CodeSentinel-Cli JavaScript SDK & CLI
Official AST & AI Security Auditor for Node.js, Termux & Cloud CI — the zero-dependency security platform
Installation
Run instantly with NPX (no installation needed):
npx codesentinel-cli scanInstall globally on desktop, server, or Termux:
npm install -g codesentinel-cli
sentinel scanNote: This is a high-performance, zero-dependency security scanner. It runs natively in Node.js on local workspaces, Android Termux, Docker containers, and CI/CD pipelines without third-party npm package overhead.
Quickstart
1. Audit Current Workspace
sentinel scan2. Audit Mobile / Android SD Card Paths (Termux)
termux-setup-storage
sentinel scan /sdcard/Download/my-project3. Inspect Live Target Web App Security Headers
sentinel scan --url https://your-domain.com4. Audit Remote Public GitHub Repositories
sentinel scan --url github https://github.com/facebook/react5. Auto-Patch Hardcoded Secrets to process.env
sentinel fixCommand Reference & API
| Command | Description |
| :--- | :--- |
| sentinel scan [path] | Audit local workspace or custom directory path |
| sentinel scan --url <https://...> | Inspect live web app HTTP security headers & TLS |
| sentinel scan --url github <repo_url> | Remote security audit of public GitHub repository |
| sentinel secrets [path] | Execute deep credential, RSA, and token leak scanner |
| sentinel fix [path] | Auto-rewrite code, binding secrets to process.env |
| sentinel ai prompt <query> | Query embedded AI Security Assistant for threat modeling |
| sentinel help | Display terminal CLI usage manual |
Features & Detection Rules
- SEC-01: Exposed API Keys: Scans for
sk-*,AIzaSy*,AKIA*, and hardcoded cloud tokens. - SEC-02: Hardcoded JWT Signatures: Identifies unencrypted JWT secrets and session keys.
- SEC-03: Unsafe Code Execution: Detects dangerous usages of
eval()andnew Function(). - SEC-04: Async Promise Rejections: Catches unhandled promise rejections and missing catch blocks.
- HTTP Header Security Compliance: Audits
Content-Security-Policy,HSTS,X-Frame-Options, andX-Content-Type-Options.
Termux & Mobile Environment Setup
- Update Termux packages:
pkg update && pkg upgrade -y - Install Node.js and Git:
pkg install nodejs git -y - Grant storage permissions:
termux-setup-storage - Run Code Sentinel:
npx codesentinel-cli scan /sdcard/Download/my-project
Continuous Integration (CI/CD)
GitHub Actions Workflow (.github/workflows/security.yml)
name: Code Sentinel Security Audit
on: [push, pull_request]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npx codesentinel-cli scanGitLab CI/CD Configuration (.gitlab-ci.yml)
security_audit:
image: node:18-alpine
script:
- npx codesentinel-cli scanLicense
Distributed under the MIT License. Copyright (c) Code Sentinel Security Team. All rights reserved.
