Files
rea/docs/user-visible-errors.csv
morluto 89c1dd3c32 fix(errors): refuse malformed target bytes as a target, not invalid input (#14195)
* fix(errors): refuse malformed target bytes as a target, not invalid input

parseFailureAnalysisError is the shared owner that turns a byte-format
parser's ParseFailure into a public refusal. It mapped malformed and
truncated bytes to an AnalysisInputError on the path field. The envelope
then reported invalid_request, with inspect_input_contract recovery and
"correct the listed fields". The arguments were valid; the target bytes
were the problem. Readers that wrap the ParseFailureError in an
ArtifactReaderFailure, and ArtifactOperationError reason=malformed, were
classified the same way.

Add AnalysisMalformedTargetError. It keeps the parser's kind, format,
detail, offset and field, and projects as unsupported_target with
details.format_failure. Its recovery is to choose another operation or a
well-formed copy of the target. Route both parser entry points through it
and reclassify ArtifactOperationError reason=malformed. Argument and
selection errors (missing files, directories, symlinks, JSON arguments)
stay invalid_request.

Fixes #14170

* docs(maven): describe duplicate variant names as malformed metadata

Duplicate Gradle variant names go through malformedInput, which now
reports unsupported_target with details.format_failure: malformed.
Point the earlier statement at that section instead of the old
invalid_format code.

* test(errors): expect malformed-target refusals from CLI byte-format readers

Truncated IPS, ELF, PE and shortcut bytes now project as unsupported_target with format_failure=malformed. Update the CLI acceptance cases that still expected invalid_request.

* fix(errors): keep a cancelled read a cancellation whatever its abort reason

projectOwnedArtifactInputFailure read the reader failure's cause without
checking the reader's own reason. A cancelled read carries the caller's
opaque abort reason as that cause, so aborting with a ParseFailureError
turned the cancellation into a non-retryable malformed-target refusal
before the shared cancellation projection ran. Only a reader whose own
reason is malformed or truncated now yields a malformed target.

The ELF dependency checkpoint cancellation test now also aborts with a
parser failure as the reason, through the public provider read.

* test(pe): expect malformed-target refusals from the PE filesystem boundaries

Short non-PE bytes now refuse the target rather than the request field.
The missing-file, directory, symlink and child-path controls keep their
caller-input expectations.

* fix(elf): refuse malformed ELF note bytes as a target, not invalid input

inspect_elf_notes shared this PR's root cause: its parser reported
structural violations as a reader "format" failure, which the shared
stable-artifact projection treats as a request-field error, so truncated
or non-ELF bytes still returned invalid_request. The parser now raises
malformed or truncated ParseFailureErrors, which the shared projection
reports as a malformed target with format_failure and format facts.

Consumers that interpreted the old reader reason now use the parser's
facts: debug-link build-id observation keys on ParseFailureError kinds,
and binary hardening drops its rewrap of note-parser format failures
into BinaryFormatFailure, which the parser's own failure supersedes.

* test(errors): own the byte readers' malformed-target projection in one CLI table

The PR repeated the same malformed -> unsupported_target mapping in a
dedicated CLI test per command and again in each provider's filesystem
boundary test. The stable-artifact parser-failure CLI table now owns it:
every byte reader it covers (now including ELF dependencies, debug link,
unwind ranges and native initializers) refuses a truncated ELF header as
a malformed target with operation, path, format_failure, retained file
identity and no argument recovery.

Removed as redundant with that table: the truncated or non-ELF/non-PE
CLI tests for ELF debug link, dependencies, unwind ranges and notes,
native initializers, and PE imports and certificates; and the
malformed-file blocks in thirteen filesystem boundary tests, which keep
their directory, symlink, missing-file and child-path controls. Format
specific refusals (a truncated IPS body, a wrong shortcut CLSID, DWARF
units) keep their own tests, as do the owner tests in
parseFailureAnalysisError and ArtifactOperationFailure.

* test(errors): expect malformed target bytes as unsupported_target in acceptance tests

The first full acceptance run of this PR found five expectations still
asserting invalid_request for target-byte failures: the timing test's
truncated ELF, a truncated DTB, duplicate Rust dependency JSON, and PE32
and PE64 load-config images without an MZ header. Assert the
unsupported_target code, with format_failure malformed where the
non-MZ PE path matches the already-updated PE imports test.
2026-11-24 00:44:40 +00:00

8.7 KiB

1tagdiscriminantcodecategoryretryable_by_default
2AnalysisProtocolErrorunreadable_outputexecution_failurefalse
3AnalysisOutputErrorunreadable_outputexecution_failurefalse
4AnalysisInputErrorinvalid_requestinvalid_inputfalse
5AnalysisAccessDeniedErroraccess_deniedunavailablefalse
6AnalysisArtifactChangedErrorartifact_changedintegrity_mismatchtrue
7AnalysisCapabilityUnavailableErrorcapability_unavailableunsupported_providerfalse
8AnalysisUnsupportedTargetErrorunsupported_targetunsupported_targetfalse
9AnalysisMalformedTargetErrorunsupported_targetunsupported_targetfalse
10AnalysisCancelledErrorcancelledcancelledtrue
11AnalysisTimeoutErrorprovider_timeouttimeouttrue
12AnalysisResourceConstraintErrorresource_constraintresource_constraintfalse
13ConfigurationErrorconfiguration_invalidinvalid_inputfalse
14NoBinaryOpenErrortarget_unavailableunavailablefalse
15EvidenceIntegrityErrorevidence_integrity_mismatchintegrity_mismatchfalse
16ProviderAdapterErrorexecution_failureexecution_failurefalse
17AnalysisCapabilityUnavailableErrorretryable=truecapability_unavailableunavailabletrue
18ArtifactOperationErrorreason=cancelledcancelledcancelledtrue
19ArtifactOperationErrorreason=malformedunsupported_targetunsupported_targetfalse
20ArtifactOperationErrorreason=truncatedtruncatedtruncatedfalse
21ArtifactOperationErrorreason=unsupportedunsupported_targetunsupported_targetfalse
22ArtifactOperationErrorreason=formatartifact_operation_failedexecution_failurefalse
23ArtifactOperationErrorreason=integrityartifact_operation_failedintegrity_mismatchfalse
24ArtifactOperationErrorreason=limittruncatedtruncatedfalse
25ArtifactOperationErrorreason=pathartifact_operation_failedexecution_failurefalse
26ArtifactOperationErrorreason=unavailableartifact_operation_failedunavailablefalse
27ArtifactOperationErrorreason=ioartifact_operation_failedexecution_failurefalse
28ArtifactOperationErrorreason=integrity; artifact identity reportedartifact_integrity_mismatchintegrity_mismatchfalse
29BinaryTargetErrorconstraint=unconstrainedtarget_unavailableunavailablefalse
30BinaryTargetErrorconstraint=unconstrained; read permission deniedaccess_deniedunavailablefalse
31BinaryTargetErrorconstraint=directory_requires_filetarget_unavailableunavailablefalse
32BinaryTargetErrorconstraint=directory_requires_file; read permission deniedaccess_deniedunavailablefalse
33BinaryTargetErrorconstraint=wasm_requires_static_inspectiontarget_unavailableunsupported_targetfalse
34BinaryTargetErrorconstraint=wasm_requires_static_inspection; read permission deniedaccess_deniedunsupported_targetfalse
35BinaryTargetErrorconstraint=file_format_rejectedtarget_unavailableunsupported_targetfalse
36BinaryTargetErrorconstraint=file_format_rejected; read permission deniedaccess_deniedunsupported_targetfalse
37BinaryTargetErrorconstraint=load_selection_rejectedinvalid_requestinvalid_inputfalse
38BinaryTargetErrorconstraint=bundle_type_unsupportedtarget_unavailableunsupported_targetfalse
39BinaryTargetErrorconstraint=bundle_type_unsupported; read permission deniedaccess_deniedunsupported_targetfalse
40BinaryTargetErrorconstraint=bundle_info_plist_decode_budget_exceededtarget_unavailableunavailablefalse
41BinaryTargetErrorconstraint=bundle_info_plist_decode_budget_exceeded; read permission deniedaccess_deniedunavailablefalse
42BinaryTargetErrorconstraint=bundle_info_plist_missingtarget_unavailableunavailablefalse
43BinaryTargetErrorconstraint=bundle_info_plist_missing; read permission deniedaccess_deniedunavailablefalse
44BinaryTargetErrorconstraint=bundle_layout_ambiguoustarget_unavailableunavailablefalse
45BinaryTargetErrorconstraint=bundle_layout_ambiguous; read permission deniedaccess_deniedunavailablefalse
46BinaryTargetErrorconstraint=bundle_executable_undeclaredtarget_unavailableunavailablefalse
47BinaryTargetErrorconstraint=bundle_executable_undeclared; read permission deniedaccess_deniedunavailablefalse
48BinaryTargetErrorconstraint=bundle_program_missingtarget_unavailableunavailablefalse
49BinaryTargetErrorconstraint=bundle_program_missing; read permission deniedaccess_deniedunavailablefalse
50BinaryTargetErrorconstraint=bundle_current_version_missingtarget_unavailableunavailablefalse
51BinaryTargetErrorconstraint=bundle_current_version_missing; read permission deniedaccess_deniedunavailablefalse
52BinaryTargetErrorconstraint=bundle_path_escapestarget_unavailableunavailablefalse
53BinaryTargetErrorconstraint=bundle_path_escapes; read permission deniedaccess_deniedunavailablefalse
54BrowserObservationErrorreason=endpoint_unreachableprovider_unavailableunavailabletrue
55BrowserObservationErrorreason=invalid_endpoint_responseunreadable_outputexecution_failurefalse
56BrowserObservationErrorreason=target_not_foundtarget_unavailableunavailablefalse
57BrowserObservationErrorreason=target_not_allowedtarget_unavailableunavailablefalse
58BrowserObservationErrorreason=application_already_runningtarget_unavailableunavailablefalse
59BrowserObservationErrorreason=service_worker_blockedtarget_unavailableunavailablefalse
60BrowserObservationErrorreason=target_changedtarget_unavailableunavailablefalse
61BrowserObservationErrorreason=target_session_detachedtarget_unavailableunavailablefalse
62BrowserObservationErrorreason=protocol_errorunreadable_outputexecution_failurefalse
63BrowserObservationErrorreason=disconnectedprovider_unavailableunavailabletrue
64BrowserObservationErrorreason=payload_limittruncatedtruncatedfalse
65BrowserObservationErrorreason=window_not_foundunreadable_outputexecution_failurefalse
66BrowserObservationErrorreason=window_metadata_missingunreadable_outputexecution_failurefalse
67BrowserObservationErrorreason=process_ownership_unavailableunreadable_outputexecution_failurefalse
68BrowserObservationErrorreason=cleanup_failedexecution_failureexecution_failurefalse
69BrowserObservationErrorreason=cancelledcancelledcancelledtrue
70BrowserObservationErrorreason=timeoutprovider_timeouttimeouttrue
71BrowserObservationErrorcaused by cancellationcancelledcancelledtrue
72EvidenceFileErrorreason=not-fileinvalid_requestinvalid_inputfalse
73EvidenceFileErrorreason=existsinvalid_requestinvalid_inputfalse
74EvidenceFileErrorreason=wrong-kindinvalid_requestinvalid_inputfalse
75EvidenceFileErrorreason=missinginvalid_requestinvalid_inputfalse
76EvidenceFileErrorreason=symlink-traversalinvalid_requestinvalid_inputfalse
77EvidenceFileErrorreason=invalid-jsonevidence_integrity_mismatchexecution_failurefalse
78EvidenceFileErrorreason=path-limitresource_constraintresource_constraintfalse
79EvidenceFileErrorreason=storage-limitresource_constraintresource_constraintfalse
80EvidenceFileErrorreason=ioexecution_failureexecution_failurefalse
81ProcessCaptureErrorprocess_capture_failedexecution_failurefalse
82ProcessCaptureErrorcaused by cancellationcancelledcancelledtrue
83ProviderSelectionErrorreason=unknown_providercapability_unavailableunsupported_providerfalse
84ProviderSelectionErrorreason=provider_unavailableprovider_unavailableunavailabletrue
85ProviderSelectionErrorreason=target_unsupportedcapability_unavailableunsupported_providerfalse
86ProviderSelectionErrorreason=ambiguouscapability_unavailableunsupported_providerfalse
87ProviderSelectionErrorreason=invalid_optionscapability_unavailableunsupported_providerfalse
88UnknownRegistryErrorreason=not-foundexecution_failureexecution_failurefalse
89UnknownRegistryErrorreason=already-existsinvalid_requestinvalid_inputfalse
90UnknownRegistryErrorreason=revision-conflictrevision_conflictexecution_failuretrue
91UnknownRegistryErrorreason=invalid-transitionexecution_failureexecution_failurefalse
92UnknownRegistryErrorreason=integrityevidence_integrity_mismatchexecution_failurefalse
93UnknownRegistryErrorreason=limittruncatedexecution_failurefalse
94UnknownRegistryErrorreason=constraintinvalid_requestinvalid_inputfalse
95HopperTimeoutErrorprovider_timeouttimeouttrue
96HopperCancelledErrorcancelledcancelledtrue
97HopperProtocolErrorunreadable_outputexecution_failurefalse
98HopperRemoteErrordiagnostic_type=remoteexecution_failureexecution_failurefalse
99HopperRemoteErrordiagnostic_type=authorizationexecution_failureunavailablefalse
100HopperRemoteErrordiagnostic_type=invalid_requestinvalid_requestinvalid_inputfalse
101HopperRemoteErrordiagnostic_type=selector_not_foundinvalid_requestinvalid_inputfalse
102HopperRemoteErrordiagnostic_type=capability_unavailableexecution_failureexecution_failurefalse
103HopperRemoteErrordiagnostic_type=bridge_exceptionexecution_failureexecution_failurefalse
104HopperProcessErrorprovider_unavailableunavailabletrue
105HopperStartErrorprovider_unavailableunavailabletrue
106HopperStartErrorApple Events authorization deniedprovider_unavailableunavailablefalse