Sensitive information in source code
Description
The source code repository contains sensitive information such as usernames, passwords, email addresses and IP addresses, among others. Alternatively, while values may be password=123 o aws.secret_key=test, they reveal the bad practice of storing sensitive information in the repository with no encryption, and sooner or later they can be replaced for real sensitive values.
Impact
Get sensitive information or private secrets.
Recommendation
- Delete all hardcoded sensitive information. - Change all affected access credentials. - Remove sensitive information from git logs. - Load sensitive data from safe sources such as, key vault services, configuration files properly encrypted or administrative environment variables.
Threat
Anonymous attacker with access to the source-code from the Internet.
Expected Remediation Time
⏱️ 30 minutes.
Details
Why
When secret credentials are compromised, we always generate a vulnerability report either the credentials are mocks, or are functional only in specific scenarios such as local environments. The risk of this scenario is usually considered in the severity tab. For local environment credentials the risk is low but not zero.
Hence to solve this vulnerability we recommend to remove the credentials from the source code, change the compromised credentials and ideally remove the credentials from the git log. In some cases the last recommendation cannot be applied to avoid traceability issues. If that's the case, in addition to removing the credentials from the code, we require a customer confirmation that the credentials were changed to close the vulnerability.
Requirements
145 - Protect system cryptographic keys156 - Source code without sensitive information266 - Disable insecure functionalitiesRules
Yaml Env Sensitive Value ExposedTypescript Kony Hardcoded Encryption KeyJava Use Of Hardcoded PasswordJson Yaml Hardcoded Aws CredentialsProperties Exposed Credentials And TokensJavascript Hardcoded Key Material UsedJson Connection String With Password ExposedJavascript Hardcoded Aws Credentials ConfiguredTypescript Hardcoded Aws Credentials ConfiguredSwift Hardcoded Jwt Token UsedConfig Files Exposed Aws CredentialsSwift Hardcoded Cryptographic KeyPhp Hardcoded Cryptographic KeyJson Exposed Api Key In ValueJava Csrf Handler Hardcoded SecretGo Hardcoded Aws Secret Access KeyConfig Files Hardcoded Secrets In ConfigsConfig Files Hardcoded Credentials In ConfigConfig Files Connection String With Password ExposedKotlin Hardcoded Jwt Token UsedDocker Wget Password HardcodedTypescript Hardcoded Key Material UsedYaml Hardcoded Weak CredentialsDocker Env Sensitive Value ExposedJava Hardcoded Aws Or Jwt TokenPython Hardcoded Auth Header ValueJavascript Kony Hardcoded Encryption KeyJson Connection String Client Secret ExposedJson Exposed Password And Client IdsRuby Rails Master Key ExposedPython Hardcoded Jwt Token UsedDatabricks TokenMistral Api KeyShopify Api TokenGrafana TokenTwilio Api KeyOracle Jdbc PasswordJenkins Api TokenDeepseek Api KeyAzure Devops Personal Access TokenAlibaba Access Key IdSsh Private KeyGcp Service Account KeyAtlassian Api TokenDynatrace Api TokenWeights And Biases Api KeySquare Access TokenSalesforce Refresh TokenMailgun Api TokenFastly Api TokenRedshift PasswordMailchimp Api KeyJson Api KeyRails Master Secret KeyFlutterwave Secret KeyCoinbase Api KeyAlgolia Admin KeyElastic Api KeyAirtable PatDigitalocean Personal Access TokenJwt TokenSendgrid Api KeyOkta Api TokenTwilio Api TokenGroq Api KeyRabbitmq PasswordDiscord Webhook UrlDjango Secret KeyYandex Access TokenIntercom Api KeyKeycloak Shared SecretCohere Api KeyLaravel Secret KeySlack TokenTelegram Api TokenDocker Wget PasswordPypi Upload TokenSentry Api TokenLaunchdarkly Api KeyBeamer Api KeyMercado Pago Access TokenHuggingface Access TokenIbm Api KeyGocardless Api TokenCircleci Api TokenVercel Api TokenConfluent Secret KeyAws Access KeySlack Webhook UrlPem Private KeyAdafruit Api KeyNuget Api KeyXai Api KeyTwitter Api TokenGitlab Api TokenMaxmind License KeyReplicate Api KeyStripe Secret KeyMariadb PasswordContentful Personal Access TokenShodan Api KeyAzure Sas TokenBrave Search Api KeyDatadog Api KeyPutty Private KeyAws Cognito Secret KeyLangfuse Api KeyMapbox Api TokenFigma Personal Access TokenMailgun Api KeyStripe Test Secret KeyMysql PasswordCloudflare Private KeyZoho Crm Api KeyPerplexity Api KeyTwitter Access TokenAzure Api KeyTravisci Access TokenPaypal Secret KeyFrameio Api TokenBuildkite Api TokenDroneci Access TokenDuo Auth Proxy Secret KeyLangchain Api KeyMongodb Connection StringPlanetscale Api TokenAiven Api KeyTwitch Secret KeyHashicorp TokenSumologic Access KeyDatabase Connection String Hardcoded PasswordYandex Api KeyAws Session TokenLinear Api TokenHubspot Api TokenNetlify Personal Access TokenSplunk Hec TokenSonar Api TokenAws Secret Access KeyTerraform Cloud TokenMicrosoft Webhook UrlNpm Access TokenBraintree Api KeyDockerhub Access TokenLob Api KeyAlibaba Access Key SecretPulumi Access TokenSalesforce Consumer Access KeyFacebook Access TokenAssemblyai Api KeyPinecone Api KeyRubygems Api TokenDuffel Api TokenGrafana Api KeySnyk Api TokenSendinblue Api KeyCursor Api KeyFtp PasswordGrafana Api TokenDoppler TokenFirebase Fcm Api KeyAnthropic Api KeyFireworks Ai Api KeyOpenrouter Api KeyTwitter Secret KeyJfrog Api KeyGithub PatCloudflare Api KeyDuo Secret KeyRazorpay Api KeyOpenai Api KeyDeepgram Api KeyZoom Secret KeyDocker Env Sensitive ValueDotnet Hardcoded PasswordHarness Api KeyDropbox Access Token1password Service Account TokenGoogle Oauth2 Secret KeySupabase Api KeyScaleway Secret KeyLdap PasswordVirustotal Api KeyCodacy Project TokenSnowflake PasswordVultr Api KeyNotion Api TokenHeroku Api KeyNvidia Api KeySsh PasswordClarifai Api KeySendbird Access TokenPrefect Api KeyPostgresql Connection StringPagerduty Api TokenConfluent Api KeyNewrelic Api KeyCloudflare Api TokenNetlify Access TokenPostman Api TokenElevenlabs Api KeyTwitter Api KeyRails Secret KeyPlaid Access TokenMessagebird Api KeyOracle PasswordGcp Api KeyCodacy Api TokenTypeform Api TokenRedis PasswordTailscale Api KeySmtp PasswordShopify Shared SecretGitlab Personal Access TokenBitbucket PasswordZendesk Api Token