Skip to content

feat(x402): production-grade HTTP payment rails, persistent stores, w… - #480

Open
Unclebaffa wants to merge 4 commits into
Bitcoindefi:mainfrom
Unclebaffa:feature/x402-payment-rails
Open

feat(x402): production-grade HTTP payment rails, persistent stores, w…#480
Unclebaffa wants to merge 4 commits into
Bitcoindefi:mainfrom
Unclebaffa:feature/x402-payment-rails

fix(x402): resolve SSRF guard, subscription store write concurrency, …

fe00889
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Aug 19, 2026 in 40s

Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 59 in __tests__/x402-subscription-concurrency.test.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer "expect(stored).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbGJlF5bICpC6LbZUA&open=AaAbGJlF5bICpC6LbZUA&pullRequest=480

Check warning on line 32 in __tests__/x402-webhooks.test.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer "expect(deliveries).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbCuZ3qAnnN-dvfNy-&open=AaAbCuZ3qAnnN-dvfNy-&pullRequest=480

Check warning on line 44 in lib/protocols/x402-subscription-store.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make sure that using this pseudorandom number generator is safe here.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbGKP45bICpC6LbZUC&open=AaAbGKP45bICpC6LbZUC&pullRequest=480

Check warning on line 32 in __tests__/x402-subscriptions-persistence.test.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer "expect(onDisk).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbCu5mqAnnN-dvfNy_&open=AaAbCu5mqAnnN-dvfNy_&pullRequest=480

Check warning on line 106 in lib/protocols/x402-webhooks.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make sure that using this pseudorandom number generator is safe here.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbCu6UqAnnN-dvfNzE&open=AaAbCu6UqAnnN-dvfNzE&pullRequest=480

Check warning on line 40 in lib/protocols/x402-webhooks.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "RegExp.exec()" method instead.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbGKQM5bICpC6LbZUD&open=AaAbGKQM5bICpC6LbZUD&pullRequest=480

Check warning on line 61 in __tests__/x402-subscriptions-persistence.test.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer "expect(result.renewed).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbCu5mqAnnN-dvfNzA&open=AaAbCu5mqAnnN-dvfNzA&pullRequest=480

Check failure on line 80 in lib/protocols/x402-webhooks.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbCu6UqAnnN-dvfNzC&open=AaAbCu6UqAnnN-dvfNzC&pullRequest=480

Check warning on line 37 in __tests__/x402-subscription-concurrency.test.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer "expect(stored).toHaveLength(10)" over this generic assertion for better reporting; it works on any object with a numeric length property.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbGJlF5bICpC6LbZT_&open=AaAbGJlF5bICpC6LbZT_&pullRequest=480

Check warning on line 229 in lib/protocols/x402.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `.some(…)` over `.find(…)`.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbGKPu5bICpC6LbZUB&open=AaAbGKPu5bICpC6LbZUB&pullRequest=480

Check warning on line 101 in lib/protocols/x402-webhooks.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=Bitcoindefi_Open-Stellar&issues=AaAbGKQM5bICpC6LbZUE&open=AaAbGKQM5bICpC6LbZUE&pullRequest=480