Skip to content
Closed
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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
types: [opened, synchronize, reopened, edited]
workflow_dispatch:

Expand Down Expand Up @@ -1256,7 +1255,7 @@ jobs:
contents: read
pull-requests: write
needs: [buf-check, docker-lint, shellcheck, python-script-validation, dev-tool-contract-checks, dev-tools-readme-contract, yaml-lint, metrics-cardinality-check, flyway-migration-sanity-checks, grpc-transport-config-sanity-checks, workflow-lint, helm-lint, helm-render-validation, helm-transaction-proof, docs-check, frontend-checks, build-and-test, validation-gate]
if: ${{ always() && github.event_name == 'pull_request' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
steps:
- name: Harden runner
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-pr-runtime-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ jobs:
fail("source workflow run API id does not match the event")
if source_run.get("workflow_id") != int(workflow_id_text):
fail("source workflow identity changed between event and API")
if source_run.get("name") != source_title:
fail("source workflow API name differs from its exact run title")
if source_run.get("name") not in {"Build Runtime Images", source_title}:
fail("source workflow API name is neither its owning name nor exact run title")
if source_run.get("path") != SOURCE_WORKFLOW_PATH:
fail("source workflow API path is not the trusted runtime-images workflow")
if source_run.get("event") != source_event:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ jobs:
uses: ./.github/actions/setup-trivy

- name: 🔍 Run Trivy and Save Report
shell: bash
run: |
echo "::group::Run Trivy"
trivy fs --config config/security/trivy.yaml . | tee trivy-report.txt
Expand Down Expand Up @@ -207,7 +208,7 @@ jobs:
contents: read
pull-requests: write # Publishes the consolidated security result on the PR.
needs: [changes, trivy-scan, secret-compliance, security-gate]
if: ${{ always() && github.event_name == 'pull_request' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
steps:
- name: Harden runner
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5
Expand Down
51 changes: 48 additions & 3 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
".github/actions/load-workflow-tool-versions/",
".github/actions/setup-python/",
"dev-tools/smoke/",
"dev-tools/minio/",
];
const fullRelevantFiles = new Set([
"build.gradle.kts",
Expand Down Expand Up @@ -145,7 +146,7 @@ jobs:
contents: read
pull-requests: write
needs: [changes]
if: ${{ always() && github.event_name == 'pull_request' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
steps:
- name: Harden runner
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5
Expand Down Expand Up @@ -198,6 +199,26 @@ jobs:
`- ${statusIcon(fullResult)} PR Full-Stack Smoke: \`${fullResult}\``,
].join("\n");

const expectedHeadSha = context.payload.pull_request.head.sha;
const expectedBaseRef = context.payload.pull_request.base.ref;
const expectedBaseSha = context.payload.pull_request.base.sha;
const { data: currentPullRequest } = await github.rest.pulls.get({
...context.repo,
pull_number: context.issue.number,
});
if (
currentPullRequest.state !== "open" ||
currentPullRequest.head.sha !== expectedHeadSha ||
currentPullRequest.base.ref !== expectedBaseRef ||
currentPullRequest.base.sha !== expectedBaseSha
) {
core.info(
`Skipping stale smoke summary for ${expectedBaseRef}@${expectedBaseSha}...${expectedHeadSha}; ` +
`current PR state/base/head is ${currentPullRequest.state}/${currentPullRequest.base.ref}@${currentPullRequest.base.sha}/${currentPullRequest.head.sha}`
);
return;
}

const comments = await github.paginate(
github.rest.issues.listComments,
{
Expand Down Expand Up @@ -277,7 +298,7 @@ jobs:
contents: read
pull-requests: write
needs: [changes, smoke-gate, smoke-summary-pending]
if: ${{ always() && github.event_name == 'pull_request' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
steps:
- name: Harden runner
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5
Expand Down Expand Up @@ -334,6 +355,26 @@ jobs:
`- ${statusIcon(fullResult)} PR Full-Stack Smoke: \`${fullResult}\``,
].join("\n");

const expectedHeadSha = context.payload.pull_request.head.sha;
const expectedBaseRef = context.payload.pull_request.base.ref;
const expectedBaseSha = context.payload.pull_request.base.sha;
const { data: currentPullRequest } = await github.rest.pulls.get({
...context.repo,
pull_number: context.issue.number,
});
if (
currentPullRequest.state !== "open" ||
currentPullRequest.head.sha !== expectedHeadSha ||
currentPullRequest.base.ref !== expectedBaseRef ||
currentPullRequest.base.sha !== expectedBaseSha
) {
core.info(
`Skipping stale smoke summary for ${expectedBaseRef}@${expectedBaseSha}...${expectedHeadSha}; ` +
`current PR state/base/head is ${currentPullRequest.state}/${currentPullRequest.base.ref}@${currentPullRequest.base.sha}/${currentPullRequest.head.sha}`
);
return;
}

const comments = await github.paginate(
github.rest.issues.listComments,
{
Expand Down Expand Up @@ -476,7 +517,11 @@ jobs:
const eventMergeSha = context.sha;
const prNumber = String(context.payload.pull_request.number);
const started = Date.now();
const timeoutMs = 25 * 60 * 1000;
// Contract-checked against pr-local-smoke; bounded overhead covers metadata,
// runner scheduling and API convergence, not unbounded queue delays.
const producerTimeoutMinutes = 45;
const prerequisiteAndQueueAllowanceMinutes = 45;
const timeoutMs = (producerTimeoutMinutes + prerequisiteAndQueueAllowanceMinutes) * 60 * 1000;
const cancelledReplacementTimeoutMs = 5 * 60 * 1000;
const sleepMs = 15000;
const pullRequestCheckInterval = 4;
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/static-analysis-summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ jobs:
if (
currentPullRequest.state !== "open" ||
!sourceWorkflowName ||
context.payload.workflow_run.name !== expectedSourceTitle ||
(context.payload.workflow_run.name !== sourceWorkflowName &&
context.payload.workflow_run.name !== expectedSourceTitle) ||
context.payload.workflow_run.display_title !== expectedSourceTitle
) {
core.info("The source run is not bound to the current open pull-request base and head.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ This is a non-normative implementation tracker for player access and session. Ca

## Current Status

The shared-auth successor to #2929 carries the exact canonical non-nil Account UUID through ordinary JWT `sub`/`accountId` matching, session identity helpers and delegated gRPC context. Numeric, nil, noncanonical, whitespace-normalized and non-string identities are rejected; tenant, private-row, character and session identifiers retain their separate declared types. A genuinely account-free internal workload omits `accountId`; an internal flag cannot discard a present malformed identity. The focused Common Security full check passed 34 tasks with all 122 unit cases executed and no failures or skips, including callback-context cleanup and malformed internal-identity denial. This is local helper/interceptor proof, not fresh-image or live authentication proof. Game Session's legacy numeric presence-viewer self-service cannot establish Account UUID authority and is unavailable; its existing tenant-role boundary remains. Interim Social numeric self-service and sender-bound mail likewise remain unavailable pending the approved complete Social UUID storage/API/consumer child after [#2932](https://github.com/benhook1013/FireMUD/pull/2932). No retained rows or published migrations are rewritten, and this correction does not complete #2932's gameplay carriers or enable admission.

The known legacy realm-grant mutation boundary now fails closed: otherwise-valid authenticated privileged POST/DELETE requests return `AUTH_UNAVAILABLE` before service dispatch, and direct grant/revoke service calls reject before repository access. Malformed and unauthorized requests retain their existing denial checks. This preserves retained four-field grant rows rather than revising them without lifecycle authority or hard-deleting their history. On owning #2923, the Account full check, formatting/static analysis, service JAR and documentation passed70tasks(23executed/47up-to-date), with511unit cases executed without skips/failures/errors. Strict readback confirms the two HTTP and two direct-service denial cases each executed once, including changed payload under the same request ID and both verbs' unauthenticated/nonprivileged denial. All159PostgreSQL cases skipped without local Docker; this is unit/no-dispatch proof, not database or deployed runtime proof. It does not implement ADR 0138's lifecycle-qualified authorization, bounded expiry, idempotent mutation, tombstones, event delivery or active-binding ejection; those remain required pre-v1 owner work. No runtime path or Account ring mount is enabled. The normally composed management child passed full Account/Game Session/shared-support checks, both service JARs and docs164tasks(29executed/135up-to-date), with517Account unit cases newly executed without skips/failures/errors; Game Session and shared-support test tasks were up-to-date. All161Account PostgreSQL cases skipped locally. The following source-head reports retain their historical attribution, not current-head runner or activation proof.

Exact corrected #2929 source `96fb1b803d4dd1c6a3cc8f39bda91ae537e25bb6` [CI36912843232](https://github.com/benhook1013/FireMUD/actions/runs/36912843232) completed aggregate FAILURE but strictly passed the V10 migration, changed-owner snapshot and two Account profile cases, each executed once with zero skips/failures/errors. The Account UUID suite14, snapshot suite4 and owner migration suite1 were clean. This proves the corrected PostgreSQL component behavior and recovery from the fixture username/binding failures below. Wider Game Session reached16CommunicationWebSocket behavioral assertions before cancellation; expected/actual values were absent from emitted logs and remain under bounded artifact diagnosis, not presumed fixed by the unpublished108-file carrier. Other aggregate jobs remain red; runtime activation and merge readiness are not established. See the dated runner readback and artifact-download safety follow-up in [AI observations](../ai-observations.md).

Exact #2929 source `73e19d7f8e74f8fa684c56ca0139ddac0751d31e` [CI36909989685](https://github.com/benhook1013/FireMUD/actions/runs/36909989685) completed aggregate FAILURE. The new management-owner migration case executed once and passed strict PostgreSQL verification, as did the four-case retained snapshot suite including exact changed-owner digest binding. Both new Account profile cases executed but failed during creation because their generated usernames exceeded `accounts.username VARCHAR(50)`; the artifact proves that constraint violation, not an identity/readback assertion failure. The longer Game Session cross-service task failed34of35cases during shared fixture setup because PostgreSQL rejected a string JDBC bind for the UUID owner column. Those fixtures now keep the full random suffix with shorter usernames and use a typed UUID bind with a focused assertion. The affected full Account/Game Session/shared-support checks and both JARs passed162tasks(36executed/126up-to-date); local PostgreSQL cases remain skipped, so corrected-head runner recovery proof is still required. Python, shared dev-tool and other module failures remain separately open, and none of these results enables runtime paths. See the dated [JDBC UUID observation](../ai-observations.md).

The canonical Account-identity candidate is based on exact #2923 `b93efaedbaec8a36294a594a946a010641e345b4`. Game Session owner requests, storage, readback and owner-self comparison use canonical UUIDs while V10.1 retains numeric owner evidence unchanged and unmapped. The closed version-2 retained-tenant snapshot binds both truthful owner slots; source locks, exact approval and immutable association readback remain required. Before enablement, the owner must inventory deployed migration history and read back the exact retained numeric and UUID owner slots; deployed-history provenance and readback are not established here. Demo seeding no longer invents an Account owner without an authoritative source. This does not activate catalog enrollment, the membership RPC or credentials, nor implement Account operator-reference/digest authorization. The separate gameplay session/presence child remains unpublished at108files; overlapping paths do not prove its remaining unique hunks fit the ceiling.
The canonical profile/management-owner front is based on exact #2923 `699a25e022c9224d24b7a491ee4ab1d4a67f22f2`. Game Session owner requests, storage, readback and owner-self comparison use canonical UUIDs while V10.1 retains numeric owner evidence unchanged and unmapped. The closed version-2 retained-tenant snapshot binds both truthful owner slots; source locks, exact approval and immutable association readback remain required. Before enablement, the owner must inventory deployed migration history and read back the exact retained numeric and UUID owner slots; deployed-history provenance and readback are not established here. Demo seeding no longer invents an Account owner without an authoritative source. This does not activate catalog enrollment, the membership RPC or credentials, nor implement Account operator-reference/digest authorization. The shared-JWT successor and separate published [#2932 gameplay session/presence carriers](https://github.com/benhook1013/FireMUD/pull/2932) remain distinct proof boundaries; publication and overlapping paths do not prove end-to-end admission.

Account profile responses, updates and local export now carry the exact provenance-checked Account UUID, not the private row key. Before profile access the service verifies the requested Account source/readback; it then checks exact profile Account/tenant ownership. REST rejects a body/path Account mismatch, malformed/numeric/nil selectors and unauthorized callers without dispatch. Profile IDs and the current numeric tenant selector remain distinct; retained rows are not rewritten. Tenant-qualified/delegated profile routes, membership-generation authorization, Social Groups' numeric profile/presence callers and complete export semantics remain open owner work, not completed by this carrier correction.

Expand Down
Loading
Loading