logo

Database

Nuget Api Key

Description

The source code repository contains sensitive information: Nuget Api Key

Weakness:

009 - Sensitive information in source code

Category: Information Collection

Detection Strategy

    Matches Nuget Api Key patterns in source code and configuration files

Vulnerable code example

NUGET_API_KEY=oy2a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v
var NugetApiKey = "q7r8s9t0u1v2w3x4y5z6a1b2c3d4e5f6g7h8i9j0k1l2m3";
dotnet nuget push package.nupkg --api-key k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a1b2c3d4e5f6g7 -s https://api.nuget.org/v3/index.json
dotnet nuget push foo.nupkg -k oy2a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v -s https://api.nuget.org/v3/index.json
nuget setapikey q7r8s9t0u1v2w3x4y5z6a1b2c3d4e5f6g7h8i9j0k1l2m3
nuget-api-key: "k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a1b2c3d4e5f6g7"