Skip to content

Add x402socks skill - #6602

Open
rnts08 wants to merge 1 commit into
github:mainfrom
rnts08:add-x402socks-skill
Open

rnts08 wants to merge 1 commit into
github:mainfrom
rnts08:add-x402socks-skill

Conversation

@rnts08

@rnts08 rnts08 commented Nov 25, 2026

Copy link
Copy Markdown

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:

  • reads the live catalog and exit fleet, then quotes a package before spending
  • requires an operator-signed one-use approval of the full payment terms (scheme,
    network, asset, recipient, asset domain, and maximum amount)
  • accepts exactly one live 402 accepts[] option that matches the approval
    exactly, with no cheapest-option selection
  • completes an x402 v2 EIP-3009 payment and captures the one-time token
  • routes requests through the selected exit over TLS CONNECT on 3129, consuming
    credentials internally and never printing the token
  • documents rotation, recovery from a settlement tx hash, and egress verification

Requirements:

  • an Agent Skills client that can run shell commands
  • Node.js + npm, or Python 3.10+ with uv, for the x402 client
  • an EVM wallet with USDC on Base, plus cast and free Base RPCs
  • the lowest-priced published package is $1 for 6h / 1GB
  • no account, email, card, or API key

Disclosure: 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:validate
  • npm run build

@rnts08
rnts08 requested review from a team as code owners November 25, 2026 12:24
Copilot AI adaptive review requested due to automatic review settings November 25, 2026 12:24
@github-actions github-actions Bot added new-submission PR adds at least one new contribution skills PR touches skills labels Nov 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 9 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 1
ℹ️ Info 2
Severity Rule File Line Match
🟠 package-exec-command skills/x402socks/README.md 63 npx skills add X402Socks/skill
ℹ️ skill-script-touched skills/x402socks/scripts/x402socks-browser.mjs 1 skills/x402socks/scripts/x402socks-browser.mjs
ℹ️ skill-script-touched skills/x402socks/scripts/x402socks.sh 1 skills/x402socks/scripts/x402socks.sh

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions github-actions Bot added merge-risk:high requires-submitter-fixes Submission has quality-gate findings that submitter must fix before maintainer review labels Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: 🛠️ Requires submitter fixes

Risk tier: merge-risk:high — Privileged execution, automation, or review-policy change
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access, including a maintainer with admin or maintain permission.

Why this tier
  • skills/x402socks/scripts/x402socks-browser.mjs is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • skills/x402socks/scripts/x402socks.sh is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • Spawns processes or evaluates code in skills/x402socks/references/endpoints.md
  • Spawns processes or evaluates code in skills/x402socks/references/payments.md
  • Spawns processes or evaluates code in skills/x402socks/scripts/x402socks-browser.mjs

Automated checks

Check Status Details
Line endings ✅ Passed Passed · logs
Spelling ❌ Contribution failure Failed step: Check spelling with codespell · logs
Generated README consistency ✅ Passed Passed · logs
Skill validation ✅ Passed Passed · logs
Skill lint (vally) ✅ Passed Passed · logs
Risk scan ✅ Passed Passed · logs
Contributor reputation ✅ Passed Passed · logs
Duplicate resource scan ✅ Passed Passed · logs
PR quality signal ⏭️ Skipped Skipped by its workflow · logs

Action needed

  • Spelling failed. Fix the misspellings reported by codespell in the job log.

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s); an approval from a maintainer with admin or maintain permission
  • The core-maintainers pool is not staffed yet; an approver with admin or maintain permission is required instead.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for 6842bc5 · gate run · This comment is maintained automatically — see submission gate docs.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Vally Lint Results

✅ All checks passed

Scope Checked
Skills 1
Agents 0
Total 1
Severity Count
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ ✅ x402socks (2/2 checks passed)
ℹ️ ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
ℹ️ ✓ spec-compliance: All spec checks passed.
ℹ️ ✓ [valid-refs] All file references across 1 skill(s) are valid.
ℹ️ ✓ valid-refs: All file references resolve to existing files within the skill directory.
ℹ️ 1 skill(s) linted, 1 passed
Full linter output
### Linting skills/x402socks
✅ x402socks (2/2 checks passed)
    ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
        ✓ spec-compliance: All spec checks passed.
    ✓ [valid-refs] All file references across 1 skill(s) are valid.
        ✓ valid-refs: All file references resolve to existing files within the skill directory.

1 skill(s) linted, 1 passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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

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"
Comment on lines +380 to +383
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.
Comment on lines +73 to +75
if (!st.isFile() || st.isSymbolicLink()
|| st.uid !== process.getuid() || (st.mode & 0o022) !== 0) {
stop("error: helper is not an operator-trusted file");
Comment on lines +191 to +195
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) => {
Comment on lines +179 to +181
const verified = spawnSync(helper, ["verify-approval"], {
input: `${signature}\n`, encoding: "utf8", env: process.env,
});
Comment on lines +186 to +187
const approvalPath = process.env.X402_APPROVAL_FILE;
if (!approvalPath) throw new Error("X402_APPROVAL_FILE is required");
Comment on lines +581 to +582
3. Assemble the x402 v2 payment payload:
`{ x402Version: 2, scheme: "exact", network, payload: { signature, authorization } }`.
Comment on lines +609 to +612
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
Comment on lines +14 to +15
4. Direct request without the proxy, using `X402SOCKS_BASELINE_IP` or explicit
`X402SOCKS_ALLOW_DIRECT_BASELINE=1` consent — is the target reachable at all?
@rnts08

rnts08 commented Nov 25, 2026

Copy link
Copy Markdown
Author

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 npx skills add scan hit is documentation text, not an executed command in this PR, but I will not argue the gate.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk:high new-submission PR adds at least one new contribution requires-submitter-fixes Submission has quality-gate findings that submitter must fix before maintainer review skills PR touches skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants