View Issue Details

IDProjectCategoryView StatusLast Update
0000644fileGeneralpublic2025-04-14 19:36
Reporteromajid Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version5.45 
Summary0000644: file doesn't recognize .nupkg files correctly
DescriptionThe NuGet package format is a format used by the .NET programming framework: https://en.wikipedia.org/wiki/NuGet

NuGet packages are essentially zip files with a custom extension (".nupkg") and contain a few common files by convention, but can contain essentially any other file, specially binaries such as .NET assemblies in the form of Windows Portable Executable files (".dll") or even Unix shared libraries (".so").

The version of file I used confuses them with Microsoft OOXML and Zip archive data files.
Steps To ReproduceHere's a test case. It downloads a bunch of nuget packages, and runs file over them. The majority are classified as zip archives, but a number of them are incorrectly classified as OOXML files.


#!/bin/bash

set -euo pipefail
set -x

function download_and_test_package {
    name=$1
    version=$2
    wget -O $name-$version.nupkg https://www.nuget.org/api/v2/package/$name/$version --no-verbose
    file $name-$version.nupkg

}

download_and_test_package AutoMapper 14.0.0

download_and_test_package AWSSDK.Core 3.7.402.39

download_and_test_package Azure.Core 1.45.0

download_and_test_package Dapper 2.1.66

download_and_test_package FSharp.Core 9.0.101

download_and_test_package Google.Protobuf 3.30.2

download_and_test_package Microsoft.ApplicationInsights 2.23.0

download_and_test_package Microsoft.AspNetCore.App.Runtime.linux-x64 9.0.4

download_and_test_package Microsoft.Extensions.DependencyInjection 9.0.4

download_and_test_package Microsoft.Identity.Client 4.70.2

download_and_test_package Microsoft.NET.ILLink.Tasks 10.0.0-preview.3.25171.5

download_and_test_package Microsoft.NETCore.App.Runtime.linux-x64 9.0.4

download_and_test_package Microsoft.OpenApi 1.6.24

download_and_test_package Moq 4.20.72

download_and_test_package Newtonsoft.Json 13.0.3

download_and_test_package Npgsql 9.0.3

download_and_test_package Polly 8.5.2

download_and_test_package runtime.linux-arm.runtime.native.System.IO.Ports 9.0.3

download_and_test_package runtime.linux-x64.Microsoft.DotNet.ILCompiler 9.0.0

download_and_test_package Serilog 4.2.0

download_and_test_package System.Runtime.CompilerServices.Unsafe 6.1.2

Tagsmagic, zip

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-04-14 19:36 omajid New Issue
2025-04-14 19:36 omajid Tag Attached: magic
2025-04-14 19:36 omajid Tag Attached: zip