Avoid extracting joblib archives #2336
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
2 errors
|
test:
pkg/archive/archive.go#L1
Please run goimports.
diff --git a/pkg/archive/archive.go b/pkg/archive/archive.go
index 4ac4b0d..8cb036c 100644
--- a/pkg/archive/archive.go
+++ b/pkg/archive/archive.go
@@ -40,8 +40,8 @@ func extractNestedArchive(
isArchive = true
case programkind.ArchiveMap[programkind.GetExt(f)]:
isArchive = true
- default:
- isArchive = false
+ default:
+ isArchive = false
}
//nolint:nestif // ignore complexity of 8
@@ -58,8 +58,8 @@ func extractNestedArchive(
if err != nil {
return fmt.Errorf("failed to determine file type: %w", err)
}
-
- switch {
+
+ switch {
case ft != nil && ft.MIME == "application/x-upx":
extract = ExtractUPX
case ft != nil && ft.MIME == "application/zlib":
@@ -114,8 +114,8 @@ func ExtractArchiveToTempDir(ctx context.Context, path string) (string, error) {
if err != nil {
return "", fmt.Errorf("failed to determine file type: %w", err)
}
-
- var isArchive bool
+
+ var isArchive bool
ft, err := programkind.File(f)
if err != nil {
return fmt.Errorf("failed to determine file type: %w", err)
@@ -124,15 +124,15 @@ func ExtractArchiveToTempDir(ctx context.Context, path string) (string, error) {
switch {
case ft != nil && ft.MIME == "application/x-upx":
isArchive = true
- extract = ExtractUPX
+ extract = ExtractUPX
case ft != nil && ft.MIME == "application/zlib":
isArchive = true
- extract = ExtractZlib
+ extract = ExtractZlib
case programkind.ArchiveMap[programkind.GetExt(f)]:
isArchive = true
- extract = ExtractionMethod(programkind.GetExt(path))
- default:
- isArchive = false
+ extract = ExtractionMethod(programkind.GetExt(path))
+ default:
+ isArchive = false
}
if !isArchive || extract == nil {
|
|
test
Process completed with exit code 1.
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
diff
Expired
|
678 Bytes |
sha256:69093da8671a63ecd2d532bf8ca2cec53cbe0b13cb7532b2d4f21350de04218c
|
|