From e0eec632d0a7cca2fb09e026997fa9a39dcd7504 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 23 Jul 2026 17:10:22 +0900 Subject: internal/pkg: optional executable files This enables a FileArtifact implementation to specify whether its resulting file should be executable. This change also implements shebang and ELF magic checks in the file artifact. Signed-off-by: Ophestra --- internal/pkg/net.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/pkg/net.go') diff --git a/internal/pkg/net.go b/internal/pkg/net.go index 412dd2a7..cd30e3bb 100644 --- a/internal/pkg/net.go +++ b/internal/pkg/net.go @@ -74,6 +74,9 @@ func (e ResponseStatusError) Error() string { return "the requested URL returned non-OK status: " + http.StatusText(int(e)) } +// IsExecutable returns false. +func (*httpArtifact) IsExecutable() bool { return false } + // Cure sends the http request and returns the resulting response body reader // wrapped to perform checksum validation. It is valid but not encouraged to // close the resulting [io.ReadCloser] before it is read to EOF, as that causes -- cgit v1.3.1