Configuration
Customize rnsec's scanning behavior with configuration files.
Configuration File
Create a .rnsec.jsonc or .rnsec.json file in your project root to customize scanning behavior.
{
"ignoredRules": [
"ASYNCSTORAGE_SENSITIVE_KEY",
"LOGGING_SENSITIVE_DATA"
],
"npmVulnerabilityScanning": {
"enabled": true,
"dataSource": "npm-audit",
"excludeDevDependencies": false
}
}Ignoring Rules
Suppress specific security rules by adding their IDs to the ignoredRules array.
Finding Rule IDs
To find the rule ID for a specific finding, check the ruleId field in the JSON output or HTML report.
NPM Vulnerability Scanner
rnsec includes comprehensive npm vulnerability scanning to detect vulnerable and deprecated packages in your dependencies.
Configuration Options
enabled- Enable/disable npm scanning (default: true)dataSource- Use "npm-audit" (real-time) or "hardcoded" (offline) (default: "npm-audit")excludeDevDependencies- Skip devDependencies (default: false)Detection Capabilities
Vulnerable Packages (via npm audit)
Deprecated Packages
NPM Badge in Reports
All npm-related findings are tagged with a red NPM badge in HTML reports for instant recognition and filtering.
Default File Patterns
rnsec automatically discovers and scans these file types:
Included Files
**/*.{js,jsx,ts,tsx}- JavaScript/TypeScript source files**/*.json- Configuration files**/*.xml- Android manifests**/*.plist- iOS property lists**/.env*- Environment filesExcluded Directories
**/node_modules/****/.git/****/dist/****/build/****/*.min.js**/__tests__/****/android/app/build/****/ios/build/**Technology Stack
@babel/parserJavaScript/TypeScript AST parsing
@babel/traverseAST traversal and analysis
fast-globFast file discovery
commanderCLI framework
chalkTerminal colors
oraLoading spinners
Custom Exclusions
Need to exclude specific patterns? Use --path to scan specific directories, or report feature requests on GitHub.