Skip to content

修复 Arc 无标题 iCloud 密码弹窗的安全自动填入 - #1

Closed
hellosky0 wants to merge 23 commits into
mainfrom
codex/arc-diagnostics-impl
Closed

修复 Arc 无标题 iCloud 密码弹窗的安全自动填入#1
hellosky0 wants to merge 23 commits into
mainfrom
codex/arc-diagnostics-impl

Conversation

@hellosky0

Copy link
Copy Markdown
Owner

变更内容

  • 新增浏览器诊断,展示经脱敏的 AX URL 来源、窗口结构和命中结论。
  • 支持 Arc 无标题授权弹窗,但仅在 AX 属性 URL 精确匹配扩展 popup、授权上下文匹配且存在至少 6 个输入框时自动填入。
  • 诊断仅将 AX 属性中精确匹配的 popup URL 视为可信,页面文字中的相似链接不会绕过标题路径。

根因

Arc 的 iCloud 密码扩展 popup 没有 CG/AX 标题,旧逻辑在标题匹配阶段提前退出,因此不会进入 AX 验证和填入流程。

安全边界

  • 未使用窗口尺寸、Arc bundle ID 或页面文本作为放行条件。
  • 原始扩展 URL 只在当前 AX 遍历中使用;诊断输出仅保留脱敏的 scheme 与 path。
  • 真正被抬起和填入的是通过 AX 条件验证的窗口;CG 身份仅用于重试和去重。

验证

  • Test Suite 'All tests' started at 2026-08-04 15:41:10.705.
    Test Suite 'ApplePasswordBridgePackageTests.xctest' started at 2026-08-04 15:41:10.709.
    Test Suite 'ApplicationRulesTests' started at 2026-08-04 15:41:10.709.
    Test Case '-[ApplePasswordBridgeTests.ApplicationRulesTests testAllowlistOnlyPermitsListedApplications]' started.
    Test Case '-[ApplePasswordBridgeTests.ApplicationRulesTests testAllowlistOnlyPermitsListedApplications]' passed (0.002 seconds).
    Test Case '-[ApplePasswordBridgeTests.ApplicationRulesTests testDenylistAlwaysExcludesBridgeAndCodeSources]' started.
    Test Case '-[ApplePasswordBridgeTests.ApplicationRulesTests testDenylistAlwaysExcludesBridgeAndCodeSources]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.ApplicationRulesTests testDenylistPermitsUnlistedApplications]' started.
    Test Case '-[ApplePasswordBridgeTests.ApplicationRulesTests testDenylistPermitsUnlistedApplications]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.ApplicationRulesTests testFillSpeedsAreOrderedFastestToSlowest]' started.
    Test Case '-[ApplePasswordBridgeTests.ApplicationRulesTests testFillSpeedsAreOrderedFastestToSlowest]' passed (0.000 seconds).
    Test Suite 'ApplicationRulesTests' passed at 2026-08-04 15:41:10.712.
    Executed 4 tests, with 0 failures (0 unexpected) in 0.003 (0.003) seconds
    Test Suite 'BrowserDiagnosticsTests' started at 2026-08-04 15:41:10.712.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_boolean_normalizer_accepts_cfboolean_and_nsnumber]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_boolean_normalizer_accepts_cfboolean_and_nsnumber]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_extension_url_without_popup_path_does_not_override_title_mismatch]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_extension_url_without_popup_path_does_not_override_title_mismatch]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_observation_extracts_redacted_extension_and_roles]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_observation_extracts_redacted_extension_and_roles]' passed (0.001 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_observation_reports_window_structure_and_prefers_diagnostic_url]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_observation_reports_window_structure_and_prefers_diagnostic_url]' passed (0.001 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_url_normalizer_accepts_string_url_nsurl_and_cfurl]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_accessibility_url_normalizer_accepts_string_url_nsurl_and_cfurl]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_all_conclusions_have_chinese_summary]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_all_conclusions_have_chinese_summary]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_arc_allowlist_policy_permits_arc]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_arc_allowlist_policy_permits_arc]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_bridge_model_runs_diagnostics_and_replaces_report]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_bridge_model_runs_diagnostics_and_replaces_report]' passed (0.032 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_browser_extension_popup_url_helper]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_browser_extension_popup_url_helper]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_cancelling_diagnostics_observes_cancellation_and_does_not_publish_report]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_cancelling_diagnostics_observes_cancellation_and_does_not_publish_report]' passed (0.002 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_code_parser_terms_support_chinese_and_english_without_changing_authorization_behavior]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_code_parser_terms_support_chinese_and_english_without_changing_authorization_behavior]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_conclusions_follow_earliest_failure_boundary]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_conclusions_follow_earliest_failure_boundary]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_concurrent_diagnostics_request_is_ignored_until_first_finishes]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_concurrent_diagnostics_request_is_ignored_until_first_finishes]' passed (0.003 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_make_window_observation_parses_number_pid_bounds_and_redacts_title]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_make_window_observation_parses_number_pid_bounds_and_redacts_title]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_make_window_observation_rejects_pid_mismatch]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_make_window_observation_rejects_pid_mismatch]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_matching_accessibility_window_is_not_shadowed_by_first_mismatch]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_matching_accessibility_window_is_not_shadowed_by_first_mismatch]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_observation_description_excludes_raw_combined_body]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_observation_description_excludes_raw_combined_body]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_observation_initializers_redact_sensitive_fields_at_capture]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_observation_initializers_redact_sensitive_fields_at_capture]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_origin_gated_candidate_selection_marks_untitled_fallback]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_origin_gated_candidate_selection_marks_untitled_fallback]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_origin_gated_candidate_selection_prefers_titled_window]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_origin_gated_candidate_selection_prefers_titled_window]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_origin_gated_target_requires_ax_url_context_and_six_fields]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_origin_gated_target_requires_ax_url_context_and_six_fields]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_permitted_running_application_succeeds_among_other_application_states]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_permitted_running_application_succeeds_among_other_application_states]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_permitted_window_title_mismatch_precedes_matching_accessibility_input]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_permitted_window_title_mismatch_precedes_matching_accessibility_input]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_popup_signature_and_authorization_context_are_independent]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_popup_signature_and_authorization_context_are_independent]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_redactor_masks_codes_numbers_extensions_and_titles]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_redactor_masks_codes_numbers_extensions_and_titles]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_report_plain_text_is_deterministic_and_redacted]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_report_plain_text_is_deterministic_and_redacted]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_report_plain_text_sorts_accessibility_windows_by_all_rendered_fields]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_report_plain_text_sorts_accessibility_windows_by_all_rendered_fields]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_running_unpermitted_match_is_rejected_before_window_and_accessibility_checks]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_running_unpermitted_match_is_rejected_before_window_and_accessibility_checks]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_supported_input_count_only_counts_text_roles]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_supported_input_count_only_counts_text_roles]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_text_discovered_extension_url_does_not_override_mismatched_window_title]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_text_discovered_extension_url_does_not_override_mismatched_window_title]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_title_candidate_retains_legacy_target_acceptance]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_title_candidate_retains_legacy_target_acceptance]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_trusted_accessibility_origin_overrides_mismatched_window_title]' started.
    Test Case '-[ApplePasswordBridgeTests.BrowserDiagnosticsTests test_trusted_accessibility_origin_overrides_mismatched_window_title]' passed (0.000 seconds).
    Test Suite 'BrowserDiagnosticsTests' passed at 2026-08-04 15:41:10.758.
    Executed 32 tests, with 0 failures (0 unexpected) in 0.044 (0.046) seconds
    Test Suite 'CodeParserTests' started at 2026-08-04 15:41:10.758.
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testCapturedCodeExpires]' started.
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testCapturedCodeExpires]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testExtractsSeparatedDigits]' started.
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testExtractsSeparatedDigits]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testExtractsSpacedVerificationCode]' started.
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testExtractsSpacedVerificationCode]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testFirefoxContextRequiresExtensionIdentity]' started.
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testFirefoxContextRequiresExtensionIdentity]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testFirefoxPopupUsesStableTitleAndURLSignature]' started.
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testFirefoxPopupUsesStableTitleAndURLSignature]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testICloudPasswordWindowTitleMatching]' started.
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testICloudPasswordWindowTitleMatching]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testRejectsLongerNumbers]' started.
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testRejectsLongerNumbers]' passed (0.000 seconds).
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testRequiresAuthorizationContext]' started.
    Test Case '-[ApplePasswordBridgeTests.CodeParserTests testRequiresAuthorizationContext]' passed (0.000 seconds).
    Test Suite 'CodeParserTests' passed at 2026-08-04 15:41:10.759.
    Executed 8 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
    Test Suite 'ApplePasswordBridgePackageTests.xctest' passed at 2026-08-04 15:41:10.759.
    Executed 44 tests, with 0 failures (0 unexpected) in 0.047 (0.051) seconds
    Test Suite 'All tests' passed at 2026-08-04 15:41:10.759.
    Executed 44 tests, with 0 failures (0 unexpected) in 0.047 (0.054) seconds
    ◇ Test run started.
    ↳ Testing Library Version: 1902
    ↳ Target Platform: arm64e-apple-macos14.0
    ✔ Test run with 0 tests in 0 suites passed after 0.001 seconds.:44 项测试通过。
  • release 构建通过。
  • 应用及 ZIP 解压副本均通过 。

@hellosky0

Copy link
Copy Markdown
Owner Author

已改为向上游 Anti2077/ApplePasswordBridge 提交 PR:Anti2077#1。保留本分支作为上游 PR 的来源。

@hellosky0 hellosky0 closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant