Secret scanning: find leaked credentials before someone else does

Obseria searches code and Git history in your GitHub repositories for passwords, API keys and tokens, finds secrets that reach your logs and shows every match only as a redacted snippet.

Sensitive data stage: masking rules keep passwords and tokens out of storage
Code Security with a Secrets tab for code and Git history
API keys found in log text, shown with redacted evidence
What is found
Passwords, API keys and tokens
Where
Code and Git history, plus logs at runtime
Display
Redacted snippets, never the full secret
Code source
GitHub repositories
Product tour

How your team works with Secret scanning

From the repository to the log stream: these views come straight from the Obseria app and show the three places where Obseria looks for secrets.
01 / 05

Connect your GitHub organization

All connections, including GitHub organizations, are listed under Integrations. Once GitHub is connected, Code Security can read code and Git history.

  • One connection for all repository checks
  • Connected and available integrations at a glance
  • No changes to your build
Connect your GitHub organization
02 / 05

Secrets in their own tab

A scan searches code and Git history for passwords, API keys and tokens. Matches appear in the Secrets tab as redacted snippets.

  • Current code and history
  • Redacted snippets
  • Next to dependencies and IaC
Secrets in their own tab
03 / 05

Secrets that reach your logs

Runtime code analysis reports API keys and tokens in log lines and credentials in URLs, with severity, service, occurrences and redacted evidence.

  • Filter by severity, detector and service
  • Occurrences per finding
  • Evidence redacted before display
Learn more
Secrets that reach your logs
04 / 05

Keep tokens out of stored data

The pipeline has its own stage for sensitive data. Masking rules replace passwords, tokens and personal data at ingest, before anything is stored.

  • Separate stage for sensitive data
  • Logs and spans
  • Applied before storage
Learn more
Keep tokens out of stored data
05 / 05

Every rotation with an owner

Turn each leaked secret into a task with priority, due date and assignee, so it is clear who rotates which credential.

  • List or board view
  • Priority, due date and assignee
  • Breakdown by status and person
Learn more
Every rotation with an owner
Capabilities

Repository, runtime and ingest

Secret scanning in code, detection of secrets in logs and masking at ingest work together, so a credential that slips through one check is caught by the next.
Secret scanning

Secret scanning

Finds passwords, API keys and tokens in code and in the Git history.

Runtime code analysis (IAST)

Runtime code analysis (IAST)

Detects vulnerabilities in the running application based on real calls.

Learn more →
Sensitive data scanner

Sensitive data scanner

Masks email addresses, IBANs, credit cards, passwords/tokens, phone numbers and IPs in telemetry at ingest, before storage.

Learn more →
Case management

Case management

Manages tasks and cases from alerts and findings through to resolution.

Learn more →
  • Code security
How it works

From leaked credential to closed gap

Five steps from the first scan to a rotated secret and a cause that cannot repeat itself.
  1. Connected · demo-shop
    01

    Connect

    Connect GitHub once. Code Security can then read the code and Git history of the repositories you choose.

  2. Example match · redacted
    02

    Scan

    Start a scan. It searches code and history for passwords, API keys and tokens and shows matches as redacted snippets.

    • New key issued
    • Old key revoked
    • Service checked for misuse
    03

    Rotate

    Treat every match as compromised: issue a new credential, revoke the old one and check the service for misuse.

  3. Critical
    API key in log textcheckout-api · 2×
    Masking rule added
    04

    Watch the logs

    Runtime code analysis reports secrets that reach your logs, and masking rules keep them out of storage.

  4. Rescan · no secrets found
    05

    Fix the cause

    Move the secret to a secret manager, adjust logging, track the work as a task and scan again.

In depth

How Secret scanning works

Code and Git history

Find secrets where Git keeps them: everywhere

A credential committed once stays in the Git history even after the line is deleted. Secret scanning in Obseria therefore searches both the current code and the history of your repositories for passwords, API keys and tokens.

The check runs as part of the Code Security scan, together with the dependency and IaC checks. Results appear in their own Secrets tab, so a repository's leaked credentials are visible next to its vulnerable libraries and risky infrastructure settings.

Old and rarely touched repositories deserve the same scan as active ones. They often hold keys that nobody remembers and that still work.

  • Passwords, API keys and tokens
  • Current code and Git history
  • Own Secrets tab in Code Security
Redacted results

A finding that does not leak the secret again

A list of leaked secrets would itself be a valuable target. Obseria shows matches as redacted snippets: enough context to find the file and recognise the credential, but not the full value.

The same principle applies at runtime. Findings of runtime code analysis show the evidence in redacted form, for example the prefix of a key and its length. Your team can act on the finding without the credential becoming readable in another place.

  • Redacted snippet per match
  • Redacted evidence for runtime findings
  • No second leak through the tool
Secrets in logs

Catch what never appears in the code

Some secrets never touch a repository but still leak: an HTTP client logs a request with its authorisation header, or a token is passed as a URL parameter. Runtime code analysis evaluates the log lines and requests of your running services and reports secrets in logs and credentials in URLs.

To keep such data out of storage in the first place, the sensitive data scanner in Obseria's pipeline masks passwords, tokens and personal data at ingest, before anything is written. Masking contains the damage; the code that logs the secret should still be fixed.

  • Secrets in logs and credentials in URLs
  • Severity, service and occurrences
  • Masking of tokens at ingest
Rotate & track

Rotation is the fix, not deletion

Removing a secret from the code does not make it invalid. The only reliable response is to rotate it: issue a new credential and revoke the old one. Obseria finds the secret; rotation happens in the system that issued it.

Turn each leaked secret into a task with priority and assignee in Obseria's case management, so it is clear who rotates which credential and when it was done. A new scan afterwards confirms that the value is gone from the current code, and the runtime findings show whether it still appears in logs.

  • Rotate first, then clean up
  • Tasks with priority and assignee
  • Rescan and runtime check to confirm
Integrations

Repositories and log sources

Code and Git history from GitHub repositories, plus logs that reach Obseria via OpenTelemetry, the OTel Collector, Fluentd, Vector or Logstash.
  • GitHub
  • OpenTelemetry
  • OTel Collector
  • Fluentd
  • Vector
  • Logstash
Guide

Secret scanning explained

What is secret scanning?

Secret scanning searches source code, configuration files and Git history for credentials that should never be stored there: passwords, API keys, access tokens, private keys and connection strings with embedded passwords. The goal is to find a leaked secret before someone else does.

Secrets end up in repositories for ordinary reasons. A developer hard-codes a key to test something quickly, a .env file is committed by mistake, or a configuration file with a database password is copied from a server. Once pushed, the secret is available to everyone with access to the repository, to every clone and fork, and, for public repositories, to automated scrapers that look for exactly this.

Why the Git history matters

Deleting the line does not remove the secret. Git keeps every version of every file, so a key that was committed once and removed in the next commit is still retrievable from the history. That is why good secret scanning looks not only at the current state of a branch, but also at the Git history. It is also why the only reliable response to a leaked secret is to rotate it: issue a new credential and invalidate the old one.

Which secrets are typically found

  • Cloud credentials: access keys and service account keys for cloud providers.
  • API keys and tokens: keys for payment providers, email services, AI APIs or internal services.
  • Database credentials: passwords and connection strings with embedded user names and passwords.
  • Private keys: SSH keys, TLS keys and signing keys.
  • Generic passwords in configuration files, scripts and infrastructure code.

Secrets beyond the repository

Repositories are not the only place where secrets leak. Applications also write them to logs, for example when an HTTP client logs a full request with its authorisation header, or when a token is passed in a URL and shows up in access logs. These leaks are invisible in the code review of the line that calls the logger, so they need a check on the actual output. A second line of defence is masking at ingest: rules in the telemetry pipeline that replace passwords and tokens before data is stored.

How to respond to a leaked secret

  1. Rotate first. Create a new credential and revoke the old one. Assume the old one has been seen.
  2. Check for misuse. Look at the access logs of the affected service for unusual use in the time since the leak.
  3. Remove it from the code. Replace the value with a reference to a secret manager or environment variable.
  4. Decide on the history. Rewriting Git history is possible but disruptive; after rotation it is often not necessary.
  5. Fix the cause. Add the file to .gitignore, adjust logging or change the template that led to the leak.

Secret scanning best practices

  • Scan all repositories, including old ones. Forgotten repositories often hold the oldest and most powerful keys.
  • Use a secret manager. Credentials that are never typed into files cannot be committed by accident.
  • Prefer short-lived credentials. A token that expires after an hour limits the damage of a leak.
  • Never paste secrets into tickets or chats. The same rules apply outside of code.
  • Do not expose the secret again. Findings should show a redacted snippet, not the full value.

Metrics for secret hygiene

  • New secrets found per month, ideally trending towards zero as secret managers become the norm.
  • Time from detection to rotation: how long a leaked credential stays valid after it was found.
  • Open findings in the Git history that have not yet been confirmed as rotated.
  • Secrets detected in logs and whether the count falls after logging was fixed.

How to choose a secret scanning tool

Ask whether the tool scans the Git history as well as the current code, which code hosts it supports, how findings are displayed and whether secrets are redacted in the results. Check whether it also covers secrets in runtime data such as logs, and whether it is clear what the tool does not do, for example rotating credentials or checking whether a key is still valid.

Secret scanning in Obseria

Obseria covers secrets at three points: in the repository, in the running application and at ingest.

  • Code and Git history: the Code Security scan of your GitHub repositories searches code and Git history for passwords, API keys and tokens. Matches appear in the Secrets tab with a redacted snippet, next to dependency and IaC findings.
  • Logs: runtime code analysis evaluates the log lines and requests of running services and reports secrets in logs and credentials in URLs, with severity, service, occurrences and redacted evidence.
  • Masking at ingest: the sensitive data scanner masks passwords, tokens, email addresses and other personal data in telemetry before it is stored.
  • Follow-up: rotation and clean-up can be tracked as tasks with priority and assignee.

Obseria finds secrets; it does not rotate or revoke them, does not check whether a key is still valid and does not rewrite Git history. Only repositories on GitHub can be connected today.

FAQ

Questions about Secret scanning

Answers on features, setup and what is not included yet.
Contact us

Secret scanning FAQ

Secret scanning searches code, configuration and Git history for credentials such as passwords, API keys and tokens, so leaked secrets can be rotated before they are misused.

Yes. Secret scanning searches both the current code and the Git history of your GitHub repositories, because a secret that was committed once remains retrievable even after the line was deleted.

No. Matches are shown as redacted snippets. Runtime findings also show only redacted evidence, for example a key prefix and its length.

Yes. Runtime code analysis evaluates the log lines and requests of your running services and reports secrets in logs and credentials in URLs. The sensitive data scanner can additionally mask passwords and tokens at ingest, before storage.

Rotate it first: create a new credential and revoke the old one. Then check the affected service for misuse, replace the value in the code with a reference to a secret manager and fix the cause.

No. Obseria finds and reports secrets. Rotation and revocation happen in the system that issued the credential; you can track the work as a task in Obseria.

Repositories on GitHub. You connect GitHub once and then choose the repositories to scan.

Obseria does not check whether a found key is still valid, does not rotate or revoke credentials, does not rewrite Git history and does not block pushes that contain secrets. Repositories outside GitHub cannot be connected today, and secrets in logs are only detected for services whose telemetry reaches Obseria.

Contact

See Secret scanning in action

In 30 minutes we show you how Obseria works in your environment and answer your questions on setup, privacy and pricing.

  • No obligation, free of charge
  • Usually answered within one business day
  • Data in the EU
Your contact
Your contactObseria team

* Required field. By submitting, you agree to the processing of your details as described in our Privacy Notice