fix(artifacts): name only host-available workflows for non-archive plists

inspect_keyed_archive runs on every host, but its remediation for an
ordinary property list pointed to inspect_plist, which only macOS
supports. On Linux that sent callers to a workflow the capability layer
rejects.

The domain error now names what the file is. The artifact reader picks
the remediation from the provider's host: inspect_plist on macOS, and
elsewhere the selection of an NSKeyedArchiver archive, with a note that
inspect_plist requires macOS. decode_interface_builder, which is
portable, stays the NIBArchive remediation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kaoru0822
2026-10-09 08:40:45 +00:00
co-authored by Claude Opus 5.5
parent fef38e4d22
commit 22958558ea
4 changed files with 67 additions and 7 deletions
+8 -2
View File
@@ -43,9 +43,11 @@ import { resolveArtifactIntegrityPolicy } from "./inventory/policy.js";
/** Read-only inventory and exclusively owned extraction provider. */
export class ArtifactProvider implements AnalysisProvider {
readonly #capabilities: readonly CapabilityDescriptor[];
readonly #platform: NodeJS.Platform;
constructor(platform: NodeJS.Platform = process.platform) {
this.#capabilities = artifactCapabilities(platform);
this.#platform = platform;
}
identity(): ProviderIdentity {
@@ -57,12 +59,15 @@ export class ArtifactProvider implements AnalysisProvider {
}
createClient(target: BinaryTarget): AnalysisClient {
return new ArtifactClient(target);
return new ArtifactClient(target, this.#platform);
}
}
class ArtifactClient implements AnalysisClient {
constructor(private readonly target: BinaryTarget) {}
constructor(
private readonly target: BinaryTarget,
private readonly platform: NodeJS.Platform,
) {}
async execute(
operation: AnalysisOperation,
@@ -146,6 +151,7 @@ class ArtifactClient implements AnalysisClient {
parameters: standalone
? { ...parameters, path: basename(this.target.path) }
: parameters,
platform: this.platform,
...(options?.signal === undefined ? {} : { signal: options.signal }),
});
if (standalone && result.archive_sha256 !== this.target.sha256)