1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-08 03:23:50 +00:00

[PM-15934] Add agent-forwarding detection and git signing detection parsers (#12371)

* Add agent-forwarding detection and git signing detection parsers

* Cleanup

* Pin russh version

* Run cargo fmt

* Fix build

* Update apps/desktop/desktop_native/core/src/ssh_agent/mod.rs

Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>

* Pass through entire namespace

* Move to bytes crate

* Fix clippy errors

* Fix clippy warning

* Run cargo fmt

* Fix build

* Add renovate for bytes

* Fix clippy warn

---------

Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
This commit is contained in:
Bernd Schoolmann
2025-02-26 12:12:27 +01:00
committed by GitHub
parent ce5a5e3649
commit cb028eadb5
14 changed files with 203 additions and 39 deletions

View File

@@ -47,7 +47,7 @@ export class MainSshAgentService {
init() {
// handle sign request passing to UI
sshagent
.serve(async (err: Error, cipherId: string, isListRequest: boolean, processName: string) => {
.serve(async (err: Error, sshUiRequest: sshagent.SshUiRequest) => {
// clear all old (> SIGN_TIMEOUT) requests
this.requestResponses = this.requestResponses.filter(
(response) => response.timestamp > new Date(Date.now() - this.SIGN_TIMEOUT),
@@ -56,10 +56,12 @@ export class MainSshAgentService {
this.request_id += 1;
const id_for_this_request = this.request_id;
this.messagingService.send("sshagent.signrequest", {
cipherId,
isListRequest,
cipherId: sshUiRequest.cipherId,
isListRequest: sshUiRequest.isList,
requestId: id_for_this_request,
processName,
processName: sshUiRequest.processName,
isAgentForwarding: sshUiRequest.isForwarding,
namespace: sshUiRequest.namespace,
});
const result = await firstValueFrom(