Repository navigation
Add x402socks skill - #6602
Add x402socks skill#6602rnts08 wants to merge 1 commit into
Conversation
🔒 PR Risk Scan ResultsScanned 9 changed file(s).
|
🚦 Submission status: 🛠️ Requires submitter fixesRisk tier: Why this tier
Automated checks
Action needed
Review
Commands
Updated for |
🔍 Vally Lint Results✅ All checks passed
Summary
Full linter output |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical flaws allow signed-approval replay, traffic to bypass proxy and host restrictions, and credential exposure, undermining payment authorization and privacy guarantees.
24 open issues
Use the provider's actual service-name field · New Persist the token and settlement metadata before exiting · New Protect the helper from agent-controlled replacement · New Prevent WebRTC UDP traffic from bypassing the proxy · New Block unapproved WebSocket connections · New Enforce response and job byte limits during transfer · New Create output files exclusively to prevent symlink writes · New Pin the Base USDC asset and network before approval · New Read tokens without echo and pipe them to save-token · New Treat unresolved prior payments as inconclusive · New Protect approval claims from agent-controlled replay · New Use the helper's default token path in the browser runner · New Check TLS CONNECT capability before approving an exit · New Sync the approval claim before confirming it · New Check the egress-test host against the allowlist · New Fail on HTTP errors and validate normalized IP addresses · New Bind structured entitlements to authoritative purchase terms · New Verify and claim each approval exactly once · New Set approval environment variables for the helper · New Reconcile before consuming the one-use approval · New
And 4 more that still need to be addressed.
What changed in this PR
Adds an x402socks Agent Skill to Awesome GitHub Copilot for purchasing short-lived proxy egress for authorized targets using USDC on Base through x402.
Changes:
- Documents wallet setup, signed purchase approvals, payment flows, and recovery.
- Bundles a shell helper and Playwright runner for TLS CONNECT proxy access.
- Adds the skill to the generated skills index.
| File | Description |
|---|---|
skills/x402socks/SKILL.md |
Defines triggers, purchase workflow, and safety requirements. |
skills/x402socks/scripts/x402socks.sh |
Implements discovery, quotes, token handling, approvals, and proxy requests. |
skills/x402socks/scripts/x402socks-browser.mjs |
Adds browser fetching with destination checks and proxy configuration. |
skills/x402socks/references/wallet.md |
Documents wallet setup and signing with cast. |
skills/x402socks/references/troubleshooting.md |
Describes diagnostics, retries, and stopping conditions. |
skills/x402socks/references/payments.md |
Provides approval, payment-client, and recovery guidance. |
skills/x402socks/references/endpoints.md |
Documents API contracts and client examples. |
skills/x402socks/README.md |
Explains installation, requirements, and bundled resources. |
skills/x402socks/assets/purchase-approval.md |
Supplies the signed purchase-approval template. |
docs/README.skills.md |
Registers the skill and its bundled files. |
Review effort: Max (adaptive)
| "url": "https://payments.x402socks.com/v1/access", | ||
| "description": "Create an x402socks proxy access account", | ||
| "mimeType": "application/json", | ||
| "service_name": "x402socks" |
| const data = (await res.json()) as { token?: string }; | ||
| if (typeof data.token !== "string") throw new Error("purchase response had no token"); | ||
| // Pass data.token to your 0600 token store. Never log it or the raw response. | ||
| // Keep PAYMENT-RESPONSE locally if recovery needs the tx hash. |
| if (!st.isFile() || st.isSymbolicLink() | ||
| || st.uid !== process.getuid() || (st.mode & 0o022) !== 0) { | ||
| stop("error: helper is not an operator-trusted file"); |
| browser = await chromium.launch({ | ||
| args: ["--disable-webrtc"], | ||
| proxy: { server: proxyServer, username: token, password: token }, | ||
| }); | ||
| const context = await browser.newContext({ serviceWorkers: "block" }); |
| proxy: { server: proxyServer, username: token, password: token }, | ||
| }); | ||
| const context = await browser.newContext({ serviceWorkers: "block" }); | ||
| await context.route("**/*", async (route) => { |
| const verified = spawnSync(helper, ["verify-approval"], { | ||
| input: `${signature}\n`, encoding: "utf8", env: process.env, | ||
| }); |
| const approvalPath = process.env.X402_APPROVAL_FILE; | ||
| if (!approvalPath) throw new Error("X402_APPROVAL_FILE is required"); |
| 3. Assemble the x402 v2 payment payload: | ||
| `{ x402Version: 2, scheme: "exact", network, payload: { signature, authorization } }`. |
| uses the same consent policy as a purchase: get a fresh explicit decision, | ||
| record it in `assets/purchase-approval.md`, have the operator sign it outside the | ||
| agent's write scope, and pass `verify-approval` before requesting any recovery | ||
| signature. A prior purchase approval, a settled tx hash, or a `502` alone does |
| 4. Direct request without the proxy, using `X402SOCKS_BASELINE_IP` or explicit | ||
| `X402SOCKS_ALLOW_DIRECT_BASELINE=1` consent — is the target reachable at all? |
|
Thanks for the review. I went through the submission gate and all 24 inline findings. I am treating them as blocking for this v1.3.6 snapshot and am not requesting merge as-is. This PR is a list proposal that vendors the current upstream skill folder, not a claim that the skill has passed this repo's high-risk submission gate. The findings are correctly identified: provider field mismatch in the payment example, token and settlement persistence, helper trust boundary, WebRTC, WebSocket, response-size and output-file gaps in the browser runner, asset pinning, terminal echo, reconcile and claim ordering, claim durability, exit capability validation, egress-test validation, entitlement binding, recovery authorization, and the x402 v2 envelope. The I am leaving the PR open for visibility and will not resolve review threads. Please close it if that is preferable. I will follow up from the upstream skill repo with a revised security model and verified tests, not by pushing a partial fix into this list PR. |



Adds a skill for buying short-lived proxy egress for authorized targets with
USDC on Base through the x402 protocol. TLS HTTP CONNECT on port 3129 is the only
transport in the production workflow and helper; credentials stay inside the
TLS tunnel and are never printed into an agent transcript.
What it does:
network, asset, recipient, asset domain, and maximum amount)
accepts[]option that matches the approvalexactly, with no cheapest-option selection
credentials internally and never printing the token
Requirements:
castand free Base RPCsDisclosure: maintained by the x402socks project. The skill spends the user's
funds only after the quoted amount is approved. MIT licensed.
Repo: https://github.com/X402Socks/skill
Directory: https://skills.sh/X402Socks/skill
Validation:
npm run skill:validatenpm run build