Skip to content

Conversation

@4fun50
Copy link

@4fun50 4fun50 commented Jan 8, 2026

Description

This PR adds the ability to select a preferred audio input device for the Guitar Tools tuner, which is particularly useful for guitarists using external audio interfaces or sound cards to connect their instruments.

Changes

  • Added new command "List Audio Devices" to view and select available audio input devices
  • Implemented LocalStorage to persist the selected audio device across sessions
  • Modified tuner to use the selected device instead of always defaulting to the built-in microphone
  • Improved device name detection regex to support all device naming conventions (including names starting with lowercase letters or numbers)
  • Updated README.md with usage instructions for external audio interfaces
  • Updated CHANGELOG.md with all new features

How to use

  1. Run "List Audio Devices" command
  2. Select your preferred audio input device (e.g., audio interface)
  3. The tuner will now use the selected device automatically

Testing

Tested successfully with:

  • iRig HD 2 audio interface
  • Built-in MacBook microphone
  • External USB microphone

Screenshots

(Optional: you can add screenshots later if needed)

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: guitar-tools Issues related to the guitar-tools extension platform: macOS labels Jan 8, 2026
@raycastbot
Copy link
Collaborator

raycastbot commented Jan 8, 2026

Thank you for your first contribution! 🎉

🔔 @narghev you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="main"
FORK_URL="https://github.com/4fun50/extensions.git"
EXTENSION_NAME="guitar-tools"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

Due to our current reduced availability, the initial review may take up to 10-15 business days.

Copy link
Author

@4fun50 4fun50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating regex

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

This PR adds audio device selection functionality to the Guitar Tools extension, allowing users to choose their preferred audio input device (particularly useful for external audio interfaces).

Key changes:

  • New "List Audio Devices" command that parses system_profiler output to display available audio input devices
  • LocalStorage-based persistence for selected device preference
  • Modified tuner to use selected device via Sox's CoreAudio interface

Critical issue found:

  • Shell injection vulnerability in note.utils.ts line 67 where device name is interpolated into shell command without proper escaping

Minor issues:

  • CHANGELOG has duplicate headers and inconsistent dates
  • React key using array index instead of unique identifier

Confidence Score: 2/5

  • This PR has a critical security vulnerability that must be fixed before merging
  • Score reflects the shell injection vulnerability in note.utils.ts where the audio device name is inserted into a shell command without proper escaping. This could allow command injection if a device name contains shell metacharacters. The rest of the implementation is sound.
  • Pay critical attention to extensions/guitar-tools/src/utils/note.utils.ts - the shell command construction needs proper escaping

Important Files Changed

File Analysis

Filename Score Overview
extensions/guitar-tools/src/utils/note.utils.ts 2/5 Added audio device selection with shell injection vulnerability in command construction (line 67)
extensions/guitar-tools/src/list-audio-devices.tsx 4/5 New command to list and select audio devices, uses array index as React key which should be unique ID
extensions/guitar-tools/CHANGELOG.md 4/5 Updated with new features, has duplicate headers and date inconsistencies

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Copy link
Contributor

@0xdhrv 0xdhrv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion

@0xdhrv
Copy link
Contributor

0xdhrv commented Jan 8, 2026

Hi 👋

Thanks for your contribution 💪

I have now tested your extension, and I have some feedback ready for you:

I'm looking forward to testing this extension again 🔥

I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊

Feel free to contact me here or at Slack if you have any questions.

@0xdhrv 0xdhrv marked this pull request as draft January 8, 2026 05:12
⁠Remove duplicate headers and fix date inconsistencies
@4fun50 4fun50 marked this pull request as ready for review January 8, 2026 11:05
Fix shell injection vulnerability in audio device selection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: guitar-tools Issues related to the guitar-tools extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants