# Setting Up Gitleaks for Secret Detection

## Using the Gitleaks scanner with Codefortify

#### License Key for Organization Repositories

Gitleaks scanning requires an additional step if you're scanning repositories belonging to an organization account. You'll need a free Gitleaks license key.

For personal account repositories, no license key is required.

#### How to Get a Free Gitleaks License Key

1. Visit[ Gitleaks.io](https://gitleaks.io).
2. Click Sign Up to complete a Google form with your name, email, and company details.
3. After submitting the form, you will receive an email with your free license key.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeZ4blNBUYdxkI-6wTGPx4-wDD0qG2UzD3v2ScdCbAffVZsBzy4SmnCR5k-f_uTIeRpVUntBbswI3nDJrTNZFcRATNiCe9CCRbBUPpYML1YHn1nuJhl1LmYQMotO5ZHo-dHDUdLOpRffJiN5QeK-aODrRh3?key=uh_H-qvEO1v_hxMqf2wm7A" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfpldQuo8eOitfMx6aKakm1RLMg1MvW945Mgdoh85L19cRibAMqJ10D3Z2IIj1XD3VaJNYe-L3HNE8RfeWbEYIuwCwLWe9hm6IJN1Qom8ceI5hQBzsdQplxW3SylDueZh39DyJBKF23hP5yzrPdjns_1g?key=uh_H-qvEO1v_hxMqf2wm7A" alt=""><figcaption></figcaption></figure>

#### Adding Your License Key

Once you have your Gitleaks license key, it must be added as an encrypted secret in one of the following locations:

* The repository
* The organization

<figure><img src="https://95056286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnRj5Qo812UANWtYsfI6J%2Fuploads%2FNaZ1vPOcmCQvjmMrMGIl%2Fimage.png?alt=media&#x26;token=1c367557-8515-4504-8f87-dd263fddfcc1" alt=""><figcaption></figcaption></figure>

***

## Using Secrets in GitHub Actions

Secrets in GitHub Actions allow you to store sensitive information in your repository, organization, or specific repository environments. Ensure you follow best practices when handling and storing sensitive data, such as your Gitleaks license key.

For more information on how to use and configure secrets in GitHub Actions, visit the[ GitHub documentation on secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).
