You can reduce secret-scanning noise from deliberate test credentials by excluding a narrowly defined fixture path or adding a detector-specific allowlist—but any rule that suppresses a fixture can also hide a real credential that lands there. Configure the scanner and scan mode actually in use, understand whether its criteria combine with AND or OR, and validate the exception with a non-live test value before relying on it.
What an exclusion does—and what it risks
Path-based exclusions are not a way to mark individual values as harmless. They change what the scanner reports in a location. GitHub says alerts for secrets found in excluded paths are automatically closed as “ignored by configuration,” and those directories are also excluded from push protection. GitLab’s documented source-code scanning allowlist example can ignore a finding when its path matches. In either case, a real credential stored under an excluded fixture path may be suppressed along with fake test data.
As an Amazon Associate I earn from qualifying purchases.
For that reason, put deliberate test credentials in a dedicated fixture directory, separate from application code and production configuration, and scope the exception to that directory—not to broad locations such as all tests, documentation, or configuration files. Where supported, combine the path with a recognizable test-value condition using AND semantics. That can narrow the exception, but only if the deployed scanner’s exact matching rules support it.
Free tools Windows power users keep installed
One-click scans. No signup required.
Choose the configuration for your scanner
| Scanner and mode | Configuration mechanism | Important behavior |
|---|---|---|
| GitHub Secret Scanning | .github/secret_scanning.yml with paths-ignore |
Excluded-path alerts are automatically closed as ignored by configuration; excluded directories are also omitted from push protection. |
| GitLab Secret Scanning for Source Code | .gitlab/secret-detection-ruleset.toml, which can extend the packaged ruleset and reference an extended configuration |
In GitLab’s documented allowlist example, matching a path or a regex is sufficient: the criteria are combined with OR. |
| Gitleaks | Allowlist configuration under an individual rule or globally | Conditions can use AND or OR. A global allowlist can suppress findings across rules, so scope an exception to the relevant rule or explicitly targeted rules where possible. |
These are product- and mode-specific mechanisms, not interchangeable settings. GitLab’s source-code scanner and pipeline secret detection are distinct contexts; check which one reports the finding before changing configuration. For every tool, verify syntax and behavior against the version deployed.
#1 Best Overall
- Security Key : Protect your online accounts against unauthorized access by using FIDO2 and U2F authentication with T110. It's the world's most protective security key that works with windows, Mac OS, Linux as well as Chrome, Firefox, Edge and many other major browsers.
- Certified with the new FIDO2 standard, T110 provides the benefit of fast login and strong protection against phishing, account takeover as well as many other online attactks.
- Works with : Bank of America, Github, Google, Microsoft, DUO, Twitter, Facebook, Dropbox, Apple, ebay, BINANCE, mor and more.
- Fits USB-A port : Insert the T110 security key into the USB-A port of each service and log in conveniently with one touch
- For the driver download and user guide, please visit TrustKey Solutions Home support page.
Configure GitHub Secret Scanning
Create or edit .github/secret_scanning.yml and list only the fixture path that should be ignored. GitHub documents this format:
paths-ignore:
- "docs/**"
docs/** is the documentation example, not a safe default for fixtures. Replace it with the narrowest stable path that contains deliberate test data, for example:
Rank #2
- POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
paths-ignore:
- "tests/fixtures/**"
Use the actual repository path and confirm that it does not include production code or configuration. GitHub supports * in patterns. Its documented limits are also worth checking: if the list has more than 1,000 entries, only the first 1,000 are excluded; if secret_scanning.yml exceeds 1 MB, the file is ignored.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallGitHub recommends minimizing excluded directories, defining them precisely, documenting their purpose in comments, reviewing the configuration regularly, and informing the security team. Keep the file in normal code review so a fixture exception cannot silently expand.
Rank #3
- POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
Configure GitLab source-code secret scanning
GitLab’s source-code scanner can be customized through .gitlab/secret-detection-ruleset.toml, including by extending the packaged ruleset and pointing to an extended configuration file. Its documented extended-configuration example places a path expression and a regular expression in an [[allowlists]] entry. In that example the lists are combined with logical OR, so a path match by itself can ignore a finding. Adding a regex does not make the path exclusion narrower.
The example path spec/fixtures/.* and its sample regex illustrate syntax; they are not a universal policy to copy. Adapt the path to your repository, then check the effective ruleset and matching semantics for the scanner version you run. If the available behavior cannot require both the fixture path and a known test-value pattern, do not assume that a regex alongside a path adds that protection.
Rank #4
- Ultra-Compact FIDO2 Security Key - Plug-and-stay or carry on a keychain. This USB-A hardware security key offers portable, always-on protection for desktop and mobile use. (Item Size: 0.75 X 0.74 IN x 0.25 IN)
- USB-A Hardware Key for All Devices - Works with USB-A ports on PC, Mac, Android, and other laptop/notebook device. Enables secure, cross-platform login with FIDO2.0 passkey support.
- FIDO Certified Security Key - Meets FIDO and FIDO2 standards. Works with Google, Microsoft, GitHub, Dropbox, and more. Please check service compatibility before purchase.
- Passwordless Login with Passkey - Supports passkey login via WebAuthn and CTAP2. Enjoy password-free sign-ins where supported. Not all websites or services currently support passkeys.
- Advanced Multi-Factor Authentication - Offers 200 FIDO2 passkey slots and 50 OATH-TOTP slots. Strong, flexible 2FA/MFA support across various apps and authentication platforms.
Configure Gitleaks allowlists
Gitleaks supports allowlists within individual rules and global allowlists. Its documented criteria include paths, regexes, commits, and stopwords, with condition settings controlling whether any or all criteria must match. For a fixture exception intended to affect one detector, prefer a rule-scoped allowlist over a global one; a global exception can suppress findings from multiple rules.
Match the configuration syntax to the installed release. Gitleaks documents a change in v8.25.0: [allowlist] was replaced by [[allowlists]]. Do not paste configuration written for another version without checking its supported fields, condition behavior, and which text the regex is evaluated against.
Best Value
- POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
Validate an exception safely
- Identify the finding source. Determine the product, scan mode, and deployed version—for example, GitHub Secret Scanning, GitLab source-code scanning, GitLab pipeline detection, or Gitleaks. Select that scanner’s documented configuration mechanism.
- Choose a narrow fixture location. Move deliberate fake credentials into a dedicated fixture subtree if practical. Exclude only that path, or scope an allowlist to the specific detector and test-value condition when the scanner supports it.
- Document the reason. Add a comment explaining why the path or rule is allowed, and review the change with the people responsible for security.
- Test with a non-live value. In a controlled repository or fixture, use a test secret that has been invalidated or is otherwise safe, then confirm the scanner’s expected alert behavior. GitHub documents this style of verification. Never use a working credential as a test.
- Check both sides of the change. Confirm that the intended fixture finding is suppressed and that a test finding outside the excluded scope is still detected. Also verify any mode-specific effects, such as GitHub push protection or pipeline findings.
- Review when things change. Revisit exclusions when fixture layouts, scanner versions, or scan modes change. An exception that was narrow in one repository structure may cover more files after a reorganization.
Handle credentials already committed to history
Removing a credential from the current file does not necessarily remove it from repository history. GitLab warns that removed secrets may remain in history and still be reported by pipeline secret detection. Treat an exposed real credential as a security incident: use the organization’s credential-revocation and response process, and address historical exposure separately from fixture-noise configuration. An ignore rule is not remediation for a live or previously exposed secret.
Quick Recap
Official configuration references
- GitHub Docs: Excluding folders and files from secret scanning
- GitLab Docs: GitLab Secret Scanning for Source Code
- Gitleaks project documentation
- GitLab Docs: Pipeline secret detection
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




