8000 test(e2e): give the BEP grant seeds a GitHub scope and proxy_env steering by norrietaylor · Pull Request #2765 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

test(e2e): give the BEP grant seeds a GitHub scope and proxy_env steering - #2765

Merged
norrietaylor merged 3 commits into
mainfrom
fix/e2e-bep-grant-seeds
Oct 31, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
fix/e2e-bep-grant-seeds

Conversation

@norrietaylor
@norrietaylor norrietaylor commented Oct 30, 2026 •
Copy link
Copy Markdown
Member

Part of #1501. Found during the epic close-out audit.

Situation

Five live Box Egress Proxy cases in scripts/session-e2e.sh declared a grant as source = "broker" with no github: scope. SecretGrant::is_github (crates/boxes/src/core/bep.rs:201) needs that scope. So these boxes counted as credentialed upstreams but not as GitHub grants, and nothing was minted for them. Most also declared no steering, so steering resolved to dns (BEP-016), and no host has a box-zone resolver yet (BEP-017). Some also started on the default --network host_ip. A host_ip box on a VM host refuses hostname rules at the start, and the credentialed-upstream lane is in effect only for own_ip. Off the macOS lane that runs them (#2500, #2563), every one records NOT RUN, which is why CI never showed the problem.

Change

Case Change
bep_second_box_needs_no_sign_in (BEP-003), bep_box_env_holds_sealed_value_only (BEP-007) Add scopes = ["github:user-token"] and steering = "proxy_env". Start the boxes with --network own_ip --credentialed-upstream, as bep_first_slice_end_to_end does
bep_git_and_gh_against_private_repo, bep_git_credential_helper_sends_header (BEP-015) Add the scope. Admit uploads.github.com, which a GitHub grant's egress must admit (BEP-008)
bep_trust_box_files, which starts the grant box for every trust-store case (BEP-011) Add the scope and proxy_env, and start the grant box with --network own_ip --credentialed-upstream. The plain box is unchanged. Every caller is already behind bep_live_gate, which needs a sign-in

It also corrects two comments that said no box ships a git credential helper. #2547 shipped it, and #2499 is closed.

This PR fixes the seeds and flags these cases declare. It does not show that the cases pass: see below.

Verification

  • bash -n scripts/session-e2e.sh: syntax ok
  • just lint-shell: 49 scripts pass shellcheck
  • Every seed with scopes = ["github:user-token"] in the script is now paired with --network own_ip --credentialed-upstream at its min session activate (checked by grep).

Not verified

None of these cases has been run live. They need the macOS VM lane with a GitHub sign-in and E2E_BEP_PRIVATE_REPO. The proxy cannot start on the author's Mac, and on any other host the cases record NOT RUN. Whether they pass end to end is still open.

Known residual

The audit also found that min box audit< 8000 /code> shows no record for real boxes. It looks a box up by its hyphenated id, and the proxy writes the plain-hex id (BEP-042). This PR does not fix that. The cases that read the audit log will still fail at that step until it is fixed: bep_first_slice_end_to_end, the destroy-revocation cases, and BEP-070.b.

Summary by CodeRabbit

  • Tests
    • Expanded GitHub grant scenarios to cover user-token access and credentialed network routing to GitHub hosts.
    • Updated test descriptions to reflect the available Git credential helper.
    • Kept the no-grant scenario without the grant-specific network configuration.

…ring

Five live Box Egress Proxy cases declared `source = "broker"` with no
`github:` scope. SecretGrant::is_github needs that scope, so these boxes were
credentialed upstreams but not GitHub grants: nothing was minted, and with no
steering declared they resolved to `dns`, which has no box-zone resolver yet.
None of them could pass on a lane that runs them.

- bep_second_box_needs_no_sign_in, bep_box_env_holds_sealed_value_only:
  add the scope and proxy_env, and start the boxes own_ip with
  --credentialed-upstream as bep_first_slice_end_to_end does.
- bep_git_and_gh_against_private_repo, bep_git_credential_helper_sends_header:
  add the scope, and admit uploads.github.com, which a GitHub grant's egress
  must admit (BEP-008).
- bep_trust_box_files (the trust-store cases): add the scope and proxy_env.

Also corrects two comments that said no box ships a git credential helper;
#2547 shipped it.
@norrietaylor
norrietaylor requested a review from a team as a code owner October 30, 2026 23:03
@coderabbitai
coderabbitai Bot commented Oct 30, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 4375aacd-1b2a-49f9-8a5c-fbc8e6941010
Commits

Reviewing files that changed from the base of the PR and between 1aa59e1 and 8d6f4e0.

Files selected for processing: 1
  • scripts/session-e2e.sh

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review.

Walkthrough

GitHub grant end-to-end fixtures now request the github:user-token scope and configure proxy steering and network settings. Two proof descriptions now state that cloning and pushing use the box’s shipped Git credential helper.

Changes: GitHub grant test fixtures

Layer / File(s) Summary
Grant scopes and proxy settings
scripts/session-e2e.sh
Grant fixtures add the github:user-token scope, proxy_env steering, and credentialed own-IP network settings. The private-repository and credential-helper fixtures retain their package and GitHub DNS allowlist settings.
Trust-store fixture and credential-helper descriptions
scripts/session-e2e.sh
The trust-store grant fixture adds the token scope, proxy steering, a credentialed upstream, and GitHub DNS-host allowances. Plain boxes retain an empty egress-argument list. Two proof descriptions state that cloning and pushing use the shipped Git credential helper.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related issues

Suggested reviewers: evanspearman

Merge Risk: Minimal · up to 8d6f4

The fixture updates match the required GitHub grant, proxy, networking, and credential-helper contracts. No merge-blocking risk remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main E2E fixture changes. It uses a valid Conventional Commit format, imperative wording, lower-case subject text, and no trailing period.
Description check Passed The description provides detailed change context, affected cases, verification results, unverified live testing status, and known residual issues. It does not use the template headings exactly and omi…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description provides detailed change context, affected cases, verification results, unverified live testing status, and known residual issues. It does not use the template headings exactly and omits the checklist, but the required information is mostly complete.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 too large.)

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the grants at dawn,
The token scope is now switched on.
Proxy paths guide each GitHub hop,
While helper notes describe the shop.
The box can clone and push with care,
Then thumps a happy paw in air.

@minimal-foundry
minimal-foundry Bot commented Oct 30, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at 8d6f4e0c23b3.

Nothing to do.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot 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.

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread scripts/session-e2e.sh Resolved
@minimal-foundry minimal-foundry Bot 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.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 31, 2026
@norrietaylor
Copy link
Copy Markdown
Member < 8000 span data-view-component="true" class="Label ml-1 tmp-ml-1">Author

Live run of the reseeded cases (2026-10-31)

Setup:

case result
bep_root_ca_present_in_box_trust_store PASS
bep_root_ca_absent_from_box_without_credentialed_upstream PASS
bep_trust_env_points_at_bundle_and_root PASS
bep_box_env_holds_sealed_value_only PASS: "Sealed-value placement proof OK (two grant boxes started headless, each GH_TOKEN a sealed value of its own)"
bep_second_box_needs_no_sign_in PASS: "GitHub grant proof OK (two grant boxes started headless, with no sign-in prompt)"
bep_git_credential_helper_sends_header NOT RUN: no E2E_BEP_PRIVATE_REPO named
bep_destroy_with_proxy_down_refuses_by_attachment FAIL at min box audit e2e-bep-down-probe shows no refusal of the copied value. This is the known id-spelling defect, #2462 (BEP-042), as the PR body says. It is not this PR.

The three trust-store cases start their grant box with --network own_ip --credentialed-upstream and pass.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 9ebf1e7 Oct 31, 2026
35 checks passed
@norrietaylor
norrietaylor deleted the fix/e2e-bep-grant-seeds branch October 31, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0