NuGate.Build
0.1.2
dotnet add package NuGate.Build --version 0.1.2
NuGet\Install-Package NuGate.Build -Version 0.1.2
<PackageReference Include="NuGate.Build" Version="0.1.2"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="NuGate.Build" Version="0.1.2" />
<PackageReference Include="NuGate.Build"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add NuGate.Build --version 0.1.2
#r "nuget: NuGate.Build, 0.1.2"
#:package NuGate.Build@0.1.2
#addin nuget:?package=NuGate.Build&version=0.1.2
#tool nuget:?package=NuGate.Build&version=0.1.2
NuGate.Build
A dependency age gate for NuGet, enforced at build time. The build fails if any resolved package version — direct or transitive — was published less than N days ago (default 7), unless explicitly allowlisted.
One line in Directory.Build.props gates every project in the repo, dev machines included:
<ItemGroup>
<PackageReference Include="NuGate.Build" Version="0.1.2" PrivateAssets="all" />
</ItemGroup>
For CI, consider NuGate.Tool as well — it runs nugate check between restore and build, before any package's MSBuild targets can execute.
Configure — nugate.json at the repo root
{
"minAgeDays": 7,
"mode": "enforce",
"onApiFailure": "fail",
"allow": [
{ "id": "SomePackage", "version": "3.1.4", "expires": "2026-08-01", "reason": "hotfix" }
],
"exemptPrefixes": ["MyCompany."]
}
No config file means the defaults (7 days, enforce, fail closed). Allowlist entries can carry an expiry so exceptions don't fossilize; exemptPrefixes covers internal packages that aren't on nuget.org.
What this does / does not do
NuGate enforces a dependency age policy. That's all it does, and it does it deliberately.
It does not detect malware, scan for vulnerabilities, or prevent attacks. A 30-day-old compromised package passes the gate by design. Cooldowns shrink the window in which freshly poisoned package versions can reach you — they don't close it.
Ages come from the immutable nuget.org catalog created timestamp — not the registration published field, which nuget.org resets when a version is unlisted. Unlisted versions are flagged regardless of age.
Docs & guide: nugate.dev · Source: GitHub · Apache-2.0 © Abel Solutions · Not affiliated with Microsoft or the NuGet project.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.