Datasets:
Update CA-Bench to 516 tasks
Browse files280 unmodified lines281282283284285286287280 unmodified lines{"repo": "gravitational/teleport", "buggy_commit": "ca81b4a0c11f2a7412b8b5d086a9f8eb6e61d287", "bug_issue": 10589, "solve_pr": 10719, "call_graph": {"nodes": [{"id": "lib/sshutils/x11/display.go::Display::Dial"}, {"id": "lib/sshutils/x11/display.go::Display::Listen"}, {"id": "lib/sshutils/x11/display.go::Display::unixSocket"}], "edges": [{"source": "lib/sshutils/x11/display.go::Display::Dial", "target": "lib/sshutils/x11/display.go::Display::unixSocket"}, {"source": "lib/sshutils/x11/display.go::Display::Listen", "target": "lib/sshutils/x11/display.go::Display::unixSocket"}]}, "graph_spec": "An X server manages graphical displays and input, while X11 forwarding connects remote graphical applications to a local display. Within this scope, Display.Dial opens a connection to an X server display, Display.Listen opens a listener for display connections, and Display.unixSocket supplies the display’s associated Unix-domain socket address for these operations."}{"repo": "gravitational/teleport", "buggy_commit": "e2b1e9f54803484660644237a5f784aa68b7190c", "bug_issue": 11779, "solve_pr": 11878, "call_graph": {"nodes": [{"id": "integration/helpers.go::TeleInstance::Create"}, {"id": "integration/helpers.go::TeleInstance::CreateEx"}, {"id": "integration/helpers.go::TeleInstance::Reset"}, {"id": "lib/auth/init.go::Init"}, {"id": "lib/auth/init.go::migrateDBAuthority"}, {"id": "lib/service/service.go::NewTeleport"}, {"id": "lib/service/service.go::Run"}, {"id": "lib/service/service.go::TeleportProcess::initAuthService"}, {"id": "lib/service/service.go::newTeleportProcess"}, {"id": "tool/teleport/common/teleport.go::OnStart"}], "edges": [{"source": "integration/helpers.go::TeleInstance::Create", "target": "integration/helpers.go::TeleInstance::CreateEx"}, {"source": "integration/helpers.go::TeleInstance::CreateEx", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers.go::TeleInstance::Reset", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/auth/init.go::Init", "target": "lib/auth/init.go::migrateDBAuthority"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initAuthService"}, {"source": "lib/service/service.go::Run", "target": "lib/service/service.go::newTeleportProcess"}, {"source": "lib/service/service.go::TeleportProcess::initAuthService", "target": "lib/auth/init.go::Init"}, {"source": "lib/service/service.go::newTeleportProcess", "target": "lib/service/service.go::NewTeleport"}, {"source": "tool/teleport/common/teleport.go::OnStart", "target": "lib/service/service.go::Run"}]}, "graph_spec": "The scope must preserve Teleport lifecycle and auth initialization semantics: `TeleInstance.Create` delegates to `CreateEx`, which builds a complete isolated configuration (data directory, cluster identity, authorities, trusted clusters, addresses, storage, and optional services), creates the process through `NewTeleport`, and provisions configured users/roles when auth is enabled; `Reset` must fully close and wait for the prior process before recreating it from the retained configuration. `OnStart`/`Run` must construct a process, start it, require a readiness event within the startup deadline, then handle exit or reload signals, replacing processes only after the replacement is ready and gracefully shutting down the old one. `NewTeleport` must validate configuration, prepare persistent identity/storage state, and initialize only configured services; auth initialization must establish storage and audit/event plumbing before calling `auth.Init`. `Init` must serialize backend initialization, apply bootstrap resources only on first start, preserve an existing cluster name, install configured authorities/roles/tunnels and defaults, and ensure required certificate authorities exist. During that initialization, `migrateDBAuthority` must examine the local and trusted clusters, leave existing Database CAs untouched, and create a Database CA from an existing Host CA only when the Database CA is absent, while tolerating first-start cases where neither exists."}{"repo": "gravitational/teleport", "buggy_commit": "8bca6e20c6c7374080180f7a5b5ea62bb15c136c", "bug_issue": 13898, "solve_pr": 13918, "call_graph": {"nodes": [{"id": "api/client/inventory.go::NewUpstreamInventoryControlStream"}, {"id": "lib/auth/auth.go::Server::RegisterInventoryControlStream"}, {"id": "lib/auth/auth_with_roles.go::ServerWithRoles::RegisterInventoryControlStream"}, {"id": "lib/auth/grpcserver.go::GRPCServer::InventoryControlStream"}, {"id": "lib/inventory/controller.go::Controller::RegisterControlStream"}, {"id": "lib/inventory/controller.go::Controller::handleControlStream"}, {"id": "lib/inventory/controller.go::Controller::handleHeartbeat"}, {"id": "lib/inventory/controller.go::Controller::handleSSHServerHB"}], "edges": [{"source": "lib/auth/auth.go::Server::RegisterInventoryControlStream", "target": "lib/inventory/controller.go::Controller::RegisterControlStream"}, {"source": "lib/auth/auth_with_roles.go::ServerWithRoles::RegisterInventoryControlStream", "target": "lib/auth/auth.go::Server::RegisterInventoryControlStream"}, {"source": "lib/auth/grpcserver.go::GRPCServer::InventoryControlStream", "target": "api/client/inventory.go::NewUpstreamInventoryControlStream"}, {"source": "lib/inventory/controller.go::Controller::RegisterControlStream", "target": "lib/inventory/controller.go::Controller::handleControlStream"}, {"source": "lib/inventory/controller.go::Controller::handleControlStream", "target": "lib/inventory/controller.go::Controller::handleHeartbeat"}, {"source": "lib/inventory/controller.go::Controller::handleHeartbeat", "target": "lib/inventory/controller.go::Controller::handleSSHServerHB"}]}, "graph_spec": "These functions provide the auth-server side of Teleport’s inventory control streams: bidirectional connections through which instances advertise their presence, version, and active services. They wrap the gRPC stream, support registration through authorization and auth-service layers, and manage incoming messages and keepalives in the inventory controller. The heartbeat handlers process instance-state announcements, including SSH server descriptions, to support server presence and liveness tracking."}{"repo": "gravitational/teleport", "buggy_commit": "c2a8ff3e78b0e89c060719123caa153993d8bb46", "bug_issue": 13911, "solve_pr": 14021, "call_graph": {"nodes": [{"id": "integration/helpers/fixture.go::Fixture::NewTeleportInstance"}, {"id": "integration/helpers/fixture.go::Fixture::NewTeleportWithConfig"}, {"id": "integration/helpers/instance.go::NewInstance"}, {"id": "integration/helpers/instance.go::TeleInstance::CreateEx"}, {"id": "integration/helpers/instance.go::TeleInstance::Reset"}, {"id": "integration/helpers/instance.go::TeleInstance::StartApp"}, {"id": "integration/helpers/instance.go::TeleInstance::StartApps"}, {"id": "integration/helpers/instance.go::TeleInstance::StartDatabase"}, {"id": "integration/helpers/instance.go::TeleInstance::StartKube"}, {"id": "integration/helpers/instance.go::TeleInstance::StartNode"}, {"id": "integration/helpers/instance.go::TeleInstance::StartNodeAndProxy"}, {"id": "integration/helpers/instance.go::TeleInstance::StartProxy"}, {"id": "integration/helpers/instance.go::TeleInstance::StartReverseTunnelNode"}, {"id": "integration/helpers/instance.go::TeleInstance::startNode"}, {"id": "lib/auth/helpers.go::NewServerIdentity"}, {"id": "lib/auth/helpers.go::NewTestServer"}, {"id": "lib/auth/helpers.go::NewTestTLSServer"}, {"id": "lib/auth/helpers.go::generateCertificate"}, {"id": "lib/auth/init.go::GenerateIdentity"}, {"id": "lib/auth/native/native.go::GenerateKeyPair"}, {"id": "lib/auth/native/native.go::Keygen::GenerateKeyPair"}, {"id": "lib/client/interfaces.go::NewKey"}, {"id": "lib/reversetunnel/cache.go::certificateCache::generateHostCert"}, {"id": "lib/service/connect.go::TeleportProcess::connect"}, {"id": "lib/service/connect.go::TeleportProcess::connectToAuthService"}, {"id": "lib/service/connect.go::TeleportProcess::firstTimeConnect"}, {"id": "lib/service/connect.go::TeleportProcess::firstTimeConnectWithAssertions"}, {"id": "lib/service/connect.go::TeleportProcess::generateKeyPair"}, {"id": "lib/service/connect.go::TeleportProcess::reRegister"}, {"id": "lib/service/connect.go::TeleportProcess::reconnectToAuthService"}, {"id": "lib/service/connect.go::TeleportProcess::rotate"}, {"id": "lib/service/connect.go::TeleportProcess::syncRotationState"}, {"id": "lib/service/connect.go::TeleportProcess::syncRotationStateAndBroadcast"}, {"id": "lib/service/connect.go::TeleportProcess::syncRotationStateCycle"}, {"id": "lib/service/connect.go::TeleportProcess::syncServiceRotationState"}, {"id": "lib/service/db.go::TeleportProcess::initDatabases"}, {"id": "lib/service/desktop.go::TeleportProcess::initWindowsDesktopService"}, {"id": "lib/service/kubernetes.go::TeleportProcess::initKubernetes"}, {"id": "lib/service/service.go::NewTeleport"}, {"id": "lib/service/service.go::Run"}, {"id": "lib/service/service.go::TeleportProcess::GetIdentity"}, {"id": "lib/service/service.go::TeleportProcess::initApps"}, {"id": "lib/service/service.go::TeleportProcess::initInstance"}, {"id": "lib/service/service.go::TeleportProcess::initSSH"}, {"id": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"id": "lib/service/service.go::newTeleportProcess"}, {"id": "lib/srv/db/common/auth.go::dbAuth::appendClientCert"}, {"id": "lib/srv/db/common/auth.go::dbAuth::getClientCert"}, {"id": "lib/tbot/renew.go::Bot::generateIdentity"}, {"id": "lib/tbot/renew.go::Bot::generateImpersonatedIdentity"}, {"id": "lib/tbot/renew.go::Bot::getIdentityFromToken"}, {"id": "lib/tbot/renew.go::Bot::renew"}, {"id": "lib/tbot/renew.go::Bot::renewIdentityViaAuth"}, {"id": "lib/tbot/renew.go::Bot::renewLoop"}, {"id": "lib/tbot/renew.go::generateKeys"}, {"id": "lib/tbot/tbot.go::Bot::Run"}, {"id": "lib/tbot/tbot.go::Bot::initialize"}, {"id": "lib/tbot/testhelpers/srv.go::MakeAndRunTestAuthServer"}, {"id": "tool/tctl/common/auth_command.go::AuthCommand::GenerateAndSignKeys"}, {"id": "tool/tctl/common/auth_command.go::AuthCommand::generateHostKeys"}, {"id": "tool/teleport/common/teleport.go::OnStart"}, {"id": "tool/teleport/common/teleport.go::Run"}, {"id": "tool/teleport/main.go::main"}], "edges": [{"source": "integration/helpers/fixture.go::Fixture::NewTeleportInstance", "target": "integration/helpers/instance.go::NewInstance"}, {"source": "integration/helpers/fixture.go::Fixture::NewTeleportWithConfig", "target": "integration/helpers/fixture.go::Fixture::NewTeleportInstance"}, {"source": "integration/helpers/fixture.go::Fixture::NewTeleportWithConfig", "target": "integration/helpers/instance.go::TeleInstance::CreateEx"}, {"source": "integration/helpers/instance.go::NewInstance", "target": "lib/auth/native/native.go::Keygen::GenerateKeyPair"}, {"source": "integration/helpers/instance.go::TeleInstance::CreateEx", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::Reset", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartApp", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartApps", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartDatabase", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartKube", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartNode", "target": "integration/helpers/instance.go::TeleInstance::startNode"}, {"source": "integration/helpers/instance.go::TeleInstance::StartNodeAndProxy", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartProxy", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartReverseTunnelNode", "target": "integration/helpers/instance.go::TeleInstance::startNode"}, {"source": "integration/helpers/instance.go::TeleInstance::startNode", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/auth/helpers.go::NewServerIdentity", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/auth/helpers.go::NewTestServer", "target": "lib/auth/helpers.go::NewTestTLSServer"}, {"source": "lib/auth/helpers.go::NewTestTLSServer", "target": "lib/auth/helpers.go::NewServerIdentity"}, {"source": "lib/auth/helpers.go::generateCertificate", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/auth/init.go::GenerateIdentity", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/auth/native/native.go::Keygen::GenerateKeyPair", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/client/interfaces.go::NewKey", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/reversetunnel/cache.go::certificateCache::generateHostCert", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::connect", "target": "lib/service/connect.go::TeleportProcess::firstTimeConnect"}, {"source": "lib/service/connect.go::TeleportProcess::connect", "target": "lib/service/connect.go::TeleportProcess::firstTimeConnectWithAssertions"}, {"source": "lib/service/connect.go::TeleportProcess::connect", "target": "lib/service/service.go::TeleportProcess::GetIdentity"}, {"source": "lib/service/connect.go::TeleportProcess::connectToAuthService", "target": "lib/service/connect.go::TeleportProcess::connect"}, {"source": "lib/service/connect.go::TeleportProcess::firstTimeConnect", "target": "lib/service/connect.go::TeleportProcess::generateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::firstTimeConnectWithAssertions", "target": "lib/service/connect.go::TeleportProcess::generateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::generateKeyPair", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::reRegister", "target": "lib/auth/init.go::GenerateIdentity"}, {"source": "lib/service/connect.go::TeleportProcess::reRegister", "target": "lib/service/connect.go::TeleportProcess::generateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::reconnectToAuthService", "target": "lib/service/connect.go::TeleportProcess::connectToAuthService"}, {"source": "lib/service/connect.go::TeleportProcess::rotate", "target": "lib/service/connect.go::TeleportProcess::reRegister"}, {"source": "lib/service/connect.go::TeleportProcess::syncRotationState", "target": "lib/service/connect.go::TeleportProcess::syncServiceRotationState"}, {"source": "lib/service/connect.go::TeleportProcess::syncRotationStateAndBroadcast", "target": "lib/service/connect.go::TeleportProcess::syncRotationState"}, {"source": "lib/service/connect.go::TeleportProcess::syncRotationStateCycle", "target": "lib/service/connect.go::TeleportProcess::syncRotationStateAndBroadcast"}, {"source": "lib/service/connect.go::TeleportProcess::syncServiceRotationState", "target": "lib/service/connect.go::TeleportProcess::rotate"}, {"source": "lib/service/db.go::TeleportProcess::initDatabases", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/desktop.go::TeleportProcess::initWindowsDesktopService", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/kubernetes.go::TeleportProcess::initKubernetes", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/db.go::TeleportProcess::initDatabases"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/desktop.go::TeleportProcess::initWindowsDesktopService"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/kubernetes.go::TeleportProcess::initKubernetes"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initInstance"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initSSH"}, {"source": "lib/service/service.go::Run", "target": "lib/service/service.go::newTeleportProcess"}, {"source": "lib/service/service.go::TeleportProcess::GetIdentity", "target": "lib/auth/init.go::GenerateIdentity"}, {"source": "lib/service/service.go::TeleportProcess::initApps", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/service.go::TeleportProcess::initInstance", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/service.go::TeleportProcess::initSSH", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/service.go::TeleportProcess::registerWithAuthServer", "target": "lib/service/connect.go::TeleportProcess::reconnectToAuthService"}, {"source": "lib/service/service.go::newTeleportProcess", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/srv/db/common/auth.go::dbAuth::appendClientCert", "target": "lib/srv/db/common/auth.go::dbAuth::getClientCert"}, {"source": "lib/srv/db/common/auth.go::dbAuth::getClientCert", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/tbot/renew.go::Bot::generateIdentity", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/tbot/renew.go::Bot::generateImpersonatedIdentity", "target": "lib/tbot/renew.go::Bot::generateIdentity"}, {"source": "lib/tbot/renew.go::Bot::getIdentityFromToken", "target": "lib/tbot/renew.go::generateKeys"}, {"source": "lib/tbot/renew.go::Bot::renew", "target": "lib/tbot/renew.go::Bot::generateImpersonatedIdentity"}, {"source": "lib/tbot/renew.go::Bot::renew", "target": "lib/tbot/renew.go::Bot::renewIdentityViaAuth"}, {"source": "lib/tbot/renew.go::Bot::renewIdentityViaAuth", "target": "lib/tbot/renew.go::Bot::getIdentityFromToken"}, {"source": "lib/tbot/renew.go::Bot::renewLoop", "target": "lib/tbot/renew.go::Bot::renew"}, {"source": "lib/tbot/renew.go::generateKeys", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/tbot/tbot.go::Bot::Run", "target": "lib/tbot/renew.go::Bot::renewLoop"}, {"source": "lib/tbot/tbot.go::Bot::Run", "target": "lib/tbot/tbot.go::Bot::initialize"}, {"source": "lib/tbot/tbot.go::Bot::initialize", "target": "lib/tbot/renew.go::Bot::getIdentityFromToken"}, {"source": "lib/tbot/testhelpers/srv.go::MakeAndRunTestAuthServer", "target": "lib/service/service.go::NewTeleport"}, {"source": "tool/tctl/common/auth_command.go::AuthCommand::GenerateAndSignKeys", "target": "tool/tctl/common/auth_command.go::AuthCommand::generateHostKeys"}, {"source": "tool/tctl/common/auth_command.go::AuthCommand::generateHostKeys", "target": "lib/client/interfaces.go::NewKey"}, {"source": "tool/teleport/common/teleport.go::OnStart", "target": "lib/service/service.go::Run"}, {"source": "tool/teleport/common/teleport.go::Run", "target": "tool/teleport/common/teleport.go::OnStart"}, {"source": "tool/teleport/main.go::main", "target": "tool/teleport/common/teleport.go::Run"}]}, "graph_spec": "These functions create and run Teleport services and test instances for infrastructure access, covering authentication, proxies, SSH nodes, applications, databases, Kubernetes, and Windows desktops. They manage service registration, authentication connections, cryptographic keys, and SSH/TLS identities and certificates—the credentials that establish trust between services and protected resources—including credential renewal and certificate-authority rotation. The scope also includes command-line startup and credential signing, database client authentication, and Machine ID bot initialization and identity renewal for automated access."}{"repo": "gravitational/teleport", "buggy_commit": "adc37b4ba31b1217a36a8aadbf72655a99a6eb95", "bug_issue": 14359, "solve_pr": 14867, "call_graph": {"nodes": [{"id": "lib/utils/ec2.go::InstanceMetadataClient::IsAvailable"}], "edges": []}, "graph_spec": "InstanceMetadataClient.IsAvailable checks the availability of Amazon EC2 instance metadata, accepting a context and returning a boolean availability indication. Instance metadata provides information about the running EC2 instance; this method lets callers assess access to that information through the metadata client."}{"repo": "gravitational/teleport", "buggy_commit": "b3822abafa5e2254886eaf320711cd1ef9eb2830", "bug_issue": 31816, "solve_pr": 32694, "call_graph": {"nodes": [{"id": "lib/devicetrust/enroll/enroll.go::Ceremony::RunAdmin"}, {"id": "tool/tsh/common/device.go::deviceEnrollCommand::run"}, {"id": "tool/tsh/common/device.go::printEnrollOutcome"}], "edges": [{"source": "tool/tsh/common/device.go::deviceEnrollCommand::run", "target": "lib/devicetrust/enroll/enroll.go::Ceremony::RunAdmin"}, {"source": "tool/tsh/common/device.go::deviceEnrollCommand::run", "target": "tool/tsh/common/device.go::printEnrollOutcome"}]}, "graph_spec": "These functions support enrolling the current device into Teleport Device Trust, where registration records a device in the inventory and enrollment establishes its credentials for trusted access. `deviceEnrollCommand.run` provides the command-line enrollment entry point, `Ceremony.RunAdmin` supports administrator-driven registration and enrollment and returns the device and an outcome indicator, and `printEnrollOutcome` presents the enrollment outcome to the user."}{"repo": "gravitational/teleport", "buggy_commit": "88152574bf3da2236df960af5fe7cf98a236d0a0", "bug_issue": 36838, "solve_pr": 36899, "call_graph": {"nodes": [{"id": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::findUnusedID"}, {"id": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::generateRSA"}], "edges": [{"source": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::generateRSA", "target": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::findUnusedID"}]}, "graph_spec": "PKCS#11 RSA generation must serialize the combined identifier-selection and key-creation operation so concurrent requests cannot select the same HSM identifier. It must select an identifier bound to the local host: ordinary HSMs use a newly generated UUID, while YubiHSM uses the first unoccupied two-byte CKA_ID in the permitted range 0x0001–0xfffe, excluding its reserved endpoint values; lookup errors or exhaustion must prevent creation and be returned as errors. The selected logical identifier must convert to the exact PKCS#11 identifier format for that HSM, and a successful operation must create a key pair labeled with the local host UUID at the configured RSA key size, returning both its signer and a serialized PKCS#11 key reference that preserves the host and key ID for later retrieval. Any failure in ID generation, conversion, HSM creation, or reference serialization must return no partial successful result, and serialization must always be released."}280 unmodified lines281282283284285286280 unmodified lines{"repo": "gravitational/teleport", "buggy_commit": "ca81b4a0c11f2a7412b8b5d086a9f8eb6e61d287", "bug_issue": 10589, "solve_pr": 10719, "call_graph": {"nodes": [{"id": "lib/sshutils/x11/display.go::Display::Dial"}, {"id": "lib/sshutils/x11/display.go::Display::Listen"}, {"id": "lib/sshutils/x11/display.go::Display::unixSocket"}], "edges": [{"source": "lib/sshutils/x11/display.go::Display::Dial", "target": "lib/sshutils/x11/display.go::Display::unixSocket"}, {"source": "lib/sshutils/x11/display.go::Display::Listen", "target": "lib/sshutils/x11/display.go::Display::unixSocket"}]}, "graph_spec": "An X server manages graphical displays and input, while X11 forwarding connects remote graphical applications to a local display. Within this scope, Display.Dial opens a connection to an X server display, Display.Listen opens a listener for display connections, and Display.unixSocket supplies the display’s associated Unix-domain socket address for these operations."}{"repo": "gravitational/teleport", "buggy_commit": "e2b1e9f54803484660644237a5f784aa68b7190c", "bug_issue": 11779, "solve_pr": 11878, "call_graph": {"nodes": [{"id": "integration/helpers.go::TeleInstance::Create"}, {"id": "integration/helpers.go::TeleInstance::CreateEx"}, {"id": "integration/helpers.go::TeleInstance::Reset"}, {"id": "lib/auth/init.go::Init"}, {"id": "lib/auth/init.go::migrateDBAuthority"}, {"id": "lib/service/service.go::NewTeleport"}, {"id": "lib/service/service.go::Run"}, {"id": "lib/service/service.go::TeleportProcess::initAuthService"}, {"id": "lib/service/service.go::newTeleportProcess"}, {"id": "tool/teleport/common/teleport.go::OnStart"}], "edges": [{"source": "integration/helpers.go::TeleInstance::Create", "target": "integration/helpers.go::TeleInstance::CreateEx"}, {"source": "integration/helpers.go::TeleInstance::CreateEx", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers.go::TeleInstance::Reset", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/auth/init.go::Init", "target": "lib/auth/init.go::migrateDBAuthority"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initAuthService"}, {"source": "lib/service/service.go::Run", "target": "lib/service/service.go::newTeleportProcess"}, {"source": "lib/service/service.go::TeleportProcess::initAuthService", "target": "lib/auth/init.go::Init"}, {"source": "lib/service/service.go::newTeleportProcess", "target": "lib/service/service.go::NewTeleport"}, {"source": "tool/teleport/common/teleport.go::OnStart", "target": "lib/service/service.go::Run"}]}, "graph_spec": "The scope must preserve Teleport lifecycle and auth initialization semantics: `TeleInstance.Create` delegates to `CreateEx`, which builds a complete isolated configuration (data directory, cluster identity, authorities, trusted clusters, addresses, storage, and optional services), creates the process through `NewTeleport`, and provisions configured users/roles when auth is enabled; `Reset` must fully close and wait for the prior process before recreating it from the retained configuration. `OnStart`/`Run` must construct a process, start it, require a readiness event within the startup deadline, then handle exit or reload signals, replacing processes only after the replacement is ready and gracefully shutting down the old one. `NewTeleport` must validate configuration, prepare persistent identity/storage state, and initialize only configured services; auth initialization must establish storage and audit/event plumbing before calling `auth.Init`. `Init` must serialize backend initialization, apply bootstrap resources only on first start, preserve an existing cluster name, install configured authorities/roles/tunnels and defaults, and ensure required certificate authorities exist. During that initialization, `migrateDBAuthority` must examine the local and trusted clusters, leave existing Database CAs untouched, and create a Database CA from an existing Host CA only when the Database CA is absent, while tolerating first-start cases where neither exists."}{"repo": "gravitational/teleport", "buggy_commit": "8bca6e20c6c7374080180f7a5b5ea62bb15c136c", "bug_issue": 13898, "solve_pr": 13918, "call_graph": {"nodes": [{"id": "api/client/inventory.go::NewUpstreamInventoryControlStream"}, {"id": "lib/auth/auth.go::Server::RegisterInventoryControlStream"}, {"id": "lib/auth/auth_with_roles.go::ServerWithRoles::RegisterInventoryControlStream"}, {"id": "lib/auth/grpcserver.go::GRPCServer::InventoryControlStream"}, {"id": "lib/inventory/controller.go::Controller::RegisterControlStream"}, {"id": "lib/inventory/controller.go::Controller::handleControlStream"}, {"id": "lib/inventory/controller.go::Controller::handleHeartbeat"}, {"id": "lib/inventory/controller.go::Controller::handleSSHServerHB"}], "edges": [{"source": "lib/auth/auth.go::Server::RegisterInventoryControlStream", "target": "lib/inventory/controller.go::Controller::RegisterControlStream"}, {"source": "lib/auth/auth_with_roles.go::ServerWithRoles::RegisterInventoryControlStream", "target": "lib/auth/auth.go::Server::RegisterInventoryControlStream"}, {"source": "lib/auth/grpcserver.go::GRPCServer::InventoryControlStream", "target": "api/client/inventory.go::NewUpstreamInventoryControlStream"}, {"source": "lib/inventory/controller.go::Controller::RegisterControlStream", "target": "lib/inventory/controller.go::Controller::handleControlStream"}, {"source": "lib/inventory/controller.go::Controller::handleControlStream", "target": "lib/inventory/controller.go::Controller::handleHeartbeat"}, {"source": "lib/inventory/controller.go::Controller::handleHeartbeat", "target": "lib/inventory/controller.go::Controller::handleSSHServerHB"}]}, "graph_spec": "These functions provide the auth-server side of Teleport’s inventory control streams: bidirectional connections through which instances advertise their presence, version, and active services. They wrap the gRPC stream, support registration through authorization and auth-service layers, and manage incoming messages and keepalives in the inventory controller. The heartbeat handlers process instance-state announcements, including SSH server descriptions, to support server presence and liveness tracking."}{"repo": "gravitational/teleport", "buggy_commit": "adc37b4ba31b1217a36a8aadbf72655a99a6eb95", "bug_issue": 14359, "solve_pr": 14867, "call_graph": {"nodes": [{"id": "lib/utils/ec2.go::InstanceMetadataClient::IsAvailable"}], "edges": []}, "graph_spec": "InstanceMetadataClient.IsAvailable checks the availability of Amazon EC2 instance metadata, accepting a context and returning a boolean availability indication. Instance metadata provides information about the running EC2 instance; this method lets callers assess access to that information through the metadata client."}{"repo": "gravitational/teleport", "buggy_commit": "b3822abafa5e2254886eaf320711cd1ef9eb2830", "bug_issue": 31816, "solve_pr": 32694, "call_graph": {"nodes": [{"id": "lib/devicetrust/enroll/enroll.go::Ceremony::RunAdmin"}, {"id": "tool/tsh/common/device.go::deviceEnrollCommand::run"}, {"id": "tool/tsh/common/device.go::printEnrollOutcome"}], "edges": [{"source": "tool/tsh/common/device.go::deviceEnrollCommand::run", "target": "lib/devicetrust/enroll/enroll.go::Ceremony::RunAdmin"}, {"source": "tool/tsh/common/device.go::deviceEnrollCommand::run", "target": "tool/tsh/common/device.go::printEnrollOutcome"}]}, "graph_spec": "These functions support enrolling the current device into Teleport Device Trust, where registration records a device in the inventory and enrollment establishes its credentials for trusted access. `deviceEnrollCommand.run` provides the command-line enrollment entry point, `Ceremony.RunAdmin` supports administrator-driven registration and enrollment and returns the device and an outcome indicator, and `printEnrollOutcome` presents the enrollment outcome to the user."}{"repo": "gravitational/teleport", "buggy_commit": "88152574bf3da2236df960af5fe7cf98a236d0a0", "bug_issue": 36838, "solve_pr": 36899, "call_graph": {"nodes": [{"id": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::findUnusedID"}, {"id": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::generateRSA"}], "edges": [{"source": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::generateRSA", "target": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::findUnusedID"}]}, "graph_spec": "PKCS#11 RSA generation must serialize the combined identifier-selection and key-creation operation so concurrent requests cannot select the same HSM identifier. It must select an identifier bound to the local host: ordinary HSMs use a newly generated UUID, while YubiHSM uses the first unoccupied two-byte CKA_ID in the permitted range 0x0001–0xfffe, excluding its reserved endpoint values; lookup errors or exhaustion must prevent creation and be returned as errors. The selected logical identifier must convert to the exact PKCS#11 identifier format for that HSM, and a successful operation must create a key pair labeled with the local host UUID at the configured RSA key size, returning both its signer and a serialized PKCS#11 key reference that preserves the host and key ID for later retrieval. Any failure in ID generation, conversion, HSM creation, or reference serialization must return no partial successful result, and serialization must always be released."}
data/test.jsonl-1