Skip to main content

masaudit

A free mobile security scanner that scales its advice to your app's risk.

ci OpenSSF Scorecard OpenSSF Best Practices PyPI License: Apache-2.0

masaudit reads the source code of your Android, iOS, React Native, Kotlin Multiplatform, or Flutter app, and finds security weaknesses before you ship. It first asks what kind of app you're building, then sorts every finding into fix before release, fix soon, or not needed for your app, and says why. masaudit tells a banking app to pin certificates, and never tells a news app to.

masaudit needs no AI, no account, and no network connection after the first download.

Documentation · Getting started · Rules

masaudit asks what kind of app it is, then shows the top fixes; the same app as a news app gets fewer findings and 18 marked Not needed

Quick start

Use masaudit on its own, or with an AI assistant. The scan, the report, and every fix work without AI.

Without AI With an AI assistant (optional)
Start Run one command, below Install the masaudit plugin or skill in your assistant
You get SECURITY-AUDIT.md: what to fix, why, how, and how to verify The same report, plus the assistant confirms each finding in your code and fixes them with you
Guide Getting started Use masaudit with an AI assistant

Without AI

You need Python 3.9 or later. In your project's root folder, run one of these:

uvx masaudit .                       # if you have uv: https://docs.astral.sh/uv/
pipx run masaudit .                  # if you have pipx: https://pipx.pypa.io/
python3 ~/Downloads/masaudit.pyz .   # no installer: one file, works offline

For the last line, first download masaudit.pyz from the latest release to your Downloads folder. On Windows, run py $HOME\Downloads\masaudit.pyz . in PowerShell. Install and upgrade lists every way to run it.

masaudit asks one question, "What kind of app is this?", reads your project without running it, and writes SECURITY-AUDIT.md with the top fixes first. Getting started walks you through your first fix.

With an AI assistant

In Claude Code:

/plugin marketplace add hossam9k/masaudit
/plugin install masaudit@masaudit
/masaudit:scan

Codex, GitHub Copilot, Cursor, Gemini CLI, and other Agent Skills tools can use the same skill, and any chat assistant can use the report's fix plan. See Use masaudit with an AI assistant.

See it on a real app

The repository ships a deliberately insecure demo app, Acme Wallet. Scanned as a news app, the terminal shows (trimmed):

$ uvx masaudit examples/acme-wallet --app-type news
Profile:   content (News, video, music, reading, or learning); MAS-L1+P; from --app-type
Clue:      Found a payment SDK (Stripe) in android/app/build.gradle.kts - ecommerce may fit

Fix before release: 8   Fix soon: 12
Check by hand: 1   Hardening: 0   Notes: 0   Not needed: 18   Accepted: 0

Top fixes:
  1. [critical] Release build is debuggable (AND-002) - android/app/build.gradle.kts:17
  2. [critical] WebView ignores TLS certificate errors (AND-004) - .../WalletApi.kt:40
  3. [critical] pull_request_target workflow checks out the pull request's code (CI-003) - ...

The same code gets different advice under each app type:

As a banking app As a news app
Fix before release 10 8
Fix soon 12 12
Check by hand (rules that often misread code) 3 1
Hardening checklist (pinning, root and debugger detection, App Attest, Play Integrity, screenshot blocking, …) 14 0
Not needed for your app 0 18: the same protections, each with the reason a news app can skip it
Full report banking report news report

Each finding tells you why it matters, how to fix it (often with paste-ready code), how to verify the fix, how long it takes, its OWASP IDs, and the section of a free book that explains it.

What it checks

207 rules: 70 Android, 47 iOS, 20 React Native, 48 cross-platform code, 8 Flutter, 8 CI and supply chain, 6 Kotlin Multiplatform. Together they cover 52 of the 78 weaknesses in OWASP's MASWE catalog and cite 140 OWASP MASTG tests.

  • Network: cleartext (including raw sockets and old targetSdk defaults), ATS exceptions, user CAs, TLS bypasses, missing host-name checks, old TLS versions, gRPC plaintext, and pinning where the app type needs it.
  • Storage: tokens in plain preferences, UserDefaults, files, and databases, Keychain classes, backups and device transfer, shared and world-readable files, keyboard caching of sensitive fields.
  • Crypto: hardcoded keys and credential checks, ECB, CBC without a MAC, fixed IVs and salts, broken ciphers, small keys, weak PBKDF2, tokens from the clock.
  • Platform: exported components, intent redirection, deep links, FileProvider, Dirty Stream, Zip Slip, SQL and HTML injection, WebView risks, native buffer overflows, screenshot and overlay protection.
  • Auth: biometrics not bound to a key, passcode fallback for sensitive actions, keys that survive new enrollments.
  • Privacy: sensitive permissions, hardware identifiers, IDFA without App Tracking Transparency, privacy manifests, tracking domains.
  • Build and CI: debuggable releases, debug tools in release, R8 keep rules, unpinned actions, persisted tokens, script injection, committed signing keys.
  • Resilience, for banking, identity, loyalty, and game apps: Play Integrity, App Attest, and root, debugger, emulator, and hooking detection.
  • React Native and Expo: tokens in AsyncStorage or unencrypted MMKV, secrets bundled through .env or EXPO_PUBLIC_ variables, WebView file access and open origins, deep-link data reaching openURL or a WebView, eval, unsigned over-the-air updates, Hermes turned off, source maps and console output in release builds, and Expo config in app.json. The JavaScript and TypeScript are read along with the native android/ and ios/ folders, and a managed Expo app with no native folders gets the Android and iOS checks from its config.

Guides by task

You want to Read
Scan on your own machine and fix findings Getting started, then Read and fix the report
Pick the right app type Choose your app type
Scan every pull request Use masaudit in CI
Have an AI assistant confirm and fix findings Use masaudit with an AI assistant
Share settings, suppress findings, adopt it in an older app Use masaudit in a team

In GitHub Actions, the step looks like this; the CI guide has the complete workflow:

- uses: hossam9k/masaudit@<commit-sha> # v0.7.1
  with:
    app-type: banking
    fail-on: high

How accurate it is

The rules were measured on 19 open-source apps, including Signal, Bitwarden, Wikipedia, Nextcloud, DuckDuckGo, and Thunderbird. Reviewers who didn't write the rules opened every finding in shipping code (CI findings were sampled). The maintainers fixed every false alarm, added a test for it, and scanned the apps again.

  • 79 rules fired on these apps; 78 are at 90% precision or better. The one below, IOS-012 (89%), is marked Check by hand. Rules that found nothing there are checked by their test fixtures.

  • React Native, measured on 10 more apps (Mattermost, Rocket.Chat, Bluesky, Expensify, BlueWallet, MetaMask, and others): 57 of the 63 findings that 0.6.0 adds are real (90%). Four rules under 90% there are marked Check by hand.

  • Finds 126 of 133 planted weaknesses in OWASP's MASTG demos, DIVA, InsecureBankv2, and DVIA-v2 that a source scanner can see (95%), and 21 of 28 in three deliberately vulnerable React Native apps (75%). The rules were tuned on these apps, so expect less on unseen code; the misses and the method are published.

  • Fast on large code bases: the largest app, DuckDuckGo for Android (about 10,000 files), scans in about 5 seconds on a laptop, with no crashes on any of the 19.

  • On apps no rule was tuned on, expect much more noise. On 16 new apps, 29% (19–40%) of the sampled app-code findings in 0.7.0's fix lists were false alarms (33% for 0.6.5), against 1 in 10 on the tuned corpus. Missing protections go to a Hardening checklist and the rules most often wrong to Check by hand, which don't fail --fail-on; 1 of the 30 sampled there was a real vulnerability. Counting every bucket, 26% to 45% were false in five rounds on 87 apps. CI findings held up (1 of 30 false in the latest round). mobsfscan, rnsec, and Semgrep's free rules did worse on the same apps. AI reviewers judged every sample: Benchmark on unseen apps.

Method and per-rule numbers: Accuracy and speed.

Limits and safety

  • What it can't see: your server, runtime behavior, and business logic, which is where many breaches happen. Every report has a Residual risk section for that reason.
  • Safe to run on any code: masaudit never builds or runs your code, makes no network calls (a test enforces it), sends no telemetry, and masks secrets in every output. Crafted files can't stall it.

How masaudit works explains both. To report a vulnerability, see SECURITY.md.

How it compares

masaudit MobSF mobsfscan Android Lint
Advice scaled to the app's risk Yes No No No
"Not needed for your app", with reasons Yes No No No
Plain-language why, fix, and verify per finding Yes Partly Partly Partly
Android + iOS + React Native + KMP + Flutter + GitHub Actions Yes Android, iOS (binaries and source) Android, iOS (source) Android
Install Single file, no dependencies Docker (recommended) pip (Semgrep) Android SDK
Imports SARIF from Android Lint, mobsfscan, Semgrep, and zizmor, and sorts it by app type Yes — — —
Published precision on real apps Yes — — —

MobSF also analyzes built APK and IPA files and runs the app for dynamic testing, which masaudit doesn't. Use both.

Documentation

The documentation home has every guide, the command-line and config file reference, and how masaudit works.

Contributing

False-positive reports are the most valuable contribution: a rule that raises false alarms gets ignored. Use the false-positive form. Adding a rule takes about 30 minutes; see CONTRIBUTING.md.

About

Built by Hossam Atef, a mobile engineer (Android, iOS, Kotlin Multiplatform), as the practical companion to his free book, Mobile Application Security: A Study Book for Engineers. Every rule traces to a section of the book, and the book records how each claim was verified.

The name is MAS + audit: it audits your app against OWASP MAS (Mobile Application Security), the standards behind its checks. masaudit is not an OWASP project; OWASP doesn't certify apps or endorse tools.

Licensing: code Apache-2.0, fix snippets MIT-0, explanations CC BY-SA 4.0. See LICENSING.md.

masaudit is free. If it saved you an audit, you can sponsor it.

Metadata

Release files for masaudit 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for masaudit 0.7.1
File Size Uploaded Provenance Actions
masaudit-0.7.1.tar.gz 496.0 kB With provenance Details for masaudit-0.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for masaudit 0.7.1
File Interpreter ABI Platform Actions
masaudit-0.7.1-py3-none-any.whl Python 3 none any Details for masaudit-0.7.1-py3-none-any.whl

Total release size: 1.0 MB

Release files / masaudit-0.7.1.tar.gz

Download URL masaudit-0.7.1.tar.gz
Size 496.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f48f2fb1c51a56f717a930d8afa3475aff2bd8782d74c068fd7b372daba74f43
BLAKE2b-256 checksum
How to use checksums
641fed1cab4a0d9f0e02abb44d7aae39b75d675a259754bf15246c531b069003
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / masaudit-0.7.1-py3-none-any.whl

Download URL masaudit-0.7.1-py3-none-any.whl
Size 531.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
683dcbf20b5ef42e40b840556c77f52ec2c20ce80c4e92445c2a8a13326d4819
BLAKE2b-256 checksum
How to use checksums
1dd247bb178a580fc851a768c686626207eeeda13eeee2cf2540e7c61637e803
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for masaudit 0.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for masaudit-0.7.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page