T09 · Insecure Skill Coding Practices
- Location
SKILL.md:32- Finding
Persistent Plaintext Storage of Telerik API Key in User Environment
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 32–34
Vulnerability Type: Persistent plaintext secret exposure
Risk Level: MediumVulnerable Code
powershell # Store API key as a user-level environment variable so it is available globally [Environment]::SetEnvironmentVariable($ApiKeyEnvVarName, $ApiKey, "User") $env:$ApiKeyEnvVarName = $ApiKeyTechnical Analysis
The function stores the supplied Telerik API key in a persistent user-level environment variable and also exposes it in the current PowerShell process environment. Environment variables are not secure secret stores. The persistent value may be stored without cryptographic protection by the operating system, while the process-level value can be inherited by child processes or exposed through diagnostics and process dumps.
Persisting the credential globally also exceeds the scope required to configure a single repository. Although the generated
nuget.configcontains only an environment-variable reference rather than the literal key, the underlying secret remains available outside the repository and across sessions.Attack Path
- A user invokes
Configure-TelerikNuGetSourcewith a valid Telerik API key. - The function writes the key to a persistent user-level environment variable.
- The function also inserts the key into the current PowerShell process environment.
- An unrelated, compromised, or malicious process running under the same user context reads the persistent value, inherits the process environment, or obtains it from diagnostic artifacts.
- The attacker reuses the exposed key to authenticate to the Telerik NuGet service within the permissions assigned to that key.
Impact Assessment
Successful exploitation may disclose the Telerik API key to code running in the affected user's security context. An attacker could use the credential to access Telerik package-feed resources authorized by the key. The ...[truncated 386 chars]
- A user invokes
- Remediation
View remediation
Remediation Suggestions
- Do not persist the API key as a user-level environment variable.
- Prefer a supported NuGet credential provider or an operating-system-backed secret store, such as Windows Credential Manager, macOS Keychain, or an appropriate Linux secret service.
- If environment-variable authentication is required, require callers or the CI platform to inject the key only into the process that needs it.
- Remove the call to
[Environment]::SetEnvironmentVariable(..., "User")and avoid copying the secret into broader process environments than necessary. - Ensure child processes that do not require package-feed access cannot inherit the credential.
- Document credential rotation and revocation procedures, and advise users to rotate any key previously persisted by this function.
- Apply least privilege to the Telerik credential and restrict its account permissions to the minimum package-feed access required.
