Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
03d2eaf
feat(flutter): identify Dart snapshot builds by pure APK parsing
Oct 10, 2026
2945f50
feat(flutter): inspect Dart AOT snapshots through the ELF symbol table
Oct 10, 2026
ddf1269
fix(flutter): own snapshots, bound image reads, and preserve cancella…
Oct 10, 2026
349b212
docs(flutter): cover the Italian README with the Flutter row
Oct 10, 2026
b8cbea9
fix(flutter): make the ABI pattern portable for v-mode validators
Oct 10, 2026
e12bfbf
refactor(flutter): reuse shared harnesses and deduplicate the vertical
Oct 10, 2026
2207cc6
fix(flutter): address review findings from real-app verification
Oct 11, 2026
93db928
fix(flutter): address the Codex review findings
Oct 11, 2026
eeb56f9
fix(flutter): address the second Codex review round
Oct 11, 2026
87ac338
fix(flutter): address the third Codex review round
Oct 11, 2026
24d61ec
fix(flutter): address rounds three and four of the Codex review
Oct 11, 2026
802bb9b
fix(flutter): address the fifth Codex review round
Oct 11, 2026
9603ecb
fix(flutter): address the sixth Codex review round
Oct 11, 2026
ef79672
fix(flutter): address the seventh Codex review round
Oct 11, 2026
8d9fd5b
fix(flutter): address the eighth Codex review round
Oct 11, 2026
dbdd7fc
fix(flutter): harden streaming, sizes, and cancellation after self-re…
Oct 11, 2026
c6e7325
fix(flutter): require structurally parseable ELF headers for complete…
Oct 11, 2026
cf18c8c
fix(flutter): validate ELF and snapshot coverage
Oct 11, 2026
61394b6
fix(flutter): resolve review findings and CI effect checks
Oct 11, 2026
248ce4c
chore(flutter): resolve upstream effects-audit conflict
Oct 11, 2026
8b88190
chore: merge main into Flutter analysis branch
morluto Oct 12, 2026
34e764d
fix(flutter): unify artifact ownership and bound ELF evidence
morluto Oct 12, 2026
98707b4
chore: merge latest main into Flutter analysis branch
morluto Oct 12, 2026
9089b98
fix(flutter): preserve ELF provenance and partial coverage
morluto Oct 12, 2026
ccfaec0
chore: merge latest main after documentation updates
morluto Oct 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(flutter): unify artifact ownership and bound ELF evidence
  • Loading branch information
morluto committed Oct 12, 2026
commit 34e764db1f6cafdd336be3e4682a5ee2c2e2aee8
25 changes: 19 additions & 6 deletions docs/flutter-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,26 @@ ABIs alphabetically).
provider-owned, read-only snapshot before digesting and parsing, so a
concurrently modified original cannot mix into one observation; failed
reader closure and snapshot cleanup are retained and retried on `close()`.
The snapshot is removed only after its reader closes successfully.
The snapshot is removed only after all owned readers and file descriptors
close successfully. Copying pins one admitted descriptor and compares its
identity, size, mode and timestamps after the copy.
- **Bounded reads.** APK snapshots are bounded at 2 GiB, including while
copying. Identification permits 768 MiB of cumulative library extraction;
declared sizes are checked before extraction. Library reads are bounded at 256 MiB each and ZIP
metadata at 8 MiB; the AOT image buffer is allocated at exactly the
declared size before reading. Exceeded budgets report
`resource_constraint`.
- **Metadata and candidate capacity.** Both operations refuse duplicate
relevant library paths. Inventory is limited to 32 ABIs and 1024 bytes per
relevant library path, independently of compressed size. Identification
refuses more than 64 distinct snapshot hashes with `resource_constraint`
rather than silently dropping conflicting evidence.
- **Selected ABI.** AOT inspection applies the library budget to the selected
ABI after selection; an oversized unselected library does not block it.
Undefined dynamic-symbol imports are not treated as snapshot exports.
Section-stripped images require a bounded symbol count from `DT_HASH` or
`DT_GNU_HASH`; layouts without either are refused. Symbol names and their
terminators must fit their linked string table.
- REA performs **no hash-to-SDK lookup**: mapping the snapshot hash to a
Dart SDK release requires an external dataset and is deliberately out of
scope for this family.
Expand All @@ -106,12 +116,15 @@ ABIs alphabetically).

## Real verification

`npm run verify:flutter -- --apk PATH [--plain-apk PATH]` runs the
identification against a real Flutter APK and, optionally, a non-Flutter
APK for the negative check. Record: Flutter Gallery 2.9.2 (112 MB, three
`npm run verify:flutter -- --apk PATH [--plain-apk PATH]` runs both tools
through compiled CLI and stdio MCP, compares Evidence, and checks every ABI.
Use `--expectations scripts/fixtures/flutter-gallery-expectations.json` with
the Gallery 2.9.2 release APK to check exact per-ABI engine labels and the
snapshot hash against its pinned SHA-256. Other APKs need their own
expectations file to verify exact engine labels; otherwise that facet is
reported unverified. The optional plain APK checks negative detection. Record: Flutter Gallery 2.9.2 (112 MB, three
ABIs) — every ABI reports the same agreeing hash
`65817c30a78bb44c3dc3771876b6010a` from two snapshot sections, per-ABI
engine build-ids, no labeled Dart version (as expected for a release
engine), and the Android clang toolchain line; a plain aapt2-built APK
reports not-detected with complete coverage. Scanner goldens in the test
suite come from the same libraries.
reports not-detected with complete coverage. The suite uses self-contained synthetic ELF images and recorded scanner prefixes; it does not read private local files.
9 changes: 8 additions & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,14 @@ symbols through the dynamic symbol table on both ELF64 and ELF32 images,
validates the data-section headers, agrees with the identification hash,
and projects a string pool of 756 `package:` and 201 `dart:` URIs from the
isolate data section; a plain aapt2-built APK reports not-detected with
complete coverage. Scanner and ELF goldens come from the same libraries.
complete coverage. The suite uses self-contained synthetic ELF images and recorded scanner
prefixes, with no private local-file dependency. The verifier now compares
compiled CLI and stdio MCP Evidence on every ABI, including data-header kind
and declared lengths. Add
`--expectations scripts/fixtures/flutter-gallery-expectations.json` for the
documented Gallery APK to assert its pinned digest, hash and exact engine
labels; exact labels on other APKs remain unverified without an expectations
file.
See [Flutter build identification](flutter-analysis.md) for boundaries and
budgets.

Expand Down
24 changes: 24 additions & 0 deletions scripts/fixtures/flutter-gallery-expectations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"target_sha256": "659b5fc6a4319dfe4f117d00ad4e7ec004915ebcadcb96628797fb3544040e29",
"snapshot_hash": "65817c30a78bb44c3dc3771876b6010a",
"engines": {
"x86_64": {
"dart_version": null,
"toolchain_lines": [
"Android (5900059 based on r365631c) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290) (based on LLVM 9.0.8svn)"
]
},
"armeabi-v7a": {
"dart_version": null,
"toolchain_lines": [
"Android (5900059 based on r365631c) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290) (based on LLVM 9.0.8svn)"
]
},
"arm64-v8a": {
"dart_version": null,
"toolchain_lines": [
"Android (5900059 based on r365631c) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290) (based on LLVM 9.0.8svn)"
]
}
}
}
Loading
Loading