SecurityTxt 0.0.5
dotnet add package SecurityTxt --version 0.0.5
NuGet\Install-Package SecurityTxt -Version 0.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SecurityTxt" Version="0.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SecurityTxt" Version="0.0.5" />
<PackageReference Include="SecurityTxt" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SecurityTxt --version 0.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SecurityTxt, 0.0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SecurityTxt@0.0.5
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SecurityTxt&version=0.0.5
#tool nuget:?package=SecurityTxt&version=0.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
This package offers a seamless solution for .NET applications to effortlessly integrate the security.txt file as middleware. Security.txt, a proposed standard by IETF, serves as a mechanism for website owners to communicate security-related information to security researchers, bug bounty hunters, and other concerned parties.
You can read more about the RFC 9116 in https://www.rfc-editor.org/rfc/rfc9116
Get Started
Install package
dotnet add package SecurityTxt
Add the code
// Add services to the container.
builder
.Services
.AddSecurityTxt(x =>
{
x
.WithContact("mailto:security@example.com")
.WithExpires(DateTime.Now.AddYears(1))
.WithEncryption("https://example.com/pgp-key.txt")
.WithAcknowledgments("https://example.com/hall-of-fame.html")
.WithPreferredLanguages("en, pt")
.WithCanonical("https://example.com/.well-known/security.txt")
.WithPolicy("https://example.com/security-policy.html")
.WithHiring("https://example.com/jobs.html")
.WithCsaf("https://example.com/.well-known/csaf/provider-metadata.json")
.Build();
});
// Configure the HTTP request pipeline.
app.UseSecurityTxt();
Validate
Navigate to https://localhost:PORT/.well-known/security.txt
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.AspNetCore.Http (>= 2.3.9)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.