[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M699Q8MRHK9M04KY6G37PBBN":3,"skill-same:01M699Q8MRHK9M04KY6G37PBBN":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":54,"linkOnly":55,"markdownContent":56,"markdownBody":57,"frontMatter":58,"refName":61,"commitSha":62,"skillDirectory":63,"forksCount":64,"repositoryHtmlUrl":65,"repositoryHomepageUrl":66,"ownerHtmlUrl":67,"ownerBlogUrl":68,"ownerDescription":69,"updatedAt":70,"install":71,"resources":84},"01M699Q8MRHK9M04KY6G37PBBN","audit-ppmplugin","PPM 插件包静态审计","Statically audit a built `.ppmplugin` before wrap testing. Checks archive layout, manifest compatibility, bundle consistency, Android DEX integrity and SDK leakage, iOS framework structure, native source-to-receiver alignment, and the PCF composite-key\u002FsendAsync transport contract. Reports CRITICAL, WARNING, and INFO findings with fixes routed to the owning stage; never modifies the archive. Requires `jar`; `dexdump` or `strings` improves DEX inspection. Run after \u002Fassemble-ppmplugin or standalone on an existing bundle.","在打包测试前对已构建的 `.ppmplugin` 进行静态审计。检查归档布局、清单兼容性、包一致性、Android DEX 完整性和 SDK 泄漏、iOS 框架结构、原生源代码与接收器的一致性，以及 PCF 复合键\u002FsendAsync 传输契约。报告 CRITICAL、WARNING 和 INFO 级别的问题，并将修复方案转交给对应的负责阶段；从不修改归档。需要 `jar`；`dexdump` 或 `strings` 可改善 DEX 检查。在 \u002Fassemble-ppmplugin 之后运行，或独立对现有包运行。","microsoft\u002Fpower-platform-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M699JVYJFB75D9JM70BN4H0Q",1149,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-apps-mobile-extension\u002Fskills\u002Faudit-ppmplugin\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],"audit ppmplugin","audit","assemble","inspection","standalone","strings","native","critical","layout","structure","info","alignment","reports","never","testing","edit","write","read","Bash","run","pcf","sdk","android","2026-11-10 10:12:30",false,"---\nname: audit-ppmplugin\ndescription: \"Statically audit a built `.ppmplugin` before wrap testing. Checks archive layout, manifest compatibility, bundle consistency, Android DEX integrity and SDK leakage, iOS framework structure, native source-to-receiver alignment, and the PCF composite-key\u002FsendAsync transport contract. Reports CRITICAL, WARNING, and INFO findings with fixes routed to the owning stage; never modifies the archive. Requires `jar`; `dexdump` or `strings` improves DEX inspection. Run after \u002Fassemble-ppmplugin or standalone on an existing bundle.\"\nallowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill\nmodel: sonnet\n---\n\n# \u002Faudit-ppmplugin\n\nThe verification gate. `\u002Fassemble-ppmplugin` proves the bundle is *well-formed*; this skill proves it will *actually load and dispatch* on the wrap runtime. Most `.ppmplugin` failures are silent — the bundle uploads fine, then a method returns `native module 'X' not loaded`, the runtime cannot instantiate the package class, or the upload is rejected with `0x80040265` (canonical-prefix violation). Those cost a full wrap-build round-trip to discover. This skill surfaces them in seconds, on disk.\n\nIt is **read-only on the bundle** — it unzips to a temp dir for inspection and never mutates the `.ppmplugin`. Fixes route back upstream (`\u002Fgenerate-ppmplugin-manifest` for manifest issues, the build skills for binary issues), then re-assemble + re-audit.\n\nRead [`shared\u002Fppmplugin-format.md`](..\u002F..\u002Fshared\u002Fppmplugin-format.md) §1 (layout), §3 (canonical-prefix), §4 (validator rules), §5 (Android DEX requirements) — this skill enforces all four against the *built artifact*.\n\n## What this skill does NOT do\n- Does not build, zip, or author anything — it inspects a finished `.ppmplugin`. Fixes are made upstream and re-assembled.\n- Does not patch the zip in place — a bundle is an immutable deliverable; mutating it would desync it from the staged sources. It points at the upstream skill instead.\n- Does not upload to Dataverse \u002F wire into a canvas app (Stage 3 — deferred). \"READY TO UPLOAD\"\n  means *passes local verification*, not *uploaded*.\n\n---\n\n## Step 1 — Read shared docs + resolve the artifact + prereqs\n\n1. Read [`shared\u002Fshared-instructions.md`](..\u002F..\u002Fshared\u002Fshared-instructions.md) and [`shared\u002Fppmplugin-format.md`](..\u002F..\u002Fshared\u002Fppmplugin-format.md).\n2. **Resolve the bundle to audit:**\n   - If the user passed a path, use it. If it's a directory, look for `\u003Cdir>\u002F*.ppmplugin` (prompt if multiple).\n   - Else default to the assemble output: the single `ppmplugin\u002F\u003Cname>.ppmplugin` at the repo root (the most-recently-built if several).\n   - If none found, STOP with `NEEDS_CONTEXT: no .ppmplugin to audit — run \u002Fassemble-ppmplugin first, or pass a path`.\n3. Prereq block (shared-instructions §9.2). **Policy: resolve, don't punt** (§1.5) — locate a tool by path before failing:\n\n| Check | Verify | If missing |\n|---|---|---|\n| `jar` (JDK) | `jar --version` — used to list + extract the bundle | STOP `BLOCKED: jar not found — install a JDK (JDK 17)` |\n| DEX scanner | `dexdump` (preferred — locate in Android SDK `build-tools\u002F*\u002Fdexdump` like `\u002Fbuild-android-binary` resolves `$D8`); else `strings` (mac\u002Flinux ships it) | If neither: the DEX **string** checks degrade to WARNING (\"DEX scan skipped — no dexdump\u002Fstrings\"); structural checks (magic, size) still run. On Windows without either, note the gap. |\n\n4. **Extract** the bundle to a fresh temp dir for inspection (read-only on the original):\n   ```bash\n   work=$(mktemp -d); ( cd \"$work\" && jar xf \"\u003Cabs path to .ppmplugin>\" )\n   ```\n   ```powershell\n   $work = New-Item -ItemType Directory -Force (Join-Path $env:TEMP \"ppm-audit\"); Push-Location $work; jar xf \"\u003Cabs path>\"; Pop-Location\n   ```\n\nEach subsequent step appends findings to a running list as `[SEVERITY] \u003Ccheck-id>: \u003Cresult>`. Don't stop at the first CRITICAL — collect everything so the user fixes in one pass. Severities: **CRITICAL** (will fail at upload or on device — blocks), **WARNING** (likely-wrong, may still work), **INFO** (style \u002F advisory).\n\n---\n\n## Step 2 — Category A: Zip structure\n\nListing comes from `jar tf \"\u003C.ppmplugin>\"`. The bundle is **native-only** ([format §1](..\u002F..\u002Fshared\u002Fppmplugin-format.md)): `manifest.json` at root + only the declared `android\u002F` \u002F `ios\u002F` slices.\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `zip-manifest-at-root` | `manifest.json` is at the archive root | CRITICAL |\n| `zip-only-native-slices` | top-level entries ⊆ { `manifest.json`, `android\u002F`, `ios\u002F` } | CRITICAL |\n| `zip-no-ts-js-layer` | NO `src\u002F`, `*.ts`, `*.tsx`, `*.js`, `extension.js`, `extension.hbc` anywhere — the bundle ships no TS\u002FJS layer | CRITICAL |\n| `zip-no-build-dirs` | NO `android-build\u002F`, `ios-build\u002F`, `node_modules\u002F`, `dist\u002F`, `build\u002F` leaked in | CRITICAL |\n| `zip-no-stray-files` | NO `META-INF\u002F`, `.DS_Store`, dotfiles, nested `*.zip`\u002F`*.ppmplugin` | WARNING |\n| `zip-reasonable-size` | bundle \u003C 50 MB (a larger one usually means React or node_modules got swept in) | WARNING |\n\nA `src\u002F` tree, an `extension.js`\u002F`.hbc`, or any `*.ts` is **SDK-era \u002F JS-layer leakage** — flag CRITICAL and point at [format §6](..\u002F..\u002Fshared\u002Fppmplugin-format.md) (the bundle is native binaries only).\n\n---\n\n## Step 3 — Category B: Manifest schema, validator rules + field leakage\n\nRead the extracted `manifest.json`. Re-run **every** [`ppmplugin-format §4`](..\u002F..\u002Fshared\u002Fppmplugin-format.md) rule against the *built artifact* (defense in depth — the manifest may have been hand-edited after `\u002Fgenerate-ppmplugin-manifest`):\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `mf-name-shape` | `name` matches `^[a-z0-9][a-z0-9-]{0,63}$` | CRITICAL |\n| `mf-canonical-prefix` | each `receivers[].nativeModule` starts with the canonical prefix of `name` (split on `-`\u002F`_`, PascalCase each segment, join — [§3](..\u002F..\u002Fshared\u002Fppmplugin-format.md)) (Ordinal, case-sensitive) | CRITICAL |\n| `mf-reserved-prefix` | no `nativeModule` starts with a reserved prefix (case-insensitive list in §4: `Microsoft`, `MS`, `Intune`, `Wrap`, `Pcf`, `PowerApps`, …) | CRITICAL |\n| `mf-reserved-exact-known` | no `nativeModule` matches the locally checked incompatible-name subset (§4: `DeviceInfo`, `AuthenticationHelper`, `NetworkClient`, `DataverseOfflineProvider`, `IntuneMAM`). **Non-exhaustive**; fix = rename `getName()` to a non-reserved form (add `Module` suffix or a vendor prefix) and re-derive | CRITICAL |\n| `mf-nativeModule-generic-noun` | `nativeModule` does NOT match the generic-platform-noun heuristic `^(Device\\|Network\\|File\\|Audio\\|Camera\\|Sensor\\|Location\\|Storage\\|Notification\\|Bluetooth\\|Wifi\\|Media\\|Photo\\|Contact\\|Calendar\\|Battery)` — these bare names are both denylist-prone and collision-prone in the shared `NativeModules` namespace. (Heuristic, not the real list — `DeviceInfo` returned READY locally yet was server-rejected; this would have warned.) | WARNING |\n| `mf-methods` | every `receivers[].methods` is present, non-empty, ≤32, each matches `^[a-zA-Z_$][a-zA-Z0-9_$]{0,127}$` | CRITICAL |\n| `mf-receiver-name` | each `receivers[].name` matches the JS-identifier regex | CRITICAL |\n| `mf-version-present` | `version` is a non-empty string | WARNING |\n| `mf-no-sdk-fields` | NO `entrypoints.js`, `entrypoints.ts`, `extension.js`, `extension.hbc`, `extensionClassName`, `jsLayer` fields in the manifest. **Our native-only policy, NOT a server gate** — the wrap injector treats `entrypoints.js` as *optional* and accepts it; we flag it so the native-only bundle stays unambiguous. WARNING, not a block. | WARNING |\n\nNote in the report that only a **known subset** of incompatible exact names is checked locally\n(`mf-reserved-exact-known`), so a clean local result does not guarantee the upload service will\naccept the name.\n\n---\n\n## Step 4 — Category C: Manifest ↔ bundle consistency\n\nThe declared `entrypoints` must match the binaries actually in the zip — exactly. (`\u002Fassemble-ppmplugin` reconciles this at build time; auditing the *finished* bundle catches a hand-edited manifest or a hand-zipped bundle.)\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `consistency-has-native` | at least one of `entrypoints.android` \u002F `entrypoints.ios` is declared (a manifest-only bundle has nothing to load) | CRITICAL |\n| `consistency-android-dex` | if `entrypoints.android` declared → `android\u002F\u003Centrypoints.android.dex>` exists in the zip | CRITICAL |\n| `consistency-ios-framework` | if `entrypoints.ios` declared → `ios\u002F\u003Centrypoints.ios.framework>.framework\u002F` exists in the zip (flat framework — see `ios-flat-framework-not-xcframework` in Category E) | CRITICAL |\n| `consistency-no-orphan` | every `android\u002F` or `ios\u002F` slice in the zip is backed by a matching declared entrypoint (no undeclared binary the runtime won't route) | WARNING |\n| `consistency-packageClass-shape` | `entrypoints.android.packageClass` is a fully-qualified Java class name (`^([a-z][a-z0-9_]*\\.)+[A-Z][A-Za-z0-9_]*$`) | CRITICAL |\n| `dispatch-composite-key` | the composite routing key `\u003Cname>\u002F\u003Creceivers[].name>` is well-formed (both segments present, JS-identifier-safe suffix) — this is what a dispatcher PCF binds as `ReceiverKey` to reach `NativeModules.\u003CnativeModule>.\u003Cmethod>` ([format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md) — *Runtime dispatch contract*) | WARNING |\n\n---\n\n## Step 5 — Category D: DEX integrity + SDK-leakage byte-scan (Android)\n\nOnly if `entrypoints.android` is declared. The DEX is loaded via `DexClassLoader` ([format §5](..\u002F..\u002Fshared\u002Fppmplugin-format.md)); these confirm it's loadable and free of SDK-era leakage. Use `dexdump -l plain \u003Cdex>` if available, else `strings \u003Cdex>` — both expose the string\u002Ftype pool the checks scan.\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `dex-magic` | first bytes are `dex\\n03[5-9]` (valid DEX) | CRITICAL |\n| `dex-has-packageClass` | the `entrypoints.android.packageClass` type descriptor (`Lcom\u002F...\u002F\u003CPascal>Package;`) is in the DEX — otherwise runtime class loading fails | CRITICAL |\n| `dex-has-module-class` | the module class descriptor is in the DEX | CRITICAL |\n| `dex-no-INativeExtension` | NO `INativeExtension`, `INativeOperation`, `INativeExtensionContext` strings — SDK-era symbols in a native-only bundle. **Cleanliness policy, not a server gate**: the player ignores them (an old-pattern plugin still dispatches if its `receivers[]` map to real native modules), so surface it but don't block. | WARNING |\n| `dex-no-jslayer-loader` | NO `HermesBytecodeLoader`, `WrapPluginJsLayerLoader` strings — a JS-layer loader has no place in a native-only DEX (same: flagged, not blocking). | WARNING |\n| `dex-no-sendAsync` | NO `sendAsync` symbol — possible SDK transport leak | WARNING |\n\nThese SDK-leakage checks are the heart of the native-only contract: a clean compile can still pull these symbols in transitively. Scanning the *built DEX* is the only place they're catchable.\n\n---\n\n## Step 6 — Category E: iOS framework structure (the wrap-CI gates)\n\nOnly if `entrypoints.ios` is declared. The CRITICAL set is exactly what the runtime's `dlopen` loading and wrap signing pipeline require. The umbrella header + module map are build hygiene only (the loader `dlopen`s the binary; it never `import`s the module), so they're INFO — **do not block a valid bundle on their absence.**\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `ios-flat-framework-not-xcframework` | the bundle ships `ios\u002F\u003Cframework>.framework\u002F` — **NOT** `ios\u002F\u003Cframework>.xcframework\u002F`. If an `.xcframework` is present, FAIL with the wrap-CI error verbatim (*\"Framework '\u003CName>.framework' not found in plugin\"*) and the fix: rebuild with `\u002Fbuild-ios-binary` (device slice, flat framework — drop `-create-xcframework`). | CRITICAL |\n| `ios-binary-present` | `ios\u002F\u003Cframework>.framework\u002F\u003Cframework>` (the Mach-O binary, named **exactly** `\u003Cframework>`) exists — the loader `dlopen`s `Frameworks\u002F\u003Cframework>.framework\u002F\u003Cframework>`, so a missing or differently-named binary won't load | CRITICAL |\n| `ios-framework-has-infoplist` | `ios\u002F\u003Cframework>.framework\u002FInfo.plist` exists with `CFBundlePackageType=FMWK`, `CFBundleExecutable=\u003Cframework>`, `CFBundleIdentifier`, `CFBundleShortVersionString`, `MinimumOSVersion` — a framework bundle with no Info.plist is invalid and the wrap codesign step rejects it | CRITICAL |\n| `ios-framework-has-umbrella` | `ios\u002F\u003Cframework>.framework\u002FHeaders\u002F\u003Cframework>.h` umbrella header present — **build hygiene only**; the `dlopen` loader does not `import` the module, so its absence does NOT break loading | INFO |\n| `ios-framework-has-modulemap` | `ios\u002F\u003Cframework>.framework\u002FModules\u002Fmodule.modulemap` present — **build hygiene only** (same reason); not runtime-required | INFO |\n| `ios-moduleClass-match` | `entrypoints.ios.moduleClass` is the documented Obj-C class (`RCT\u003CPascal>Module`) and, when source is reachable, the `.h`\u002F`.m` class name matches it | WARNING |\n| `ios-moduleName-matches` | when source is reachable, the `.m` declares `+ (NSString *)moduleName` returning `receivers[].nativeModule` and does **not** use `RCT_EXPORT_MODULE(...)` (wrap plugins are registered by the runtime, not `+load`) | CRITICAL |\n\n(Deep Mach-O introspection — Dynamic-vs-Static, dead-code-stripping, weak React link — is owned by `\u002Fbuild-ios-binary` at build time; here we verify the shipped framework is what the loader + wrap CI ingest.)\n\n---\n\n## Step 7 — Category F: Source-to-receiver contract (when the repo is reachable)\n\nThese need the extension source. If the audit runs in the control repo (the bundle's source tree is present), run them; else mark each `SKIPPED — source not reachable` and note that the build skills already asserted them at build time.\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `src-getName-matches` | the Kotlin module's `getName()` literal == `receivers[].nativeModule` — mismatch = `native module 'X' not loaded` on device (compiles fine; hardest to catch) | CRITICAL |\n| `src-methods-annotated` | every `receivers[].methods[]` entry has a matching `@ReactMethod` (Android) \u002F `RCT_EXPORT_METHOD` (iOS) | CRITICAL |\n| `src-package-fqn-matches` | the `ReactPackage` FQN == `entrypoints.android.packageClass` | CRITICAL |\n| `src-package-no-arg-ctor` | the `\u003CPascal>Package` (Android) has a public no-arg constructor — the runtime uses `getDeclaredConstructor().newInstance()`; a primary-constructor parameter list (`class \u003CPascal>Package(...)`) makes the plugin silently fail to load (`Loaded 0 plugin package(s)`). iOS analogue: the module class instantiates via `[cls new]` (no custom arg-ed initializer). | CRITICAL |\n| `src-ios-module-no-arg-init` | (iOS) the module class has **no arg-ed-only initializer** — the player does `NSClassFromString(moduleClass)` → `[cls new]`, so a class whose only initializer takes arguments won't instantiate and is **skipped at load** ([§5b](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | CRITICAL |\n| `src-ios-requires-main-queue` | (iOS) if `+ (BOOL)requiresMainQueueSetup` is declared, it returns **`NO`** (returning `YES` forces main-thread setup at launch and, with any heavy\u002Fthrowing `init`, stalls or crashes startup — [§5b](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | WARNING |\n| `src-method-single-map-param` | each `@ReactMethod` \u002F `RCT_EXPORT_METHOD` takes **one** `ReadableMap`\u002F`NSDictionary` request param (then the Promise\u002Fresolver) — the wrap proxy spreads the PCF's `args:[request]` positionally, so a method with multiple positional params won't receive its payload (a no-arg op taking only the Promise is fine). | WARNING |\n| `pcf-composite-key-matches-receiver` | if a sibling PCF (`pcf\u002F\u003C…>\u002Findex.ts`) declares `COMPOSITE_KEY = \"\u003Cname>\u002F\u003Creceiver>\"` (or binds a `ReceiverKey`), it MUST equal `\u003Cmanifest.name>\u002F\u003Creceivers[].name>` — a mismatch means the PCF dispatches to a receiver the manifest never registers, failing on first call (real bug: PCF→`Snapshot`, manifest→`DeviceInfoExtension`). | WARNING |\n| `pcf-uses-sendasync` | **if a sibling PCF (`pcf\u002F\u003C…>\u002Findex.ts`) is present, it MUST dispatch via `window.PowerApps.NativeExtension.sendAsync(...)` and MUST NOT call `cordova.exec` (or any `cordova.*`) directly.** A direct `cordova.exec` call is the CRITICAL defect: the raw `cordova` global is not exposed to the PCF sandbox, so the call is a silent no-op on device (worst on Android) — it passes zip\u002Fmanifest\u002FDEX\u002Fkey checks and only fails on-device. Fix: route through the host-injected `sendAsync` global ([format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | **CRITICAL** |\n| `pcf-envelope-is-raw-object` | if a sibling PCF is present, the `sendAsync` payload MUST be a **raw** `{ method, args: [...] }` object — the PCF must NOT pre-`JSON.stringify` it (`sendAsync` stringifies internally). A `sendAsync(key, JSON.stringify({...}))` double-encodes → the proxy `JSON.parse` yields a string, not `{method,args}` → **`BRIDGE_FAILED`**. Fix: pass the object literal, not a stringified one. | **CRITICAL** |\n| `pcf-args-is-array` | if a sibling PCF is present, the inner `args` inside the `sendAsync` payload is a **JSON array** (`args: [request]`), not a bare object — after parsing, the wrap proxy does `Array.isArray(parsed.args) ? parsed.args : []` and drops a non-array, so the native method gets no payload ([format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | WARNING |\n| `pcf-has-ambient-dts` | if a sibling PCF is present, it ships a local `PowerAppsNativeExtension.d.ts` ambient declaration (typing `window.PowerApps.NativeExtension.sendAsync`) rather than importing a host SDK package — keeps the PCF host-agnostic. | INFO |\n| `src-no-ReactModule-annotation` | the module has no `@ReactModule` annotation (incompatible with `DexClassLoader` — [format §5](..\u002F..\u002Fshared\u002Fppmplugin-format.md)) | CRITICAL |\n| `src-ctor-no-throwable-sideeffects` | **Scope the scan to the module's *construction closure*, not the whole file** — the primary\u002Fsecondary constructor(s), the Kotlin `init{}` block(s), property initializers that run at construction (`private val x = …`), PLUS any private function they call (follow one level of `foo()` \u002F `this.foo()`). Within that closure, flag: (a) `register*Callback(…, null)` or a bare `Handler()` \u002F `Handler(...)` with no explicit `Looper`; (b) any side-effecting call (`register*`\u002F`add*Listener`\u002F`observe`\u002F`getSystemService`+use\u002Ffile or network I\u002FO\u002F`runBlocking`) **not** inside a `try { } catch`. `@ReactMethod` bodies are OUT of scope (they run per-call, not at construction). The module is constructed **eagerly at bridge startup on a possibly Looper-less thread** — an uncaught throw crashes the host at launch, before any UI ([format §5](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). Fix: defer to lazy first-call init, pass `Handler(Looper.getMainLooper())`, wrap unavoidable init in try\u002Fcatch. **iOS analogue:** apply the same scan to a throwing\u002Fheavy `-init` (instantiated eagerly via `[cls new]`, §5b). Heuristic — the definitive catch is `\u002Ftest-native-extension` Layer 1's load\u002Finit readiness asserts (static) + Layer 5's runtime launch crash-scan. | WARNING |\n| `pcf-response-unwraps-message` | if a sibling PCF is present, its `sendAsync` success path unwraps the wrap **response container** (`{isUpdate, message:\"\u003Cjson>\"}`) — i.e. calls an `extractResponse`-style helper (parse `result.data` + probe `message`), not a bare single `JSON.parse`. A single-parse-only handler lands on the container and fails every call with `UNEXPECTED_PAYLOAD` though native succeeded ([format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | WARNING |\n| `src-promise-always-settled` | each `@ReactMethod` \u002F `RCT_EXPORT_METHOD` that takes a `Promise` \u002F resolver+rejecter contains at least one `promise.resolve` \u002F `promise.reject` (or `resolve(...)` \u002F `reject(...)`) on a reachable path. A Promise-taking method that can return without settling leaves the maker with a **hung control** and no code\u002Fmessage. | WARNING |\n| `src-listener-released` | each `register*` \u002F `add*Listener` \u002F `observe` \u002F acquired manager in the module has a matching release (`unregister*` \u002F `remove*Listener` \u002F `.close()` \u002F `.release()`) in `invalidate()` \u002F `onCatalystInstanceDestroy()` \u002F teardown. A registered callback with no release leaks and can fire into a dead module. | WARNING |\n\n---\n\n## Step 8 — Report + route fixes\n\nPrint the verdict as a visible fenced block (shared-instructions §9.1). Prefix each severity per `shared-instructions.md §9.3` — ? CRITICAL, ? WARNING, ? INFO, ? READY — keeping the word so meaning survives a no-emoji terminal:\n\n```\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n audit-ppmplugin — pen-input.ppmplugin\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n Path: ppmplugin\u002Fpen-input.ppmplugin   (v0.1.4, Android-only, 3.4 KB)\n ? CRITICAL: 0   ? WARNING: 1   ? INFO: 0   SKIPPED: 4 (source not reachable)\n\n ? [WARNING] zip-no-stray-files: .DS_Store present in android\u002F\n   Fix: re-run \u002Fassemble-ppmplugin (it excludes dotfiles).\n\n ⓘ The upload service may apply additional name checks not represented locally.\n ? ✓ READY TO UPLOAD\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n```\n\n(When there **are** CRITICALs, the verdict line reads ? and the last line is `? ✗ NOT READY — fix the CRITICAL findings above`.)\n\nEach non-clean finding carries **`Fix:`** with the concrete next action, routed to the owning skill (never a zip patch):\n- Manifest rule \u002F leakage field → \"edit + re-run `\u002Fgenerate-ppmplugin-manifest`, then `\u002Fassemble-ppmplugin`.\"\n- DEX leakage \u002F missing class → \"the Android source pulled in SDK symbols — strip the import; re-run `\u002Fbuild-android-binary` then `\u002Fassemble-ppmplugin`.\"\n- Zip stray-file \u002F structure → \"re-run `\u002Fassemble-ppmplugin`.\"\n\nThen surface next steps via `AskUserQuestion` (shared-instructions §9.1):\n- **Clean (0 CRITICAL):** offer **Re-run \u002Fgenerate-ppmplugin-manifest** (only if a WARNING points there) \u002F **Stay — I'll upload manually** (Stage 3 is not yet a skill). When the user picks a `Run \u002F…` option, invoke it via the Skill tool in the same turn (§8 + §9.1 \"execute, don't describe\").\n- **Dirty (≥1 CRITICAL):** offer to jump to the owning skill of the first CRITICAL — **Run \u002Fgenerate-ppmplugin-manifest** or **Run \u002Fbuild-android-binary** — then re-assemble + re-audit. Invoke on selection.\n\nUpdate the `## ppmplugin (third-party controls)` block in `.extension-state.md`: `Audit: \u003Cname>.ppmplugin \u003CISO timestamp> — \u003CCRITICAL>C\u002F\u003CWARNING>W (READY | BLOCKED)`.\n\nReturn code:\n- `DONE` — 0 CRITICAL (clean, or warnings only ⇒ note them). The bundle passes local verification.\n- `BLOCKED: audit found \u003CN> CRITICAL — see findings` — refuse the READY verdict; do not claim it's uploadable.\n","# \u002Faudit-ppmplugin\n\nThe verification gate. `\u002Fassemble-ppmplugin` proves the bundle is *well-formed*; this skill proves it will *actually load and dispatch* on the wrap runtime. Most `.ppmplugin` failures are silent — the bundle uploads fine, then a method returns `native module 'X' not loaded`, the runtime cannot instantiate the package class, or the upload is rejected with `0x80040265` (canonical-prefix violation). Those cost a full wrap-build round-trip to discover. This skill surfaces them in seconds, on disk.\n\nIt is **read-only on the bundle** — it unzips to a temp dir for inspection and never mutates the `.ppmplugin`. Fixes route back upstream (`\u002Fgenerate-ppmplugin-manifest` for manifest issues, the build skills for binary issues), then re-assemble + re-audit.\n\nRead [`shared\u002Fppmplugin-format.md`](..\u002F..\u002Fshared\u002Fppmplugin-format.md) §1 (layout), §3 (canonical-prefix), §4 (validator rules), §5 (Android DEX requirements) — this skill enforces all four against the *built artifact*.\n\n## What this skill does NOT do\n- Does not build, zip, or author anything — it inspects a finished `.ppmplugin`. Fixes are made upstream and re-assembled.\n- Does not patch the zip in place — a bundle is an immutable deliverable; mutating it would desync it from the staged sources. It points at the upstream skill instead.\n- Does not upload to Dataverse \u002F wire into a canvas app (Stage 3 — deferred). \"READY TO UPLOAD\"\n  means *passes local verification*, not *uploaded*.\n\n---\n\n## Step 1 — Read shared docs + resolve the artifact + prereqs\n\n1. Read [`shared\u002Fshared-instructions.md`](..\u002F..\u002Fshared\u002Fshared-instructions.md) and [`shared\u002Fppmplugin-format.md`](..\u002F..\u002Fshared\u002Fppmplugin-format.md).\n2. **Resolve the bundle to audit:**\n   - If the user passed a path, use it. If it's a directory, look for `\u003Cdir>\u002F*.ppmplugin` (prompt if multiple).\n   - Else default to the assemble output: the single `ppmplugin\u002F\u003Cname>.ppmplugin` at the repo root (the most-recently-built if several).\n   - If none found, STOP with `NEEDS_CONTEXT: no .ppmplugin to audit — run \u002Fassemble-ppmplugin first, or pass a path`.\n3. Prereq block (shared-instructions §9.2). **Policy: resolve, don't punt** (§1.5) — locate a tool by path before failing:\n\n| Check | Verify | If missing |\n|---|---|---|\n| `jar` (JDK) | `jar --version` — used to list + extract the bundle | STOP `BLOCKED: jar not found — install a JDK (JDK 17)` |\n| DEX scanner | `dexdump` (preferred — locate in Android SDK `build-tools\u002F*\u002Fdexdump` like `\u002Fbuild-android-binary` resolves `$D8`); else `strings` (mac\u002Flinux ships it) | If neither: the DEX **string** checks degrade to WARNING (\"DEX scan skipped — no dexdump\u002Fstrings\"); structural checks (magic, size) still run. On Windows without either, note the gap. |\n\n4. **Extract** the bundle to a fresh temp dir for inspection (read-only on the original):\n   ```bash\n   work=$(mktemp -d); ( cd \"$work\" && jar xf \"\u003Cabs path to .ppmplugin>\" )\n   ```\n   ```powershell\n   $work = New-Item -ItemType Directory -Force (Join-Path $env:TEMP \"ppm-audit\"); Push-Location $work; jar xf \"\u003Cabs path>\"; Pop-Location\n   ```\n\nEach subsequent step appends findings to a running list as `[SEVERITY] \u003Ccheck-id>: \u003Cresult>`. Don't stop at the first CRITICAL — collect everything so the user fixes in one pass. Severities: **CRITICAL** (will fail at upload or on device — blocks), **WARNING** (likely-wrong, may still work), **INFO** (style \u002F advisory).\n\n---\n\n## Step 2 — Category A: Zip structure\n\nListing comes from `jar tf \"\u003C.ppmplugin>\"`. The bundle is **native-only** ([format §1](..\u002F..\u002Fshared\u002Fppmplugin-format.md)): `manifest.json` at root + only the declared `android\u002F` \u002F `ios\u002F` slices.\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `zip-manifest-at-root` | `manifest.json` is at the archive root | CRITICAL |\n| `zip-only-native-slices` | top-level entries ⊆ { `manifest.json`, `android\u002F`, `ios\u002F` } | CRITICAL |\n| `zip-no-ts-js-layer` | NO `src\u002F`, `*.ts`, `*.tsx`, `*.js`, `extension.js`, `extension.hbc` anywhere — the bundle ships no TS\u002FJS layer | CRITICAL |\n| `zip-no-build-dirs` | NO `android-build\u002F`, `ios-build\u002F`, `node_modules\u002F`, `dist\u002F`, `build\u002F` leaked in | CRITICAL |\n| `zip-no-stray-files` | NO `META-INF\u002F`, `.DS_Store`, dotfiles, nested `*.zip`\u002F`*.ppmplugin` | WARNING |\n| `zip-reasonable-size` | bundle \u003C 50 MB (a larger one usually means React or node_modules got swept in) | WARNING |\n\nA `src\u002F` tree, an `extension.js`\u002F`.hbc`, or any `*.ts` is **SDK-era \u002F JS-layer leakage** — flag CRITICAL and point at [format §6](..\u002F..\u002Fshared\u002Fppmplugin-format.md) (the bundle is native binaries only).\n\n---\n\n## Step 3 — Category B: Manifest schema, validator rules + field leakage\n\nRead the extracted `manifest.json`. Re-run **every** [`ppmplugin-format §4`](..\u002F..\u002Fshared\u002Fppmplugin-format.md) rule against the *built artifact* (defense in depth — the manifest may have been hand-edited after `\u002Fgenerate-ppmplugin-manifest`):\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `mf-name-shape` | `name` matches `^[a-z0-9][a-z0-9-]{0,63}$` | CRITICAL |\n| `mf-canonical-prefix` | each `receivers[].nativeModule` starts with the canonical prefix of `name` (split on `-`\u002F`_`, PascalCase each segment, join — [§3](..\u002F..\u002Fshared\u002Fppmplugin-format.md)) (Ordinal, case-sensitive) | CRITICAL |\n| `mf-reserved-prefix` | no `nativeModule` starts with a reserved prefix (case-insensitive list in §4: `Microsoft`, `MS`, `Intune`, `Wrap`, `Pcf`, `PowerApps`, …) | CRITICAL |\n| `mf-reserved-exact-known` | no `nativeModule` matches the locally checked incompatible-name subset (§4: `DeviceInfo`, `AuthenticationHelper`, `NetworkClient`, `DataverseOfflineProvider`, `IntuneMAM`). **Non-exhaustive**; fix = rename `getName()` to a non-reserved form (add `Module` suffix or a vendor prefix) and re-derive | CRITICAL |\n| `mf-nativeModule-generic-noun` | `nativeModule` does NOT match the generic-platform-noun heuristic `^(Device\\|Network\\|File\\|Audio\\|Camera\\|Sensor\\|Location\\|Storage\\|Notification\\|Bluetooth\\|Wifi\\|Media\\|Photo\\|Contact\\|Calendar\\|Battery)` — these bare names are both denylist-prone and collision-prone in the shared `NativeModules` namespace. (Heuristic, not the real list — `DeviceInfo` returned READY locally yet was server-rejected; this would have warned.) | WARNING |\n| `mf-methods` | every `receivers[].methods` is present, non-empty, ≤32, each matches `^[a-zA-Z_$][a-zA-Z0-9_$]{0,127}$` | CRITICAL |\n| `mf-receiver-name` | each `receivers[].name` matches the JS-identifier regex | CRITICAL |\n| `mf-version-present` | `version` is a non-empty string | WARNING |\n| `mf-no-sdk-fields` | NO `entrypoints.js`, `entrypoints.ts`, `extension.js`, `extension.hbc`, `extensionClassName`, `jsLayer` fields in the manifest. **Our native-only policy, NOT a server gate** — the wrap injector treats `entrypoints.js` as *optional* and accepts it; we flag it so the native-only bundle stays unambiguous. WARNING, not a block. | WARNING |\n\nNote in the report that only a **known subset** of incompatible exact names is checked locally\n(`mf-reserved-exact-known`), so a clean local result does not guarantee the upload service will\naccept the name.\n\n---\n\n## Step 4 — Category C: Manifest ↔ bundle consistency\n\nThe declared `entrypoints` must match the binaries actually in the zip — exactly. (`\u002Fassemble-ppmplugin` reconciles this at build time; auditing the *finished* bundle catches a hand-edited manifest or a hand-zipped bundle.)\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `consistency-has-native` | at least one of `entrypoints.android` \u002F `entrypoints.ios` is declared (a manifest-only bundle has nothing to load) | CRITICAL |\n| `consistency-android-dex` | if `entrypoints.android` declared → `android\u002F\u003Centrypoints.android.dex>` exists in the zip | CRITICAL |\n| `consistency-ios-framework` | if `entrypoints.ios` declared → `ios\u002F\u003Centrypoints.ios.framework>.framework\u002F` exists in the zip (flat framework — see `ios-flat-framework-not-xcframework` in Category E) | CRITICAL |\n| `consistency-no-orphan` | every `android\u002F` or `ios\u002F` slice in the zip is backed by a matching declared entrypoint (no undeclared binary the runtime won't route) | WARNING |\n| `consistency-packageClass-shape` | `entrypoints.android.packageClass` is a fully-qualified Java class name (`^([a-z][a-z0-9_]*\\.)+[A-Z][A-Za-z0-9_]*$`) | CRITICAL |\n| `dispatch-composite-key` | the composite routing key `\u003Cname>\u002F\u003Creceivers[].name>` is well-formed (both segments present, JS-identifier-safe suffix) — this is what a dispatcher PCF binds as `ReceiverKey` to reach `NativeModules.\u003CnativeModule>.\u003Cmethod>` ([format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md) — *Runtime dispatch contract*) | WARNING |\n\n---\n\n## Step 5 — Category D: DEX integrity + SDK-leakage byte-scan (Android)\n\nOnly if `entrypoints.android` is declared. The DEX is loaded via `DexClassLoader` ([format §5](..\u002F..\u002Fshared\u002Fppmplugin-format.md)); these confirm it's loadable and free of SDK-era leakage. Use `dexdump -l plain \u003Cdex>` if available, else `strings \u003Cdex>` — both expose the string\u002Ftype pool the checks scan.\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `dex-magic` | first bytes are `dex\\n03[5-9]` (valid DEX) | CRITICAL |\n| `dex-has-packageClass` | the `entrypoints.android.packageClass` type descriptor (`Lcom\u002F...\u002F\u003CPascal>Package;`) is in the DEX — otherwise runtime class loading fails | CRITICAL |\n| `dex-has-module-class` | the module class descriptor is in the DEX | CRITICAL |\n| `dex-no-INativeExtension` | NO `INativeExtension`, `INativeOperation`, `INativeExtensionContext` strings — SDK-era symbols in a native-only bundle. **Cleanliness policy, not a server gate**: the player ignores them (an old-pattern plugin still dispatches if its `receivers[]` map to real native modules), so surface it but don't block. | WARNING |\n| `dex-no-jslayer-loader` | NO `HermesBytecodeLoader`, `WrapPluginJsLayerLoader` strings — a JS-layer loader has no place in a native-only DEX (same: flagged, not blocking). | WARNING |\n| `dex-no-sendAsync` | NO `sendAsync` symbol — possible SDK transport leak | WARNING |\n\nThese SDK-leakage checks are the heart of the native-only contract: a clean compile can still pull these symbols in transitively. Scanning the *built DEX* is the only place they're catchable.\n\n---\n\n## Step 6 — Category E: iOS framework structure (the wrap-CI gates)\n\nOnly if `entrypoints.ios` is declared. The CRITICAL set is exactly what the runtime's `dlopen` loading and wrap signing pipeline require. The umbrella header + module map are build hygiene only (the loader `dlopen`s the binary; it never `import`s the module), so they're INFO — **do not block a valid bundle on their absence.**\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `ios-flat-framework-not-xcframework` | the bundle ships `ios\u002F\u003Cframework>.framework\u002F` — **NOT** `ios\u002F\u003Cframework>.xcframework\u002F`. If an `.xcframework` is present, FAIL with the wrap-CI error verbatim (*\"Framework '\u003CName>.framework' not found in plugin\"*) and the fix: rebuild with `\u002Fbuild-ios-binary` (device slice, flat framework — drop `-create-xcframework`). | CRITICAL |\n| `ios-binary-present` | `ios\u002F\u003Cframework>.framework\u002F\u003Cframework>` (the Mach-O binary, named **exactly** `\u003Cframework>`) exists — the loader `dlopen`s `Frameworks\u002F\u003Cframework>.framework\u002F\u003Cframework>`, so a missing or differently-named binary won't load | CRITICAL |\n| `ios-framework-has-infoplist` | `ios\u002F\u003Cframework>.framework\u002FInfo.plist` exists with `CFBundlePackageType=FMWK`, `CFBundleExecutable=\u003Cframework>`, `CFBundleIdentifier`, `CFBundleShortVersionString`, `MinimumOSVersion` — a framework bundle with no Info.plist is invalid and the wrap codesign step rejects it | CRITICAL |\n| `ios-framework-has-umbrella` | `ios\u002F\u003Cframework>.framework\u002FHeaders\u002F\u003Cframework>.h` umbrella header present — **build hygiene only**; the `dlopen` loader does not `import` the module, so its absence does NOT break loading | INFO |\n| `ios-framework-has-modulemap` | `ios\u002F\u003Cframework>.framework\u002FModules\u002Fmodule.modulemap` present — **build hygiene only** (same reason); not runtime-required | INFO |\n| `ios-moduleClass-match` | `entrypoints.ios.moduleClass` is the documented Obj-C class (`RCT\u003CPascal>Module`) and, when source is reachable, the `.h`\u002F`.m` class name matches it | WARNING |\n| `ios-moduleName-matches` | when source is reachable, the `.m` declares `+ (NSString *)moduleName` returning `receivers[].nativeModule` and does **not** use `RCT_EXPORT_MODULE(...)` (wrap plugins are registered by the runtime, not `+load`) | CRITICAL |\n\n(Deep Mach-O introspection — Dynamic-vs-Static, dead-code-stripping, weak React link — is owned by `\u002Fbuild-ios-binary` at build time; here we verify the shipped framework is what the loader + wrap CI ingest.)\n\n---\n\n## Step 7 — Category F: Source-to-receiver contract (when the repo is reachable)\n\nThese need the extension source. If the audit runs in the control repo (the bundle's source tree is present), run them; else mark each `SKIPPED — source not reachable` and note that the build skills already asserted them at build time.\n\n| Check | Asserts | Severity |\n|---|---|---|\n| `src-getName-matches` | the Kotlin module's `getName()` literal == `receivers[].nativeModule` — mismatch = `native module 'X' not loaded` on device (compiles fine; hardest to catch) | CRITICAL |\n| `src-methods-annotated` | every `receivers[].methods[]` entry has a matching `@ReactMethod` (Android) \u002F `RCT_EXPORT_METHOD` (iOS) | CRITICAL |\n| `src-package-fqn-matches` | the `ReactPackage` FQN == `entrypoints.android.packageClass` | CRITICAL |\n| `src-package-no-arg-ctor` | the `\u003CPascal>Package` (Android) has a public no-arg constructor — the runtime uses `getDeclaredConstructor().newInstance()`; a primary-constructor parameter list (`class \u003CPascal>Package(...)`) makes the plugin silently fail to load (`Loaded 0 plugin package(s)`). iOS analogue: the module class instantiates via `[cls new]` (no custom arg-ed initializer). | CRITICAL |\n| `src-ios-module-no-arg-init` | (iOS) the module class has **no arg-ed-only initializer** — the player does `NSClassFromString(moduleClass)` → `[cls new]`, so a class whose only initializer takes arguments won't instantiate and is **skipped at load** ([§5b](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | CRITICAL |\n| `src-ios-requires-main-queue` | (iOS) if `+ (BOOL)requiresMainQueueSetup` is declared, it returns **`NO`** (returning `YES` forces main-thread setup at launch and, with any heavy\u002Fthrowing `init`, stalls or crashes startup — [§5b](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | WARNING |\n| `src-method-single-map-param` | each `@ReactMethod` \u002F `RCT_EXPORT_METHOD` takes **one** `ReadableMap`\u002F`NSDictionary` request param (then the Promise\u002Fresolver) — the wrap proxy spreads the PCF's `args:[request]` positionally, so a method with multiple positional params won't receive its payload (a no-arg op taking only the Promise is fine). | WARNING |\n| `pcf-composite-key-matches-receiver` | if a sibling PCF (`pcf\u002F\u003C…>\u002Findex.ts`) declares `COMPOSITE_KEY = \"\u003Cname>\u002F\u003Creceiver>\"` (or binds a `ReceiverKey`), it MUST equal `\u003Cmanifest.name>\u002F\u003Creceivers[].name>` — a mismatch means the PCF dispatches to a receiver the manifest never registers, failing on first call (real bug: PCF→`Snapshot`, manifest→`DeviceInfoExtension`). | WARNING |\n| `pcf-uses-sendasync` | **if a sibling PCF (`pcf\u002F\u003C…>\u002Findex.ts`) is present, it MUST dispatch via `window.PowerApps.NativeExtension.sendAsync(...)` and MUST NOT call `cordova.exec` (or any `cordova.*`) directly.** A direct `cordova.exec` call is the CRITICAL defect: the raw `cordova` global is not exposed to the PCF sandbox, so the call is a silent no-op on device (worst on Android) — it passes zip\u002Fmanifest\u002FDEX\u002Fkey checks and only fails on-device. Fix: route through the host-injected `sendAsync` global ([format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | **CRITICAL** |\n| `pcf-envelope-is-raw-object` | if a sibling PCF is present, the `sendAsync` payload MUST be a **raw** `{ method, args: [...] }` object — the PCF must NOT pre-`JSON.stringify` it (`sendAsync` stringifies internally). A `sendAsync(key, JSON.stringify({...}))` double-encodes → the proxy `JSON.parse` yields a string, not `{method,args}` → **`BRIDGE_FAILED`**. Fix: pass the object literal, not a stringified one. | **CRITICAL** |\n| `pcf-args-is-array` | if a sibling PCF is present, the inner `args` inside the `sendAsync` payload is a **JSON array** (`args: [request]`), not a bare object — after parsing, the wrap proxy does `Array.isArray(parsed.args) ? parsed.args : []` and drops a non-array, so the native method gets no payload ([format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | WARNING |\n| `pcf-has-ambient-dts` | if a sibling PCF is present, it ships a local `PowerAppsNativeExtension.d.ts` ambient declaration (typing `window.PowerApps.NativeExtension.sendAsync`) rather than importing a host SDK package — keeps the PCF host-agnostic. | INFO |\n| `src-no-ReactModule-annotation` | the module has no `@ReactModule` annotation (incompatible with `DexClassLoader` — [format §5](..\u002F..\u002Fshared\u002Fppmplugin-format.md)) | CRITICAL |\n| `src-ctor-no-throwable-sideeffects` | **Scope the scan to the module's *construction closure*, not the whole file** — the primary\u002Fsecondary constructor(s), the Kotlin `init{}` block(s), property initializers that run at construction (`private val x = …`), PLUS any private function they call (follow one level of `foo()` \u002F `this.foo()`). Within that closure, flag: (a) `register*Callback(…, null)` or a bare `Handler()` \u002F `Handler(...)` with no explicit `Looper`; (b) any side-effecting call (`register*`\u002F`add*Listener`\u002F`observe`\u002F`getSystemService`+use\u002Ffile or network I\u002FO\u002F`runBlocking`) **not** inside a `try { } catch`. `@ReactMethod` bodies are OUT of scope (they run per-call, not at construction). The module is constructed **eagerly at bridge startup on a possibly Looper-less thread** — an uncaught throw crashes the host at launch, before any UI ([format §5](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). Fix: defer to lazy first-call init, pass `Handler(Looper.getMainLooper())`, wrap unavoidable init in try\u002Fcatch. **iOS analogue:** apply the same scan to a throwing\u002Fheavy `-init` (instantiated eagerly via `[cls new]`, §5b). Heuristic — the definitive catch is `\u002Ftest-native-extension` Layer 1's load\u002Finit readiness asserts (static) + Layer 5's runtime launch crash-scan. | WARNING |\n| `pcf-response-unwraps-message` | if a sibling PCF is present, its `sendAsync` success path unwraps the wrap **response container** (`{isUpdate, message:\"\u003Cjson>\"}`) — i.e. calls an `extractResponse`-style helper (parse `result.data` + probe `message`), not a bare single `JSON.parse`. A single-parse-only handler lands on the container and fails every call with `UNEXPECTED_PAYLOAD` though native succeeded ([format §2](..\u002F..\u002Fshared\u002Fppmplugin-format.md)). | WARNING |\n| `src-promise-always-settled` | each `@ReactMethod` \u002F `RCT_EXPORT_METHOD` that takes a `Promise` \u002F resolver+rejecter contains at least one `promise.resolve` \u002F `promise.reject` (or `resolve(...)` \u002F `reject(...)`) on a reachable path. A Promise-taking method that can return without settling leaves the maker with a **hung control** and no code\u002Fmessage. | WARNING |\n| `src-listener-released` | each `register*` \u002F `add*Listener` \u002F `observe` \u002F acquired manager in the module has a matching release (`unregister*` \u002F `remove*Listener` \u002F `.close()` \u002F `.release()`) in `invalidate()` \u002F `onCatalystInstanceDestroy()` \u002F teardown. A registered callback with no release leaks and can fire into a dead module. | WARNING |\n\n---\n\n## Step 8 — Report + route fixes\n\nPrint the verdict as a visible fenced block (shared-instructions §9.1). Prefix each severity per `shared-instructions.md §9.3` — ? CRITICAL, ? WARNING, ? INFO, ? READY — keeping the word so meaning survives a no-emoji terminal:\n\n```\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n audit-ppmplugin — pen-input.ppmplugin\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n Path: ppmplugin\u002Fpen-input.ppmplugin   (v0.1.4, Android-only, 3.4 KB)\n ? CRITICAL: 0   ? WARNING: 1   ? INFO: 0   SKIPPED: 4 (source not reachable)\n\n ? [WARNING] zip-no-stray-files: .DS_Store present in android\u002F\n   Fix: re-run \u002Fassemble-ppmplugin (it excludes dotfiles).\n\n ⓘ The upload service may apply additional name checks not represented locally.\n ? ✓ READY TO UPLOAD\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n```\n\n(When there **are** CRITICALs, the verdict line reads ? and the last line is `? ✗ NOT READY — fix the CRITICAL findings above`.)\n\nEach non-clean finding carries **`Fix:`** with the concrete next action, routed to the owning skill (never a zip patch):\n- Manifest rule \u002F leakage field → \"edit + re-run `\u002Fgenerate-ppmplugin-manifest`, then `\u002Fassemble-ppmplugin`.\"\n- DEX leakage \u002F missing class → \"the Android source pulled in SDK symbols — strip the import; re-run `\u002Fbuild-android-binary` then `\u002Fassemble-ppmplugin`.\"\n- Zip stray-file \u002F structure → \"re-run `\u002Fassemble-ppmplugin`.\"\n\nThen surface next steps via `AskUserQuestion` (shared-instructions §9.1):\n- **Clean (0 CRITICAL):** offer **Re-run \u002Fgenerate-ppmplugin-manifest** (only if a WARNING points there) \u002F **Stay — I'll upload manually** (Stage 3 is not yet a skill). When the user picks a `Run \u002F…` option, invoke it via the Skill tool in the same turn (§8 + §9.1 \"execute, don't describe\").\n- **Dirty (≥1 CRITICAL):** offer to jump to the owning skill of the first CRITICAL — **Run \u002Fgenerate-ppmplugin-manifest** or **Run \u002Fbuild-android-binary** — then re-assemble + re-audit. Invoke on selection.\n\nUpdate the `## ppmplugin (third-party controls)` block in `.extension-state.md`: `Audit: \u003Cname>.ppmplugin \u003CISO timestamp> — \u003CCRITICAL>C\u002F\u003CWARNING>W (READY | BLOCKED)`.\n\nReturn code:\n- `DONE` — 0 CRITICAL (clean, or warnings only ⇒ note them). The bundle passes local verification.\n- `BLOCKED: audit found \u003CN> CRITICAL — see findings` — refuse the READY verdict; do not claim it's uploadable.\n",{"name":5,"model":59,"description":7,"allowed-tools":60},"sonnet","Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill","main","0a55a88fa2855404029d1e5450faf92878baf763","plugins\u002Fpower-apps-mobile-extension\u002Fskills\u002Faudit-ppmplugin",232,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills","https:\u002F\u002Fmicrosoft.github.io\u002Fpower-platform-skills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 21:46:39",{"source":9,"skillName":5,"commands":72,"prompt":82,"zipAvailable":83},[73,76,79],{"tool":74,"command":75},"npx","npx skills add microsoft\u002Fpower-platform-skills --skill audit-ppmplugin",{"tool":77,"command":78},"bunx","bunx skills add microsoft\u002Fpower-platform-skills --skill audit-ppmplugin",{"tool":80,"command":81},"pnpm","pnpm dlx skills add microsoft\u002Fpower-platform-skills --skill audit-ppmplugin","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-apps-mobile-extension\u002Fskills\u002Faudit-ppmplugin\u002FSKILL.md",true,[],[86,94,122,148,172,190],{"skillNo":87,"name":88,"nameZh":17,"description":89,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":93},"01M78JN2BFRRV1J54Q6WKZQ08D","compare-site-configurations","Compare Power Pages site configurations between two environments, such as dev, test and production, or between a local download and the live site, and explain which differences change site behavior. Use when a site works in one environment but not another (for example, works in dev but fails in test), to check configuration drift before promoting or deploying, or to see what changed between two sites. Produces a shareable HTML report and a JSON file that VS Code can import.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fcompare-site-configurations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":95,"name":96,"nameZh":97,"description":98,"descriptionZh":99,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":100,"categories":101,"keywords":108,"publishedAt":54},"01M699WVHX0XN59EPBTTPEKYPG","setup","Process Intelligence 配置与登录","Use when Process Intelligence needs building, explicit cloud\u002Faccount\u002Fenvironment configuration, sign-in, connection diagnostics, or recovery from an authentication error.","当 Process Intelligence 需要搭建、显式的云\u002F账户\u002F环境配置、登录、连接诊断，或从认证错误中恢复时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fsetup\u002FSKILL.md",[102,105],{"categoryNo":103,"categoryName":104,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":106,"categoryName":107,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理",[96,109,110,111,112,113,114,115,116,117,49,118,119,120,48,121],"configuration","diagnostics","error","environment","cloud","when","connection","authentication","use","recovery","process","sign","intelligence",{"skillNo":123,"name":124,"nameZh":125,"description":126,"descriptionZh":127,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":128,"categories":129,"keywords":136,"publishedAt":54},"01M699WSR9EX55YY1WD9J22FEG","report-issue","流程智能问题报告撰写","Use when the user wants a Process Intelligence bug-report draft or support summary for a failed operation.","当用户需要针对失败操作起草流程智能（Process Intelligence）缺陷报告或支持摘要时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Freport-issue\u002FSKILL.md",[130,133],{"categoryNo":131,"categoryName":132,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5CX980XNXCJKQF70BY","数据分析师",{"categoryNo":134,"categoryName":135,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRSRYQ3M8N5063NNQPF2B1","调试与故障排查",[137,138,139,140,117,114,141,142,119,143,121,144,145,146,147],"issue","report","report issue","bug-report","operation","draft","bug","summary","user","for","support",{"skillNo":149,"name":150,"nameZh":151,"description":152,"descriptionZh":153,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":154,"categories":155,"keywords":160,"publishedAt":54},"01M699WR26YQ9Q21KE6MJF5B2G","investigate-process","流程挖掘问题调查","Use when a broad Process Mining business question, observed pattern or competing explanation needs investigation across analytical perspectives.","当需要从多个分析视角调查宽泛的流程挖掘（Process Mining）业务问题、观察到的模式或相互竞争的解释时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Finvestigate-process\u002FSKILL.md",[156,159],{"categoryNo":157,"categoryName":158,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQGD4CMBM6B4PWSM1NXGT9","数据分析与报告",{"categoryNo":131,"categoryName":132,"taxonomyType":23,"taxonomyTypeDesc":24},[161,119,162,163,117,164,165,114,166,167,168,48,169,170,171],"investigate","investigate process","question","process mining","business","across","perspectives","mining","pattern","investigation","analytical",{"skillNo":173,"name":174,"nameZh":175,"description":176,"descriptionZh":177,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":178,"categories":179,"keywords":182,"publishedAt":54},"01M699WP9SDG5ZR12P8VYNXKTN","derive-metric","派生指标计算","Use when a requested measure is missing, a saved custom metric needs reuse, or an ephemeral formula or derived scalar is needed.","当所需的度量指标缺失、需要复用已保存的自定义指标，或需要临时公式或派生标量时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fderive-metric\u002FSKILL.md",[180,181],{"categoryNo":157,"categoryName":158,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":131,"categoryName":132,"taxonomyType":23,"taxonomyTypeDesc":24},[183,184,185,186,187,188,117,114,189,48],"metric","derive metric","missing","formula","custom","reuse","saved",{"skillNo":191,"name":192,"nameZh":193,"description":194,"descriptionZh":195,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":196,"categories":197,"keywords":200,"publishedAt":54},"01M699WMG5R8P6SMTDAS1TKF9E","compare-cohorts","流程队列对比分析","Use when comparing process cohorts, departments, periods or before-and-after results under matched definitions.","用于在统一的定义下比较流程队列（cohort）、部门、时间段或前后结果。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fcompare-cohorts\u002FSKILL.md",[198,199],{"categoryNo":157,"categoryName":158,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":131,"categoryName":132,"taxonomyType":23,"taxonomyTypeDesc":24},[201,202,117,114,203,119,48],"compare","compare cohorts","results"]