-
Notifications
You must be signed in to change notification settings - Fork 290
feat: add cookies, localStorage and sessionStorage #49
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
base: staging
Are you sure you want to change the base?
Conversation
Nice! I was thinking of integrating this as well!! I intentionally did not do this so that users would never send sensitive tokens to an LLM. I'm thinking we could leave this disabled by default and allow it to be configurable in the dev tools panel? It would also be nice to persist this config to the browser... On another note, what is everyone's thoughts on the security model for this? I'm wondering if users opt-in for this, maybe there's a way to "detect" a token in the cookies, local storage and session storage to avoid sending. Then make that a configurable option as well ("include tokens"). Perhaps regex could be a good starting point? |
This sounds great! Adding to it, we can have three modes to handle these data in the mcp server, all configurable from the dev tools panel:
Let me know your thoughts on this 👍 |
…nStorage) - Add the ability to retrieve and analyze cookies, localStorage, and sessionStorage. - Implement new MCP tools and API endpoints for accessing browser storage data. - Enhance the Chrome extension to capture browser storage.
- Introduces settings to control the inclusion of sensitive data. - Implements filtering for cookies, local storage, and session storage. - Adds entropy calculation for more aggressive sensitive data checking.
Hi, The server and Chrome extension now supports the three data sensitivity settings:
The "Hide Only Sensitive Data" uses a mix of regex matching for all cookie and storage values along with filtering based on Shannon entropy. On smaller strings, the entropy method might lead to false-positives on some shorter strings, so it is restricted to strings longer than 16 characters. All of this filtering is handled by the browser extension itself. None of the sensitive data is sent to the server unless the user has selected the "Hide Nothing" option. ScreenshotsDev Tools Panel
|
Wow! Incredible work!! 🙏 I'm pushing out a different release now which has taken some time to prepare. Lets get this in for the next release (maybe this weekend?) If you don't mind, can you resolve any conflicts we have with staging branch today? Happy to tackle them as well later this week - traveling a bunch right now and it's been difficult to keep up with all the updates/PRs 😅 |
Sure thing. I have merged the latest staging branch and have resolved the merge conflicts so we're good on that regard. |
audting -> auditing
docs: update README.md
Nice!!! Amazing :) Will review within the next few days and get this in for a release next Monday at the latest if all goes well! |
hey @tedjames did you get time to review this feature? lmk if you think we need to change something |
Hi, while working
browser-tools-mcp
, I felt that having access to cookies, localstorage, and sessionstorage would aid the agent in debugging errors.@tedjames let me know your thoughts and if I should make any further changes to this.
Thanks!
Overview of Changes
.editorconfig
file to maintain formatting consistencyMCP Functions introduced
mcp_getCookies
- Get cookies from the current pagemcp_getLocalStorage
- Get localStorage datamcp_getSessionStorage
- Get sessionStorage dataThis comment was updated to reflect the latest changes introduced in this PR based on further discussions.