You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MOB-39: plugins can contribute AndroidManifest components + res files (#32)
* MOB-39: plugins can contribute AndroidManifest components + res files
Adds two optional android: manifest keys:
- manifest_application_snippets: XML fragments spliced into the app's
<application> (a <service>/<receiver>/<provider>), idempotent per android:name.
- res_files: plugin-relative paths copied into the app res/ tree at their
derived res/<type>/<file> destination.
Closes the gap that forced a plugin needing a manifest component + resource
(e.g. mob_nfc's HCE HostApduService + apduservice.xml) to make it a manual
host_requirement.
- Merge: android_manifest_snippets/1 + android_res_files/1 gatherers.
- Validator: both classified in the conflict surface — duplicate component
names / res destinations across plugins are build errors.
- Manifest: schema validation (lists of strings; res_files need a res segment).
- NativeBuild: splice components before </application> + copy res files, both
ledger-pruned like bridge_kt; build-time res-dest collision guard.
Tests across merge/manifest/conflict_surface/native_build (307 in those files).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* MOB-39: harden res_files — path-traversal guard, host-clobber guard, sign bytes
Addresses review of #32:
- F1 (blocker): res_files path traversal. Manifest validation now rejects a
'..' segment, and native_build's copy resolves via __res_target__/2 which
Path.expands and requires the destination stay under the app res/ dir — so a
'..'-bearing path can't make File.cp! write plugin bytes anywhere on the host.
- F2: host-resource clobber + prune-deletes-host-file. The copy now refuses to
overwrite a file this build didn't write on a prior run (ledger-tracked), so a
plugin can't replace a host-owned resource — which also stops the prune from
ever deleting a host file.
- F3: res_files bytes are now in the signed payload (Sign.compute_file_hashes),
same as bridge_kt/jni_source — copied resource bytes are tamper-evident.
Tests: '..' rejection, __res_target__ containment (incl. res-vs-resx boundary),
res_files signing. 322 in the affected files; credo --strict clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments