October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Scan a GitHub Repository for Secrets and Known Vulnerabilities

GitHub uses separate features to detect exposed secrets, source-code vulnerabilities, and vulnerable dependencies. Learn how to enable and respond to each check.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use GitHub’s security features together: secret scanning looks for exposed credentials, code scanning checks source code for vulnerabilities and errors, and Dependabot alerts identify known vulnerabilities in dependencies. They cover different risks, so enabling one does not replace the others. What you can enable depends on repository visibility and the account’s plan or security products.

What each GitHub security check scans

Check What it looks for Typical result
Secret scanning Exposed credentials, such as API keys and tokens Repository alert; for partner secrets, GitHub may notify the provider
Push protection Supported secrets in a push Blocks the push to help prevent the secret from being introduced
Code scanning, including CodeQL Vulnerabilities and errors in source code Code scanning alerts; setup can be automatic or use an editable workflow
Dependency graph and Dependabot Dependencies identified from manifests and lock files, and known vulnerabilities in those dependencies Dependabot alerts; security update pull requests can be enabled

These are separate checks, not interchangeable names for one scan. A code scan does not find every leaked credential or replace dependency alerts. GitHub’s repository security quickstart and security settings documentation describe their distinct roles.

As an Amazon Associate I earn from qualifying purchases.

Check whether the repository is eligible

Before looking for a particular switch, check GitHub’s current availability guidance. Some features are available on all plans, while some private-repository features require an organization plan with GitHub Code Security or GitHub Advanced Security. Public repositories generally have broader availability, but do not assume every feature is enabled for every repository. Consult GitHub’s quickstart and security settings guide for the repository and account in question; interface labels and eligibility can change.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Enable dependency and vulnerability checks

  1. Open the repository’s security settings. In the repository, open Settings and locate its security and analysis options. If the labels or layout differ, use GitHub’s security settings instructions.
  2. Enable the dependency graph. GitHub uses manifest and lock files to identify dependencies. The graph is the basis for finding known vulnerabilities in recognized dependencies.
  3. Enable Dependabot alerts. GitHub can alert you when a dependency in the graph is identified as vulnerable. If available and useful for the repository, enable Dependabot security updates so GitHub can propose security update pull requests.

An alert is about a vulnerable package GitHub recognizes in the dependency graph; it is not a scan for every possible flaw in your own source code.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • 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.

Enable code scanning with CodeQL

  1. Choose Code scanning in the repository’s security settings. If offered and eligible, select CodeQL default setup for a GitHub-hosted configuration.
  2. Review the detected configuration. GitHub says default setup determines languages, query suites, and scan events based on the repository. Check that the configuration matches the code you want covered.
  3. Use advanced setup when you need control. Advanced setup provides an editable workflow. A third-party scanner can also integrate with GitHub code scanning.
  4. Review the resulting alerts. GitHub’s quickstart explains the available setup paths.

Code scanning is intended to identify vulnerabilities and errors in repository code. It complements, rather than replaces, secret scanning and dependency alerts.

Enable secret scanning and push protection

  1. Find secret protection in repository security settings. Enable secret scanning if the repository and account are eligible.
  2. Enable push protection if available. It can block pushes containing supported secrets, helping stop a credential from entering the repository in the first place.
  3. Review alerts when a secret is detected. GitHub’s secret scanning documentation describes alerts, provider notifications, and scope limitations.

Coverage is not unlimited. For some paired patterns, GitHub requires the ID and secret to appear in the same file and both to be pushed before it can detect the pair. Secret scanning therefore cannot establish that no credential has ever been exposed.

Rank #2
Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5C 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 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C 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

Review alerts and respond safely

Security alerts are available in the repository’s Security and quality area. For a detected credential, treat it as compromised: use the credential provider’s process to revoke or rotate it, then investigate where it was used. GitHub may notify a provider for partner secrets, but do not rely on that notification as your response plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Do not paste the detected value into an issue, pull request comment, or log while discussing the alert.
  • For a Dependabot alert, review the affected dependency and the proposed security update, then test the change before merging.
  • For a code scanning alert, inspect the finding in context and address or triage it through your normal review process.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What a clean scan does—and does not—mean

A clean result means these configured checks did not report a finding within their coverage at that time. It is not proof that the repository is vulnerability-free: the checks have different scopes, rely on recognized patterns or dependencies, and may be unavailable or configured differently across repositories. Keep the checks enabled as code and dependencies change, and review new alerts rather than treating one scan as a permanent clearance.

Rank #3
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • 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

GitHub’s code security documentation links to current setup guidance for repository security features.

Best Value
FIDO2 U2F Security Key Passkey Two-Factor Authentication (2FA) USB Key PIN+Touch (Non-Biometric) USB-A Type TrustKey T110
  • 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.
Rank #4
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • 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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.