Secrets in Code
This page explains how to customize the Secrets in Code scan for the application or microservice.
This function searches for plaintext access keys or credentials in the repository to increase security.
Supported Detectors:
Our scanning capabilities extend to a wide array of detectors, including but not limited to:
- ArtifactoryDetector
- AWSKeyDetector
- AzureStorageKeyDetector
- BasicAuthDetector
- CloudantDetector
- DiscordBotTokenDetector
- GitHubTokenDetector
- GitLabTokenDetector
- Base64HighEntropyString
- HexHighEntropyString
- IbmCloudIamDetector
- IbmCosHmacDetector
- IPPublicDetector
- JwtTokenDetector
- KeywordDetector
- MailchimpDetector
- NpmDetector
- OpenAIDetector
- PrivateKeyDetector
- PypiTokenDetector
- SendGridDetector
- SlackDetector
- SoftlayerDetector
- SquareOAuthDetector
- StripeDetector
- TelegramBotTokenDetector
- TwilioKeyDetector
- GitHub Actions
- GitLab CI
- Azure DevOps
- Bitbucket Pipelines
1. In the main branch you will edit the YAML file named .github/workflows/github-ci.yaml
2. In the github-ci.yaml file search for the Features section, you will find it like this:
## Features -------------------------------------------------------------------------------------#
3. Bellow the section title, add the following configuration and change the values as you need:
# Secrets in Code
secrets_in_code_blocker: 'true'
4. Commit and enjoy! ✨
1. In the main branch you will edit the YAML file named .gitlab-ci.yml
2. In the .gitlab-ci.yml file search for the Features section, you will find it like this:
## Features -------------------------------------------------------------------------------------#
3. Bellow the section title, add the following configuration and change the values as you need:
# Secrets in Code
secrets_in_code_blocker: 'true'
4. Commit and enjoy! ✨
1. In your Azure Repo's main branch you will edit the YAML file named azdevops-ci.yml
2. In the azdevops-ci.yml file search for the Features section, you will find it like this:
## Features -------------------------------------------------------------------------------------#
3. Bellow the section title, add the following configuration and change the values as you need:
# Secrets in Code
- name: secrets_in_code_blocker
value: 'true'
4. Commit and enjoy! ✨
1. In the main branch you will edit the YAML file named .bitbucket/envs.yaml
2. In the .bitbucket/envs.yaml file search for the Features section, you will find it like this:
## Features -------------------------------------------------------------------------------------#
3. Bellow the section title, add the following configuration and change the values as you need:
# Secrets in Code
secrets_in_code_blocker='true'
4. Commit and enjoy! ✨
This function is executed by default for information purposes (non-blocking).
The following explains how to make it blocking for the pipeline progress.