Secret Scanner Installation
Installation Options
Choose your preferred installation method:
NuGet Package Manager
Install-Package Bytehide.Secrets.Scanner
.NET CLI
dotnet add package Bytehide.Secrets.Scanner
PackageReference
<PackageReference Include="Bytehide.Secrets.Scanner">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Basic Setup
Create a bytehide.secrets.json
file in your project root directory:
{
"Name": "My Project Scanner",
"Environment": "development",
"ProjectToken": "<Your project token>",
"RunConfiguration": "*",
"Enabled": true,
"DisplayCode": true,
"Actions": {
"export": {
"enabled": true,
"encrypt": false,
"prefix": "auto_"
}
}
}
Security Warning
Never commit your bytehide.secrets.json
file to source control. Add it to your .gitignore
file.
Verify Installation
After installation, build your project to trigger the scanner:
dotnet build
The scanner will automatically:
- Check if scanning is enabled for your build configuration
- Scan both source code and compiled binaries for secrets
- Report any findings to your ByteHide dashboard
- Export detected secrets to your ByteHide Secrets Manager (if configured)
Scanner Workflow
The Secret Scanner integrates directly into your build process:
- Installation: Add the NuGet package to your project
- Configuration: Set up the scanner via the JSON file
- Scanning: Automatically runs during build
- Reporting: Detected secrets appear in your ByteHide dashboard
- Action: Export, encrypt, or receive alerts about found secrets