CLI Reference
Complete command-line interface documentation for rnsec.
rnsec scan Command
bash
rnsec scan [options]Run security scan on your React Native or Expo project.
| Flag | Description | Default |
|---|---|---|
-p, --path | Project directory to scan | . (current directory) |
--html | Custom HTML report filename | rnsec-report.html |
--output | Custom JSON report filename | rnsec-report.json |
--json | Output JSON to console only (no files) | false |
--silent | Suppress console output | false |
-h, --help | Show help information | - |
Examples
bash
# Scan current directory with default reports
rnsec scan
# Scan specific project
rnsec scan --path /Users/dev/my-react-native-app
# Custom filenames for both reports
rnsec scan --html my-report.html --output data.json
# CI/CD mode (silent, JSON only)
rnsec scan --output security-results.json --silent
# Console JSON output only (no files)
rnsec scan --jsonExit Codes
0Success
Scan completed successfully with no HIGH severity issues
1Failure
HIGH severity vulnerabilities detected (fails CI/CD pipeline)
Need Help?
Run any command with --help for detailed usage information.
rnsec scan --help© 2025 rnsec • Open source security