Skip to content

BI: show order status(demo: proposed change) - #1

Open
Innov8zig wants to merge 2 commits into
mainfrom
demo/bi-order-status
Open

Innov8zig wants to merge 2 commits into
mainfrom
demo/bi-order-status

Conversation

@Innov8zig

Copy link
Copy Markdown
Owner

Demo of the ScopeMoat pull request check. Do not merge.

Commit 1 replays the recorded proposed change (a teammate's edit, t3 trace step 0): BI joins orders-db-net. Expected: BLOCK under the default policy, with the potential path and the fact to verify.
Commit 2 replays the recorded AI agent repair from the same trace: BI reads order status from the warehouse replica. Expected: PASS.

The local pre-commit hook was skipped on commit 1 (--no-verify) to show that the pull request check still catches the change. All data is fictional.

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

ScopeMoat: BLOCK

ScopeMoat enforced its configured policy and refused this change. Relate's query finds a potential path under the default policy, shown below with the edit that opened it.

Files in this pull request: deploy/compose.yaml

---
title: "deploy/compose.yaml: staged change vs HEAD"
---
flowchart LR
  n0["bi-dashboards<br/>enters scope"]
  n1["orders-api"]
  n2["checkout-api<br/>CDE"]
  n0 -->|"NEW, open: bi-dashboards joins orders-db-net"| n1
  n1 -->|"restricted"| n2
  style n0 fill:#fff3c4
  style n2 fill:#ffd7d7,stroke:#d62728
  linkStyle 0 stroke:#d62728,stroke-width:3px
Loading

Source: Relate Cypher rows for the candidate (revision 8e5cf5ec8d1229904124a0e2141dd291); yellow = system that enters scope, red outline = CDE system, red edge = the link the change opened.

Commit gate output (python -m scopemoat gate, engine and baseline from the base branch):

ScopeMoat commit gate: staged deploy/compose.yaml vs HEAD, baseline graph/brightline.rl at HEAD
Engine:   scopemoat/engine.py (committed; rules v5: scopemoat/rules_v5.py sha256 e02fb5cfdade)
Baseline: graph/brightline.rl at HEAD (sha256 cc306174b2cd; Brightline Outfitters core environment, no overrides (fictional); restricted_hops=in_scope) plus deploy/compose.yaml at HEAD
Network links changed by the staged file:
  + bi-dashboards -- orders-api (open, share orders-db-net)
  + bi-dashboards -- orders-db (open, share orders-db-net)
Before:   8 CDE, 13 other in scope
After:    8 CDE, 14 other in scope
VERDICT:  BLOCK: 1 system(s) enter scope, 0 move into the CDE
Coverage: judged only on the systems, links, data flows and security services modeled in this graph. A scoping aid, not a QSA assessment.
Enters scope:
  [R4R] bi-dashboards (other in scope): reaches CDE through a system with restricted CDE access (bi-dashboards -> orders-api -> checkout-api)
Relate path: bi-dashboards -> orders-api -> checkout-api  (Cypher on the Relate copy of the baseline with the change applied; no such path before the change)
Opened by:   bi-dashboards joins orders-db-net (new link bi-dashboards -- orders-api)
Relate:   already reaching the CDE before this change (no new path attributed to it): orders-db

What the default policy assumed

The default policy (restricted_hops=in_scope) treats a restricted hop with no recorded relay as potentially traversable. That is ScopeMoat's conservative default, not a PCI SSC rule. Under the stricter review policy the same change gives REVIEW REQUIRED, naming the facts to verify:

  • Can orders-api relay bi-dashboards-originated traffic to checkout-api? (the restricted hop behind this block)
  • Can bi-dashboards relay orders-db-originated traffic to orders-api?
Review-policy output
Network links changed by the staged file:
  + bi-dashboards -- orders-api (open, share orders-db-net)
  + bi-dashboards -- orders-db (open, share orders-db-net)
Before:   8 CDE, 6 other in scope
After:    8 CDE, 6 other in scope
VERDICT:  REVIEW REQUIRED: 2 system(s) gain access whose effect on the CDE depends on unresolved evidence
Coverage: judged only on the systems, links, data flows and security services modeled in this graph. A scoping aid, not a QSA assessment.
Review required (insufficient segmentation evidence):
  [RD] bi-dashboards (other in scope): Change at bi-dashboards. bi-dashboards could go from OUT to OTHER only because of this change (bi-dashboards -> orders-api -> checkout-api); unresolved, together: whether orders-api forwards traffic from bi-dashboards on to checkout-api (not known) The same change could also raise 6 system(s) that reach bi-dashboards: data-warehouse, ml-notebooks, customer-db, marketing-email, ad-pixel-service, cms (routes and unresolved facts in the detail).
  [RD] orders-db (other in scope): Change at orders-db. orders-db could go from OUT to OTHER only because of this change (orders-db -> bi-dashboards -> orders-api -> checkout-api); unresolved, together: whether orders-api forwards traffic from bi-dashboards on to checkout-api (not known); whether bi-dashboards forwards traffic from orders-db on to orders-api (not known) The same change could also raise 8 system(s) that reach orders-db: crm, erp, fraud-scoring, fulfillment, refund-service, dev-laptops, hr-system, wiki (routes and unresolved facts in the detail).
Relate:   no new path to the CDE (Cypher on the Relate copy of the baseline, before and after the change)

Explore the evidence in the browser (Relate's WebAssembly build): https://innov8zig.github.io/ScopeMoat/explorer/
Reproduce locally: https://github.com/Innov8zig/ScopeMoat#try-it-about-one-minute-from-clone-once-python-313-is-installed

Modeled PCI scope under a configured policy. A scoping aid, not a QSA assessment. All data fictional.

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

ScopeMoat: PASS

No modeled scope expansion: the same commit gate that runs as the local pre-commit hook found no new potential path to the cardholder data environment.

Files in this pull request: deploy/compose.yaml

---
title: "deploy/compose.yaml: staged change vs HEAD"
---
flowchart LR
  none["Relate: no new path to the CDE"]
Loading

Source: Relate Cypher rows for the candidate (revision 683acfc5e57b156e4124a0e2141dd291); yellow = system that enters scope, red outline = CDE system, red edge = the link the change opened.

Commit gate output (python -m scopemoat gate, engine and baseline from the base branch):

ScopeMoat commit gate: staged deploy/compose.yaml vs HEAD, baseline graph/brightline.rl at HEAD
Engine:   scopemoat/engine.py (committed; rules v5: scopemoat/rules_v5.py sha256 e02fb5cfdade)
Baseline: graph/brightline.rl at HEAD (sha256 cc306174b2cd; Brightline Outfitters core environment, no overrides (fictional); restricted_hops=in_scope) plus deploy/compose.yaml at HEAD
Network links changed by the staged file:
  (none)
VERDICT:  PASS: no modeled scope expansion (no network links added or removed in the model)
Coverage: judged only on the systems, links, data flows and security services modeled in this graph. A scoping aid, not a QSA assessment.
Relate:   no new path to the CDE (Cypher on the Relate copy of the baseline, before and after the change)

Explore the evidence in the browser (Relate's WebAssembly build): https://innov8zig.github.io/ScopeMoat/explorer/
Reproduce locally: https://github.com/Innov8zig/ScopeMoat#try-it-about-one-minute-from-clone-once-python-313-is-installed

Modeled PCI scope under a configured policy. A scoping aid, not a QSA assessment. All data fictional.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant