flutter/packages/flutter_tools/test/general.shard
Chris Bracken 68f375fe38
[macOS] support secure restorable state by default (#151605)
By default, Flutter apps only do default AppKit app serialisation of
Window location etc. and by default, state serialisation in AppKit apps
is compatible with `NSSecureCoding`. AppKit apps generated since Xcode
13.2 include this method in the app delegate generated by the default
app template.

Background
==========

This method was added to opt into having [de]serialization require a
coder implementing the `NSSecureCoding` protocol. Apple wasn't able to
force this across the board, because `NSSecureCoding` limits certain
behaviours during deserialisation, which some third-party apps have have
previously relied on.

Specific background on the sorts of vulnerabilities that
`NSSecureCoding` was designed to prevent are described in the
`NSSecureCoding` documentation:

https://developer.apple.com/documentation/foundation/nssecurecoding?language=objc

A demonstration of a root privilege escalation and SIP bypass
vulnerability is described in the following blog post:
https://sector7.computest.nl/post/2022-08-process-injection-breaking-all-macos-security-layers-with-a-single-vulnerability/

Fixes: https://github.com/flutter/flutter/issues/150062

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2024-07-12 11:08:26 -07:00
..
android Reland "Upgrade template Gradle, App AGP, Module AGP, and Kotlin versions, and tests"... but no longer upgrade module AGP version (#151433) 2024-07-10 21:37:26 +00:00
base [tool] Remove some usages of deprecated usage package (#151359) 2024-07-09 18:17:21 +00:00
build_system Have flutter.js load local canvaskit instead of the CDN when appropriate (#150806) 2024-06-27 18:44:04 +00:00
commands Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
custom_devices provide command to FakeCommand::onRun (#142206) 2024-01-25 07:51:25 +00:00
dap [flutter_tools] Update the mapping for the Dart SDK internal URI (#151170) 2024-07-02 22:56:17 +00:00
dart Remove message about pub cache that is not actionable (#143357) 2024-02-13 11:15:15 -08:00
drive Add a --print-dtd flag to print the DTD address served by DevTools server (#144272) 2024-03-25 13:04:18 -07:00
fuchsia Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
intellij Switch to more reliable flutter.dev link destinations in the tool (#150587) 2024-06-26 23:30:39 +00:00
ios [tool] Remove some usages of deprecated usage package (#151359) 2024-07-09 18:17:21 +00:00
isolated [native_assets] Stop running link hooks in JIT mode (#151534) 2024-07-12 06:44:23 +00:00
linux Reland "Move native assets to isolated/ directory" (#143055) 2024-02-08 17:49:48 +00:00
macos [macOS] support secure restorable state by default (#151605) 2024-07-12 11:08:26 -07:00
migrations Add Swift Package Manager as new opt-in feature for iOS and macOS (#146256) 2024-04-18 21:12:36 +00:00
proxied_devices Avoid forwarding the data after socket is disconnected. (#146665) 2024-04-12 21:45:32 +00:00
reporting [flutter_tools] fix instructions to disable CLI animations (#139094) 2023-11-27 22:00:50 +00:00
runner Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
test Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
tester Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
vscode Added support for vscode and vscode-insiders installed via Flatpak (#137123) 2023-12-04 21:59:53 +00:00
web Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
windows Convert ProjectMigration and ProjectMigrator to be async (#146537) 2024-04-10 16:26:19 +00:00
analytics_test.dart Flutter preview device (#135639) 2023-10-18 00:27:54 +00:00
android_plugin_test.dart
application_package_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
args_test.dart [flutter_tools] Precache after channel switch (#118129) 2023-06-09 01:46:24 +00:00
artifact_updater_test.dart Enable unreachable_from_main lint - it is stable now!!1 (#129854) 2023-07-06 00:09:01 +00:00
artifacts_test.dart Reland "Add FlutterMacOS.xcframework artifact (#143244)" (#144275) 2024-02-28 20:09:54 +00:00
asset_bundle_flavors_test.dart Catch file system exceptions when trying to parse user-provided asset file paths (#142214) 2024-01-29 18:43:57 +00:00
asset_bundle_package_fonts_test.dart rename generated asset manifest file back to AssetManifest.bin (from AssetManifest.smcbin) (#128529) 2023-06-09 21:20:50 +00:00
asset_bundle_package_test.dart rename generated asset manifest file back to AssetManifest.bin (from AssetManifest.smcbin) (#128529) 2023-06-09 21:20:50 +00:00
asset_bundle_test.dart Reland "Expose build mode in environment of asset transformer processes" (#144958) 2024-04-22 15:46:13 +00:00
asset_bundle_variant_test.dart refactor asset bundle code to not depend on the global Cache.flutterRoot (#142277) 2024-01-26 22:01:26 +00:00
asset_test.dart refactor asset bundle code to not depend on the global Cache.flutterRoot (#142277) 2024-01-26 22:01:26 +00:00
base_utils_test.dart Fixed race condition in PollingDeviceDiscovery. (#145506) 2024-03-21 22:37:08 +00:00
build_info_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
bundle_builder_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
cache_test.dart Use ErrorHandlingFileSystem.deleteIfExists when deleting .plugin_symlinks (#151073) 2024-07-02 18:46:22 +00:00
channel_test.dart [flutter_tools] Suppress git output in flutter channel (#128475) 2023-06-13 19:28:06 +00:00
cmake_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
cold_test.dart Avoid depending on files from build_system/targets other than from top level entrypoints in flutter_tools. (#142760) 2024-02-02 18:23:08 +00:00
common_test.dart
compile_batch_test.dart Remove toString() overrides in dart:ui/package:flutter in profile/release mode on wasm/vm targets (#144763) 2024-03-08 09:55:02 +01:00
compile_expression_test.dart Roll engine, patch expression evaluation (#128255) 2023-06-07 19:48:42 +00:00
compile_incremental_test.dart Reland "Switch flutter_tools to run frontend server from AOT snapshot" (#136282) 2023-10-11 16:15:26 -04:00
compile_test.dart Remove toString() overrides in dart:ui/package:flutter in profile/release mode on wasm/vm targets (#144763) 2024-03-08 09:55:02 +01:00
config_test.dart [flutter_tools] fix Cannot delete file ENOENT from fuchsia_asset_builder (#119867) 2023-02-03 19:24:41 +00:00
convert_test.dart
coverage_collector_test.dart Fix implementation imports outside of lib (#143594) 2024-02-16 22:38:10 +00:00
crash_reporting_test.dart Swap crash reporting with unified analytics (#148525) 2024-05-18 01:30:13 +00:00
create_config_test.dart Suggest a potential valid name for the flutter project when using flutter create (#130900) 2023-07-21 19:09:25 +00:00
daemon_test.dart [flutter_tools] Fix missing stack trace from daemon (#144113) 2024-02-27 08:39:49 +00:00
dart_plugin_test.dart feat: Support overriding native endorsed plugins (#137040) 2024-07-11 18:54:01 +00:00
desktop_device_test.dart Disable sandboxing for macOS apps and tests in CI (#149618) 2024-06-04 21:51:19 +00:00
devfs_test.dart Reland "Expose build mode in environment of asset transformer processes" (#144958) 2024-04-22 15:46:13 +00:00
device_port_forwarder_test.dart
device_test.dart Fixed race condition in PollingDeviceDiscovery. (#145506) 2024-03-21 22:37:08 +00:00
device_vm_service_discovery_for_attach_test.dart Support mdns when attaching to proxied devices. (#146021) 2024-04-09 20:00:21 +00:00
devtools_launcher_test.dart Add a --print-dtd flag to print the DTD address served by DevTools server (#144272) 2024-03-25 13:04:18 -07:00
emulator_test.dart Fixed few typos (#147087) 2024-04-22 16:49:19 +00:00
fake_process_manager_test.dart [tool] Fix stdin.flush calls on processes started by FakeProcessManager (#151183) 2024-07-02 20:40:06 +00:00
features_test.dart Add Swift Package Manager as new opt-in feature for iOS and macOS (#146256) 2024-04-18 21:12:36 +00:00
flutter_manifest_assets_test.dart add parsing of assets transformer declarations in pubspec.yaml (#143557) 2024-02-16 22:24:59 +00:00
flutter_manifest_assets_transformers_test.dart add parsing of assets transformer declarations in pubspec.yaml (#143557) 2024-02-16 22:24:59 +00:00
flutter_manifest_test.dart add default-flavor field to flutter pubspec, which will be used as the flavor in flutter build/run if --flavor is not provided (#147968) 2024-05-22 05:11:24 +00:00
flutter_platform_test.dart Write the package config location to the test bootstrap. (#150440) 2024-07-09 09:36:19 -07:00
flutter_project_metadata_test.dart Native assets support for MacOS and iOS (#130494) 2023-09-10 08:07:13 +00:00
flutter_tester_device_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
flutter_validator_test.dart Switch to more reliable flutter.dev link destinations in the tool (#150587) 2024-06-26 23:30:39 +00:00
generate_localizations_test.dart update generated localized message files in the stocks test app (#148741) 2024-06-03 18:08:19 +00:00
github_template_test.dart Added missing code block language in docs (#147481) 2024-05-01 14:44:27 +00:00
hot_shared.dart remove unused firstBuildTime parameter in DevFS::update (#144576) 2024-03-05 19:14:48 +00:00
hot_test.dart Bump dependencies in Flutter (#147546) 2024-04-29 15:53:25 -07:00
integration_test_device_test.dart Adds vmservices for getting iOS build options (#121736) 2023-03-06 22:37:55 +00:00
license_collector_test.dart
mdns_discovery_test.dart Clean up lint ignores (#144229) 2024-02-27 23:21:03 +00:00
message_parser_test.dart Relax syntax for gen-l10n (#130736) 2023-07-18 13:59:48 -07:00
persistent_tool_state_test.dart
plugin_parsing_test.dart
plugins_test.dart feat: Support overriding native endorsed plugins (#137040) 2024-07-11 18:54:01 +00:00
preview_device_test.dart [flutter_tools] Ensure flutter daemon clients can detect preview device (#140112) 2023-12-21 19:01:16 +00:00
project_file_invalidator_test.dart
project_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
project_validator_result_test.dart
protocol_discovery_test.dart Reland "Remove references to Observatory (#118577)" (#121606) 2023-02-28 11:57:04 -05:00
pub_dependencies_project_validator_test.dart
resident_devtools_handler_test.dart Add a --print-dtd flag to print the DTD address served by DevTools server (#144272) 2024-03-25 13:04:18 -07:00
resident_runner_helpers.dart Bump dependencies in Flutter (#147546) 2024-04-29 15:53:25 -07:00
resident_runner_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
resident_web_runner_cold_test.dart Bump dependencies in Flutter (#147546) 2024-04-29 15:53:25 -07:00
resident_web_runner_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
run_hot_test.dart Clean up lint ignores (#144229) 2024-02-27 23:21:03 +00:00
template_test.dart Locate the template directory using a TemplatePathProvider. (#132156) 2023-08-08 21:43:00 +00:00
terminal_handler_test.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
testbed_test.dart
time_test.dart
tracing_test.dart [flutter_tools] Catch rpc error in render frame with raster stats (#144190) 2024-02-28 18:54:18 +00:00
unified_analytics_test.dart Bump dependencies in Flutter (#147546) 2024-04-29 15:53:25 -07:00
update_packages_test.dart Allow explicit exclusion of packages from pinned packages in flutter update-packages --force-update (#147679) 2024-05-02 01:16:54 +00:00
utils_test.dart Reland #128236 "Improve build output for all platforms" (#145495) 2024-03-23 12:05:21 +00:00
version_test.dart [flutter_tools] Fix "FormatException: Invalid date format" during version freshness check (#134088) 2023-09-06 17:22:13 +00:00
vmservice_test.dart [tool] remove some temporary printTrace calls (#151074) 2024-07-02 00:53:19 +00:00
web_template_test.dart Flutter Web Bootstrapping Improvements (#144434) 2024-03-12 22:41:26 +00:00
windows_version_validator_test.dart Add check for Bank of Brazil security module to Windows Flutter Doctor validators (#141135) 2024-01-18 12:32:49 -05:00
xcode_backend_test.dart Improve build time when using SwiftPM (#150052) 2024-06-12 21:16:07 +00:00
xcode_project_test.dart Add Swift Package Manager as new opt-in feature for iOS and macOS (#146256) 2024-04-18 21:12:36 +00:00