Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/e2e-script.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ on:
permissions:
contents: read

env:
# GitHub-hosted Linux runners retain dangerous bounding-set capabilities but
# do not grant CAP_SETPCAP to the sandbox entrypoint. Functional E2E runs opt
# in explicitly so #4264's fail-closed guard remains covered by the dedicated
# gateway-isolation security regression instead of breaking every sandbox use.
NEMOCLAW_ALLOW_RESIDUAL_CAPS: "1"

jobs:
run:
runs-on: ${{ inputs.runner }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/nightly-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ on:
permissions:
contents: read

env:
# GitHub-hosted Linux runners retain dangerous bounding-set capabilities but
# do not grant CAP_SETPCAP to the sandbox entrypoint. Nightly functional E2E
# jobs opt in explicitly so #4264's fail-closed guard remains covered by the
# dedicated gateway-isolation security regression instead of breaking every
# sandbox use on these CI hosts.
NEMOCLAW_ALLOW_RESIDUAL_CAPS: "1"

concurrency:
group: nightly-e2e-${{ github.event_name }}-${{ github.event_name == 'workflow_dispatch' && format('{0}-{1}', github.ref, inputs.pr_number || 'manual') || 'schedule' }}
cancel-in-progress: true
Expand Down
5 changes: 5 additions & 0 deletions test/e2e-script-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import { loadE2eWorkflowContract, reusableNightlyJobs } from "./helpers/e2e-work
describe("E2E reusable workflow contract", () => {
const { runnerWorkflow, nightlyWorkflow, action } = loadE2eWorkflowContract();

it("opts functional E2E workflows into residual-cap execution on CI hosts", () => {
expect(runnerWorkflow.env?.NEMOCLAW_ALLOW_RESIDUAL_CAPS).toBe("1");
expect(nightlyWorkflow.env?.NEMOCLAW_ALLOW_RESIDUAL_CAPS).toBe("1");
});

it("does not persist checkout credentials in the reusable runner", () => {
const checkoutSteps = runnerWorkflow.jobs.run.steps.filter((step) =>
String(step.uses ?? "").startsWith("actions/checkout@"),
Expand Down
2 changes: 2 additions & 0 deletions test/helpers/e2e-workflow-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ export type WorkflowStep = {
};

export type NightlyWorkflow = {
env?: Record<string, string>;
jobs: Record<string, WorkflowJob>;
};

export type RunnerWorkflow = {
env?: Record<string, string>;
jobs: {
run: {
steps: WorkflowStep[];
Expand Down
Loading