Repository navigation
Add classic webhook scope evidence - #31
Merged
Merged
Conversation
efegokdemir
marked this pull request as ready for review
October 21, 2026 19:02
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.
What changed?
Adds separate offline evidence for classic
products/updateandorders/createwebhook subscriptions at API version 2026-10. Mapped topics produce EVIDENCED or NOT EVIDENCED results; unknown topics, versions and malformed declarations remain UNKNOWN. Classic webhooks remain separate from Shopify Events.Why?
The existing analyzer covered Admin GraphQL and Shopify Events but did not compare declared classic webhook topics with their documented scopes.
User-facing capabilities and implementation
Human, JSON, SARIF and Action outputs include the new evidence status and counts.
SG-SCOPE-001reports mapped missing scopes;SG-SCOPE-006keeps unknown evidence visible.orders/createaccepts the documentedread_ordersorread_marketplace_ordersalternatives;write_marketplace_ordersimplies the corresponding read scope. Optional scopes are not treated as granted, and only documented write-implies-read relationships are applied.Shopify source/evidence
The evidence registry records the source and API version. Tests cover mapped scopes, alternatives, optional-scope ambiguity, unknown topics/versions, duplicate and multiple subscriptions, Events separation, config selection, redaction and Action/SARIF output.
Compatibility
The CLI minimum is now Node.js 22, CI covers Node.js 22/24, and the Action remains on Node.js 24. GraphQL is upgraded to 17.0.2; its Node engine is compatible with both supported runtimes. Package version stays 0.3.0. Proposed next version: 0.4.0.
Tests
On Node.js 22.23.3 and 24.22.0:
npm ci --ignore-scripts,npm run build,npm test(102/102 each),npm run coverage(95.38% statements/lines, 84.00% branches, 100% functions),npm run lint,npm run typecheck,npm run package:smoke,npm run action:check,npm audit --omit=dev --audit-level=high(0 vulnerabilities),npm pack --dry-run, andgit diff --checkpassed. Package dry-run hashes matched across both runtimes. Hosted GitHub Actions passed: Node.js 22/24 CI, CodeQL, Dependency Review, and Snyk. Scorecard has no PR-branch result; its workflow is configured for main pushes and weekly runs.Security/privacy impact
Webhook destinations, filters and compliance values are not exposed. Unknown or unsupported evidence does not become a missing-scope claim. No credentials, telemetry, online scan dependency or Action write permission was added.
Limitations
The registry covers only the two mapped topics at 2026-10. Dynamic shop-specific Admin API subscriptions and protected customer-data approval are outside offline evidence.
Documentation impact
README, scope/evidence models, supported patterns, rule reference, limitations, changelog and roadmap were updated. The standalone GraphQL documentation now matches the implementation: without supported API-surface context it is UNKNOWN.
Release impact
Recommend 0.4.0 after review and hosted CI. The Node.js 22 minimum is a documented compatibility break. No version was bumped on this branch.
Review checklist