Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extended peer app info #12166

Closed
wants to merge 18 commits into from
Closed

Add extended peer app info #12166

wants to merge 18 commits into from

Conversation

quexten
Copy link
Contributor

@quexten quexten commented Nov 27, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-10414
https://bitwarden.atlassian.net/browse/PM-17457

📔 Objective

Add info about the app to the ssh agent. (can be used later for ddg/browser integration).

The idea is the following:

Most times, the process calling ssh-agent is something like ssh, git, etc. These are usually the child process of the GUI application. So we walk through the parents, and try for each process, to establish whether it is a GUI app.

On mac, we use the executable path to match it to an installed application. (Does not work reliably yet).

Linux currently works for un-sandboxed bitwarden-desktop installations, with either:

  • Snap
  • Flatpak
  • Gnome installed unsandboxed
    connecting desktop apps, though we can add support for both sandboxed bitwarden-desktop installations, and more connecting configurations.

This fails in some applications that don't have such a simple process hierarchy. For instance, running fedora toolboxes, or a flatpak based terminal, the contained terminal is running on the host, spawned by the flatpak daemon.

On windows, we: Use windows' apis to find all windows, and match these to pids. If a pid does not have a window, check the parent.
If we have found one, it is either a regular app, in which case we use the windows-icons crate, or a UWP app, in which case we use some custom rules to parse the manifest, and read the icon.

📸 Screenshots

Mac:
Screenshot 2024-11-27 at 14 43 42
Linux:
image

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@quexten quexten changed the title Add extended app info Add extended peer app info Nov 27, 2024
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.

Project coverage is 33.44%. Comparing base (12d2070) to head (7d32a73).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...esktop/src/platform/main/main-ssh-agent.service.ts 0.00% 19 Missing ⚠️
...desktop/src/platform/services/ssh-agent.service.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           km/test-peercred   #12166      +/-   ##
====================================================
- Coverage             33.48%   33.44%   -0.05%     
====================================================
  Files                  2877     2864      -13     
  Lines                 89911    89644     -267     
  Branches              17112    17070      -42     
====================================================
- Hits                  30106    29978     -128     
+ Misses                57426    57304     -122     
+ Partials               2379     2362      -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Logo
Checkmarx One – Scan Summary & Detailse9ec5398-e4c8-4be6-8539-5825602a92ea

New Issues

Severity Issue Source File / Package Checkmarx Insight
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 386 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 338 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 228 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 133 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 307 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Fixed Issues

Severity Issue Source File / Package
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 227
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 132
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 337
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 306
LOW Unpinned Actions Full Length Commit SHA /build-web.yml: 385
LOW Unsafe_Use_Of_Target_blank /apps/web/src/app/auth/settings/two-factor/two-factor-setup-authenticator.component.html: 58
LOW Unsafe_Use_Of_Target_blank /apps/web/src/app/auth/settings/two-factor/two-factor-setup-authenticator.component.html: 45

Base automatically changed from km/test-peercred to main December 11, 2024 11:53
@quexten quexten closed this Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant