{"record":{"id":"e8e009fc2b07b21c","repo":"microsoft/aspire","slug":"aspire-skills-archive-entry-0-has-unsupported-type-1","errorCode":null,"errorMessage":"Aspire skills archive entry '{0}' has unsupported type '{1}'.","messagePattern":"Aspire skills archive entry '(.+?)' has unsupported type '(.+?)'\\.","errorType":"exception","errorClass":"InvalidDataException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Cli/Agents/AspireSkills/AspireSkillsBundleProvider.cs","lineNumber":519,"sourceCode":"                    break;\n\n                case TarEntryType.RegularFile:\n                case TarEntryType.V7RegularFile:\n                    var destinationFileDirectory = Path.GetDirectoryName(destinationPath);\n                    if (!string.IsNullOrEmpty(destinationFileDirectory))\n                    {\n                        Directory.CreateDirectory(destinationFileDirectory);\n                    }\n\n                    entry.ExtractToFile(destinationPath, overwrite: false);\n                    break;\n\n                case TarEntryType.GlobalExtendedAttributes:\n                case TarEntryType.ExtendedAttributes:\n                    break;\n\n                default:\n                    throw new InvalidDataException(string.Format(CultureInfo.InvariantCulture, \"Aspire skills archive entry '{0}' has unsupported type '{1}'.\", entry.Name, entry.EntryType));\n            }\n        }\n    }\n\n    private static void ExtractZipArchive(string archivePath, string destinationDirectory)\n    {\n        var destinationRoot = Path.GetFullPath(destinationDirectory);\n        Directory.CreateDirectory(destinationRoot);\n\n        using var archive = ZipFile.OpenRead(archivePath);\n        foreach (var entry in archive.Entries)\n        {\n            if (string.IsNullOrWhiteSpace(entry.FullName))\n            {\n                continue;\n            }\n\n            var destinationPath = GetSafeArchiveDestinationPath(destinationRoot, entry.FullName);","sourceCodeStart":501,"sourceCodeEnd":537,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Cli/Agents/AspireSkills/AspireSkillsBundleProvider.cs#L501-L537","documentation":"When extracting a tar archive, ExtractTarball handles only regular files, directories, symlinks/hardlinks it accepts, and skips metadata entry types (GlobalExtendedAttributes, ExtendedAttributes). Any other entry type (e.g. block/char devices, FIFOs, sockets) is unexpected in a skills bundle and throws this InvalidDataException.","triggerScenarios":"ExtractArchive processes a .tar.gz skills package containing a tar entry whose EntryType is a special type (device node, FIFO, socket) rather than a file, directory, or accepted link type.","commonSituations":"A tampered or mispackaged archive created with unusual entry types; archiving from /dev with special files included; a tool producing PAX/GNU entries the parser does not recognize.","solutions":["Repackage the archive with only regular files and directories (e.g. tar --format=pax excluding special files)","Remove device/FIFO/socket entries from the archive","Download the official archive again instead of a locally rebuilt one"],"exampleFix":"// before (creating the archive)\ntar czf skills.tar.gz ./skills /dev/null-device\n// after\ntar czf skills.tar.gz ./skills","handlingStrategy":"try-catch","validationCode":"using var archive = TarFile.OpenRead(archivePath);\nwhile (archive.GetNextEntry() is { } e)\n    if (e.EntryType is not (TarEntryType.RegularFile or TarEntryType.Directory\n        or TarEntryType.HardLink or TarEntryType.SymbolicLink\n        or TarEntryType.GlobalExtendedAttributes or TarEntryType.ExtendedAttributes))\n        throw new Exception($\"Entry '{e.Name}' has unsupported type {e.EntryType}.\");","typeGuard":null,"tryCatchPattern":"try { await provider.CreateAsync(...); }\ncatch (InvalidDataException ex) when (ex.Message.Contains(\"unsupported type\")) { /* repackage archive without special entries */ }","preventionTips":["Create archives from plain files/directories only; exclude /dev and FIFOs","Use a standard tar format (pax/ustar) when packaging","Inspect with 'tar -tvf' for non-regular entry types before shipping"],"tags":["archive","tar","validation","security"],"backgroundTag":"unsupported-enum-value","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}