Code search and Corfedo AI

Find any code across every repository

Search all your repositories at once, on every code host. Or ask Corfedo AI how something works across your services, and get one answer with links to the lines it used.

Corfedo AIAll repositories

Where do we verify webhook signatures, and do all services do it the same way?

Thought for 30s
  1. Searched code for where are webhook signatures verified
    Query
    where are webhook signatures verified
  2. Found usages, searched code
    1. Found uses in code of WebhookSignatureVerifier
      {
        "name": "WebhookSignatureVerifier"
      }
    2. Searched order-sync for createHmac OR timingSafeEqual
      Query
      createHmac OR timingSafeEqual
      Repositories
      Legacy/order-sync
  3. Read 4 files
    1. Read WebhookSignatureVerifier.cs in platform-kit
      Repository
      platform/platform-kit
      Path
      src/PlatformKit.Webhooks/WebhookSignatureVerifier.cs
    2. Read PartnerWebhookEndpoint.cs in payments-api
      Repository
      acme/payments-api
      Path
      src/Webhooks/PartnerWebhookEndpoint.cs
    3. Read InvoiceWebhookHandler.cs in billing-service
      Repository
      acme/billing-service
      Path
      src/Webhooks/InvoiceWebhookHandler.cs
    4. Read webhooks.js in order-sync
      Repository
      Legacy/order-sync
      Path
      lib/webhooks.js

Sources: all my sources.

Profile: Deep review

Three services verify webhook signatures, in two ways. acme/payments-api and acme/billing-service call WebhookSignatureVerifier from platform/platform-kit platform/platform-kit / src/PlatformKit.Webhooks/WebhookSignatureVerifier.cs:18-52. Legacy/order-sync has its own check, and it skips the timestamp.

RepositoryVerified byOld requests
acme/payments-apiWebhookSignatureVerifier from platform-kit acme/payments-api / src/Webhooks/PartnerWebhookEndpoint.cs:24-31Rejected after five minutes
acme/billing-serviceWebhookSignatureVerifier from platform-kit acme/billing-service / src/Webhooks/InvoiceWebhookHandler.cs:40-47Rejected after five minutes
Legacy/order-syncIts own verifySignature Legacy/order-sync / lib/webhooks.js:12-29Not checked. It compares the signature and never reads x-timestamp

A captured request to Legacy/order-sync still passes when it is sent again later. Add the timestamp check that platform-kit does in platform/platform-kit / src/PlatformKit.Webhooks/WebhookSignatureVerifier.cs:38-45.

Corfedo AI

One question, thousands of files read on your server

Corfedo AI does the searching and reading and hands back the answer. Asked from a coding agent, the work spends your Corfedo AI budget, not the agent’s context.

  • Browser
  • Coding agents
  • Chat
  • API and SDKs

One question

Corfedo AI on your serverIt reads what the person asking may read

  • Searches codeBy description, exact text or pattern
  • Reads filesCode, configuration and docs
  • Runs scriptsOne script searches and reads many files
  • Checks packages and findingsVersions in use and known vulnerabilities
  • Hands parts to subagentsSeveral parts of a question at once
  • Writes filesA report or a patch in the conversation

Back to you

  • Answer
  • Citations
  • Downloadable files

Asking Corfedo AI in the docs

Search

Describe it, or write exactly what you want

One search covers every repository you may read.

  • Code that does what you describe

    where do we retry failed charges

    38 files in 6 repositories, first GitHub:acme/payments-api src/Charges/ChargeRetryPolicy.cs

  • An exact message

    "refund window has expired"

    2 files in 2 repositories, first GitHub:acme/billing-service src/Refunds/RefundValidator.cs

  • A pattern

    /Feature\.IsEnabled\("\w+"\)/ lang:csharp -file:test

    31 files in 4 repositories, first GitHub:acme/payments-api src/Charges/ChargeService.cs

  • A class by part of its name

    refund type:symbol kind:class

    5 classes in 2 repositories, first RefundPolicy in GitHub:acme/billing-service

Search syntax in the docs

Code hosts

Every repository on every code host, kept up to date

Connect GitHub, GitLab™, Gitea, Forgejo, Bitbucket and Azure DevOps once. New repositories that match your selection, and new commits, arrive without anyone adding them.

  1. Connect your code hosts

    • GitHub
    • GitLab™
    • Gitea
    • Forgejo
    • Bitbucket
    • Azure DevOps

    Read-only access is enough.

  2. Pick the repositories

    • acme/*
    • platform/*
    • *-archiveleft out
  3. Indexing keeps up on its own

    • New repositoriesfound and indexed
    • New commitspicked up
  4. Search keeps working while repositories update

    • GitHub:acme/payments-api
    • 8c41f0aindexed, searched
    • e7d2b90updating

    Your team keeps searching while new commits are indexed.

Search and ask on the demo

Try your own queries and questions, then run Corfedo on your own repositories.