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.

FlagDescriptionDefault
-p, --pathProject directory to scan. (current directory)
--htmlCustom HTML report filenamernsec-report.html
--outputCustom JSON report filenamernsec-report.json
--jsonOutput JSON to console only (no files)false
--silentSuppress console outputfalse
-h, --helpShow 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 --json

Exit Codes

0

Success

Scan completed successfully with no HIGH severity issues

1

Failure

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