fix(paybox-plugin): prevent prompt injection from untrusted x402 service responses - #2
Open
magqqgq wants to merge 1 commit into
Open
fix(paybox-plugin): prevent prompt injection from untrusted x402 service responses#2magqqgq wants to merge 1 commit into
magqqgq wants to merge 1 commit into
Conversation
…ice responses ## Motivation This PR hardens the `paybox-x402-services` AI agent skill to prevent indirect prompt injection attacks, addressing a high-severity vulnerability identified during the workspace security audit. Previously, the agent lacked explicit instructions on how to handle third-party service descriptions, `get_contract` responses, and paid API response bodies, leaving it vulnerable to malicious endpoints attempting to steer its behavior into unauthorized spending or data exfiltration[cite: 17]. ## Modifications * **Untrusted Content Ingestion Guardrails (`skills/paybox-x402-services/SKILL.md`)**: * Added explicit directives instructing the agent to treat all service responses, errors, and metadata purely as data to report, never as instructions to follow[cite: 17]. * Prohibited the agent from complying with any third-party content that requests calling another service, raising a spend limit, revealing a key/credential, or disregarding earlier instructions[cite: 17]. * Established a strict security rule that a paid response attempting to steer agent behavior must be treated as a hostile action (an attacker spending money to reach the agent), requiring the agent to surface the suspicious content and immediately stop[cite: 17]. ## Checklist - [x] Format your code according to the Contributor Guide. - [ ] Add unit tests as outlined in the Contributor Guide. - [x] Update documentation as needed, including docstrings or example tutorials.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This PR hardens the
paybox-x402-servicesAI agent skill to prevent indirect prompt injection attacks, addressing a high-severity vulnerability identified during the workspace security audit. Previously, the agent lacked explicit instructions on how to handle third-party service descriptions,get_contractresponses, and paid API response bodies, leaving it vulnerable to malicious endpoints attempting to steer its behavior into unauthorized spending or data exfiltration[cite: 17].Modifications
skills/paybox-x402-services/SKILL.md):Checklist