# rnsec gives React Native reviews a local source scan

> rnsec checks React Native and Expo project files with mobile-focused rules. The files selected for a scan determine what its report can tell a reviewer.

**adnxy/rnsec** — Lightweight & Fast Security Scanner for React Native & Expo

- Repository: https://github.com/adnxy/rnsec
- Website: https://www.rnsec.dev
- Stars: 502 · Forks: 27
- Language: TypeScript
- License: MIT
- Published: 2026-11-24 · Updated: 2026-11-24 · Language: en
- Canonical page: https://hysenlabs.com/projects/adnxy-rnsec

## A mobile source review before the build

A React Native application can carry security decisions in JavaScript, platform configuration and dependency metadata. A reviewer looking only at a screen component can miss the configuration under which it runs. rnsec gives a reviewer a single local entry point for inspecting several of these surfaces. The v1.1.0 CLI registers rule groups for storage, networking, WebViews, secrets and platform configuration among others. Its audience is a developer who has the application checkout and wants specific findings to inspect before handing the change to a release or security reviewer.

The useful unit of work is a finding that can be traced back to the application. For instance, a developer investigating a WebView finding can open the relevant component and inspect the inputs it actually receives. The scanner provides a reason to review the code. The application supplies the context needed to decide whether the reported pattern is acceptable in that particular component.

## What the scan command hands to the rules

The package declares a CLI executable at dist/index.js. Its source entry point imports the CLI module, which resolves the target path and registers rules before delegating to the scanning engine. The CLI can run the engine against the project or hand it an explicit list of changed files. It collects findings and a scanned file count, then passes the result to its report output. This distinction between selecting files and applying rules matters when a review covers only a pull request.

Read failures can reduce coverage. The CLI checks for skipped files and emits a warning in ordinary output when it detects them. A reviewer using a report for a release decision should check that the source tree was present and readable. That question is especially relevant when a CI checkout differs from the workstation checkout or generates some platform files later in the build.

## Generate a report from an app checkout

The tagged README documents the following npm installation command. It installs the package globally so the rnsec executable is available to the shell. The command leaves version selection to npm. The implementation described here comes from the repository's v1.1.0 tag.

```bash
npm install -g rnsec
```

From the root of your React Native or Expo checkout, run the documented scan command. The CLI uses the current directory as the default target. In its normal file output mode, the tagged implementation assigns default filenames to HTML and JSON reports.

```bash
rnsec scan
```

The README identifies rnsec-report.html as the file to open for a first inspection. Start by checking the finding location against the checkout and reading the relevant source around it. For a machine consumer, the README documents console JSON output. The corresponding CLI branch suppresses the HTML and JSON report files in that mode, so a caller that wants the console result should capture standard output.

```bash
rnsec scan --json
```

## Changed files narrow the evidence

The changed files option accepts a Git reference. In the tagged CLI, the presence of that option selects the changed file branch of the scan. An empty changed file list produces a result with zero scanned files. This makes the comparison reference part of the evidence for a passing review. A checkout that yields an empty list has a different meaning from a checkout where the engine actually checked a set of modified files and returned no findings.

A rule pass over changed files also leaves untouched application files outside that pass. Use the wider project scan when establishing a baseline for an existing codebase. Both modes inspect source and configuration available to the engine. Judging the behavior of a signed build on a device requires evidence from that build, including any configuration assembled later in the release process.

## Where secret history needs a separate scan

The Gitleaks README describes scanning current and past code for secrets. That is a distinct job for a team investigating whether a credential was committed before it was removed from the current tree. rnsec's project scan and changed file selection are oriented around paths the engine receives for the present review. Its mobile rule groups are useful when the question is whether application source contains a risky pattern tied to the mobile stack. Choose the scope based on whether the review is about the current app or exposure in earlier Git history. The Gitleaks usage documentation is available at https://github.com/gitleaks/gitleaks.

## Version evidence for a pull request check

The tagged package metadata identifies version 1.1.0 and declares the MIT license. The license file requires retention of the copyright and permission notices in copies or substantial portions. The repository's last push was on 2026-04-19. In the tagged package manifest the npm test script prints a placeholder and exits successfully. That script offers little assurance for someone adopting the release as a blocking build check.

Build owners can inspect the tagged CLI's exit handling and confirm it on their own repository before depending on a failure to block a merge. Keep the report alongside the job result so reviewers can see what was scanned and investigate findings. The tagged README, license and CLI are accessible under https://github.com/adnxy/rnsec/tree/v1.1.0.

## Conclusion

React Native and Expo teams can use rnsec to put source findings in front of a reviewer. Teams evaluating signed binaries need a review of the built app. Begin with a full scan of a representative checkout and check its scanned file count before using changed-file results to gate pull requests.

## FAQ

### Can rnsec scan a directory other than the current one?

Yes. The scan command accepts a target directory through its path option.

### Can rnsec produce JSON without writing a report file?

Yes. The JSON console option selects console output and suppresses the report files.

### What license does rnsec v1.1.0 use?

The tagged package declares MIT, and the repository includes the MIT license text.

## Sources

- [adnxy/rnsec on GitHub](https://github.com/adnxy/rnsec)
- [License: MIT](https://github.com/adnxy/rnsec/blob/main/LICENSE)
- [Project website](https://www.rnsec.dev)
- [README](https://github.com/adnxy/rnsec/blob/main/README.md)
- [Releases](https://github.com/adnxy/rnsec/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/adnxy-rnsec
