Skip to content

Go, Rust and native binaries: inventory from build metadata, hits via uprobes #76

Open

Description

@vsn411

Part of #51. Go, Rust and other compiled binaries have no runtime to hook into, so this probe works differently: most of it runs from the sensor (#67), outside the app, with no app change.

Inventory (#68), on any OS, with no app change:

  • Go: read the module list embedded in the binary (the data behind go version -m / debug.ReadBuildInfo) from the running process's executable (/proc/<pid>/exe on Linux, or the image path elsewhere).
  • Rust: read the dependency list that cargo auditable embeds. Without it, report inventory: unavailable rather than guessing.

Function hits, Linux only, opt-in:

  • The sensor attaches eBPF uprobes to the watched symbols (OSV Go advisories list symbols reliably; Build a vulnerable-function watchlist from advisories #52 notation golang.org/x/net/html.Parse). Each probe only increments a counter keyed by symbol, and grabs a user stack on the first hit. It never reads registers holding arguments.
  • No uretprobes, because Go stacks move.
  • Needs CAP_BPF and CAP_PERFMON, and to see the app's processes: a host daemon, or a sidecar with shareProcessNamespace: true. Document this clearly, and fall back to inventory-only when the capabilities are missing.

Routes (#69), opt-in library: a small secfoo-probe-go middleware for net/http, chi, gin and echo. It records the route template and auth state and sends through #73. The same idea applies to Rust (tower layer for axum) as a follow-up.

Done when: a Go sample app with a vulnerable dependency shows Loaded with no app change on Linux, macOS and Windows; uprobe mode reports Executed in a Linux CI job; and the middleware passes the #73 conformance kit.

Activity

  1. added
    enhancementNew feature or request
    help wantedExtra attention is needed
    hackathonOpen for the Secfoo hackathon
    difficulty: hardLeaderboard: 10 points when the PR closing this is merged
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: hardLeaderboard: 10 points when the PR closing this is mergedenhancementNew feature or requesthackathonOpen for the Secfoo hackathonhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions