Scan your whole stack
From OX Research Newsroom
Are you using mo3ta-coverage?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.4.4
mo3ta-coverage was last scanned on 29 Nov 2026 at version 1.4.4. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.4.4 LATEST | 29 Nov 2026 | No rules fired |
| 1.4.3 | 29 Nov 2026 | No rules fired |
| 1.4.2 | 29 Nov 2026 | No rules fired |
| 1.4.0 | 28 Nov 2026 | Not shown |
| 1.3.6 | 28 Nov 2026 | Not shown |
Findings for v1.4.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.4.4; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
mo3ta-coverage checks coverage for changed lines in a pull request. It finds changed source files, maps them to likely test files, runs Jest in a selected execution mode, and validates changed-line coverage against a threshold.
Project site: https://mo3ta.top/mo3ta-coverage/
https://github.com/user-attachments/assets/1139ca7a-69e6-4b41-ad24-ff20e083c4e0
A quick walkthrough of changed-file detection, related-test selection, and changed-line coverage.
--files / --filesFrom) to control what gets scannedfast, smart, and fullsmart mode to a configurable depth (default 2) with either the zero-dependency native engine (default) or the opt-in jest engine (Jest 29/30 HasteFS + DependencyResolver)--explain) and supports configurable fallback (--fallback native) when --engine jest cannot initializelcov.info and reports uncovered changed lines--dryRun lists the test files that would run (machine-readable, for other tools)mo3ta-coverage-action wraps the CLI as a reusable GitHub Action: it bundles the tool, runs it on Node 20, and appends the markdown coverage table to the job summary automatically.
It also auto-resolves what to diff against based on the triggering event,
so you usually don't set base at all:
| Event | Base used |
|---|---|
pull_request |
the PR's exact base commit |
push |
the previous commit (HEAD~1) |
| other (schedule, dispatch) | origin/main |
# .github/workflows/changed-line-coverage.yml
name: Changed-line coverage
on:
pull_request:
push:
branches: [main]
jobs:
changed-line-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history needed for the merge-base diff
- run: npm ci
- uses: MahmoudMabrok/mo3ta-coverage-action@v1
- uses: MahmoudMabrok/mo3ta-coverage-action@v1
with:
base: origin/develop # explicit base (overrides auto-resolution)
mode: smart # fast | smart (default) | full
depth: 2 # smart mode reverse-import depth
limit: 80 # minimum changed-line coverage, %
# ci: true # default; clean output + markdown table
# report-to-summary: true # default; append table to job summary
All inputs, and how to scope the run to specific files (files /
files-from), are documented in the
action README.
Input forwarding for --engine, --discoveryWorkers, --explain, and
--fallback is tracked separately in the
mo3ta-coverage-action
repository.
Install locally as a dev dependency (recommended for CI and team consistency) or globally:
# Local dev dependency
npm install --save-dev mo3ta-coverage
# Global install
npm install -g mo3ta-coverage
Or run directly with npx without installing globally:
npx mo3ta-coverage --mode smart --base origin/main --limit 80
Prefer an unreleased commit directly from GitHub?
# Global install from the default branch
npm install -g github:MahmoudMabrok/mo3ta-coverage
# Pin a release tag or commit SHA for reproducible installs
npm install -g github:MahmoudMabrok/mo3ta-coverage#v1.3.6
npm install -g github:MahmoudMabrok/mo3ta-coverage#<commit-sha>
To build and run from a local checkout instead:
git clone https://github.com/MahmoudMabrok/mo3ta-coverage.git
cd mo3ta-coverage
npm install
npm link # exposes the mo3ta-coverage binary globally
npx mo3ta-coverage --mode smart --base origin/main --limit 80
Or opt into the Jest discovery engine (--engine jest):
npx mo3ta-coverage --mode smart --engine jest --depth 2 --base origin/main --limit 80
Common ways to run mo3ta-coverage after installing from npm (npm install --save-dev mo3ta-coverage) or on demand via npx.
--dryRun true stops after test discovery and writes only the selected
test paths to stdout (one per line), so you can review them or hand them to
Jest directly — no coverage check, no extra runner:
# 1. Discover the tests that cover the changed files
npx mo3ta-coverage \
--dryRun true \
--mode smart \
--base origin/main > selected-tests.txt
# 2. Run exactly those files with Jest
npx jest $(cat selected-tests.txt)
Or pipe the list straight into Jest:
npx mo3ta-coverage --dryRun true --base origin/main \
| xargs npx jest
Diagnostics go to stderr, so the file/pipe contains paths only. See Dry Run for details.
Leave --dryRun off and the CLI does the whole job: select the tests, run
Jest, parse coverage/lcov.info, and fail when changed-line coverage is below
--limit:
npx mo3ta-coverage \
--mode smart \
--base origin/main \
--limit 80
smart follows reverse imports up to --depth (default 2), which catches
specs that reach the changed file through barrel files. See
Modes & Engines for fast, smart, and full, and
Jest Engine — Samples & Use Cases
for --engine jest.
--explain and --fallbackFor repos using custom Jest resolvers, moduleNameMapper, manual __mocks__,
React Native platform extensions, multi-project configs, or .snap snapshot
mapping, opt into --engine jest in smart mode:
npx mo3ta-coverage \
--mode smart \
--engine jest \
--depth 2 \
--discoveryWorkers 4 \
--explain true \
--fallback native \
--base origin/main \
--limit 80
| Option | Description | Default |
|---|---|---|
--base <branch> |
Base branch to compare against | origin/main |
--lcov <path> |
Path to lcov.info |
coverage/lcov.info |
--limit <percent> |
Minimum changed-line coverage percentage | 80 |
--showCovered [bool] |
Show covered changed lines in output | false |
--mode <mode> |
Execution mode: fast, smart, or full |
smart |
--depth <number> |
Max reverse-import depth used by smart (1 or 2 recommended) |
2 |
--engine <engine> |
Discovery engine for smart mode: native (default) or jest (opt-in) |
native |
--discoveryWorkers <number> |
Worker count for Jest HasteMap discovery (1–16, used by --engine jest) |
2 |
--explain [bool] |
Print dependency chain explanations from changed files to selected tests (--engine jest) |
false |
--fallback <policy> |
Fallback policy when --engine jest fails: error or native |
error |
--files <files...> |
Scan only these files instead of auto-detecting changed files (space- or comma-separated) | – |
--filesFrom <path> |
Read the file list to scan from a newline-separated file | – |
--jest <value> |
Extra Jest CLI flag passed through to the run, e.g. --maxWorkers=2. Repeatable or comma-separated |
– |
--filter <regex> |
Regex matched against the final list of selected spec files; only matching test files run. The full and filtered lists are both printed for validation | – |
--ci [bool] |
CI mode: emit results as a markdown table and save it to a file so CI can read it without parsing logs | false |
--ciReport <path> |
Where to save the CI markdown table | coverage/mo3ta-coverage-report.md |
--quiet [bool] |
Write Jest test execution output to coverage/mo3ta-coverage-tests.log instead of the terminal and print the log file path |
false |
--dryRun [bool] |
Print the test files that would run (one per line) and stop, without running Jest or the coverage check | false |
Boolean flags (
--showCovered,--ci,--explain,--quiet,--dryRun) can be passed bare (--ci) or with an explicit value (--ci true/--ci false).
Changed files are detected from git for all authors, not just the current git user. If you want to control exactly which files are scanned, pass them directly. The library still maps them to tests and checks changed-line coverage.
# Explicit list (space-separated)
mo3ta-coverage --files src/a.js src/b.ts --base origin/main
# Explicit list (comma-separated)
mo3ta-coverage --files src/a.js,src/b.ts --base origin/main
# From a file containing one path per line
git diff --name-only origin/main > changed.txt
mo3ta-coverage --filesFrom changed.txt --base origin/main
Explicitly provided files skip git changed-file detection. Their changed lines
are still computed against --base, so only lines that differ from the base
branch are counted toward coverage.
Use --jest to forward any Jest CLI flag to the underlying Jest run, for
example to control parallelism or silence output. Pass it once per flag, or
comma-separate several flags in one value:
# Limit Jest to 2 workers and run silently
mo3ta-coverage --base origin/main --jest --maxWorkers=2 --jest --silent
# Same thing, comma-separated
mo3ta-coverage --base origin/main --jest "--maxWorkers=2,--silent"
# A single flag that takes a value
mo3ta-coverage --base origin/main --jest --maxWorkers=50%
The flags are appended to the arguments mo3ta-coverage already passes
(--passWithNoTests, --coverageReporters=lcovonly, --coverage, and the
selected test files), so they are handled by Jest's own argument parser. Use
them for things like --maxWorkers, --silent, --ci, --bail,
--testTimeout, --coverageDirectory, or --coverageReporters (which
replaces the default lcovonly reporter when passed).
Jest flags that take a value work best in the = form (--maxWorkers=2). If a
flag's value is normally separated by a space, give each token its own --jest:
# Equivalent to: jest --maxWorkers 2
mo3ta-coverage --base origin/main --jest --maxWorkers --jest 2
To make flags the default for a repo, save them with the config subcommand:
mo3ta-coverage config --jest --maxWorkers=2 --jest --silent
# written to .mo3ta-coverage.json as "jest": ["--maxWorkers=2", "--silent"]
A --jest value on the command line overrides the saved list.
Pass --filter a regular expression. After the mode has selected the test
files that would run, only the ones that match the regex are executed
(everything else is skipped). The regex is matched against the full
repo-relative spec path, so it can narrow by directory, project, or name:
# Only run specs under the login feature folder
mo3ta-coverage --base origin/main --filter "src/__tests__/login"
# Only run specs whose name contains "auth"
mo3ta-coverage --base origin/main --filter "auth"
# Combined with an explicit file list and a dry run to preview
mo3ta-coverage --files src/a.js,src/b.ts --base main --dryRun true --filter "b"
For validation, the run logs both lists:
🔎 Filter regex: /src\/__tests__\/login/
All test files before filter (5):
- src/__tests__/login.spec.js
- src/checkout/checkout.spec.js
...
Test files after filter (1):
- src/__tests__/login.spec.js
If the filter matches nothing, no tests are run and the tool exits 0 with that log block, so you can see the candidate list and adjust the pattern.
In full mode the filter is also forwarded to Jest as
--testPathPatterns, since Jest discovers the related specs itself. If you
already set a Jest path pattern via --jest --testPathPatterns=..., your own
pattern wins.
To make the filter the default for a repo, save it with the config
subcommand:
mo3ta-coverage config --filter "src/__tests__/login"
# written to .mo3ta-coverage.json as "filter": "src/__tests__/login"
A --filter value on the command line overrides the saved one.
Pass --ci true to print the coverage results as a markdown table and
save that same table to a file (default: coverage/mo3ta-coverage-report.md,
configurable with --ciReport), so a CI job can read only the table instead
of parsing through the logs:
mo3ta-coverage --mode smart --base origin/main --ci true
# or save the table elsewhere
mo3ta-coverage --ci true --ciReport report.md
The table includes a per-file breakdown plus an Overall row with the
overall coverage percentage, and a summary line showing the limit. The exit
code is unchanged: the run still fails when changed-line coverage is below
--limit. In CI mode the verbose per-file console output is replaced by the
markdown table.
If you use the
GitHub Action,
--ci is enabled for you and the table is appended to the job summary
automatically — no run: step needed.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.