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, 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

Quick start

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

Download masaudit.pyz from the latest release. On Windows, run py masaudit.pyz . instead. 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.

See it on a real app

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

$ masaudit examples/acme-wallet --app-type news
Profile:   content (News, video, music, reading, or learning); MAS-L1+P; from --app-type

Fix before release: 9   Fix soon: 12   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 12 9
Fix soon 27 12
Not needed for your app 0 18: pinning, root and debugger detection, App Attest, Play Integrity, screenshot blocking, … each with the reason
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

172 rules: 66 Android, 42 iOS, 42 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 132 OWASP MASTG tests.

  • Network: cleartext, ATS exceptions, user CAs, TLS bypasses, old TLS versions, gRPC plaintext, and pinning where the app type needs it.
  • Storage: tokens in plain preferences or UserDefaults, Keychain classes, backups and device transfer, shared and world-readable files.
  • Crypto: hardcoded keys, ECB, CBC without a MAC, fixed IVs and salts, broken ciphers, small keys, weak PBKDF2.
  • Platform: exported components, intent redirection, deep links, FileProvider, Dirty Stream, Zip Slip, WebView risks, 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.

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.4.2
  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.
  • Fast on large code bases: the largest app, DuckDuckGo for Android (about 10,000 files), scans in under 6 seconds on a laptop, with no crashes on any of the 19.

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 + 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.4.2

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.4.2
File Size Uploaded Provenance
masaudit-0.4.2.tar.gz 353.5 kB With provenance Details

Built distribution (wheel)

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

Total release size: 684.7 kB

Release files / masaudit-0.4.2.tar.gz

Download URL masaudit-0.4.2.tar.gz
Size 353.5 kB
Tags Source
SHA-256 checksum
How to use checksums
28f61a422c50ad960053f9bb5d0a3e180a82d2cbe6d07a57383023f4fb616a50
BLAKE2b-256 checksum
How to use checksums
0ba033e9808854732f2b5ccb9e7fc7888f340523724680728eb2958e190f7191
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 24, 2026.

Transparency log

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

Download URL masaudit-0.4.2-py3-none-any.whl
Size 331.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba9f0c90568dcd752cb19654c429517862a59c1833b7250cc8c4a0959911be4c
BLAKE2b-256 checksum
How to use checksums
d9134ba5f0b55bef0abdf990bf0ebe00e7943fe76306638c2d984c0a667f91cf
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 24, 2026.

Transparency log

Security for masaudit 0.4.2

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for masaudit-0.4.2.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 24, 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