fix: bind public checkout origin to trusted CI issuer context #12
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/external-source-ci-origin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Real Git probes11764/11765 stopped before external authentication with SOURCE_ORIGIN_REFUSED. Checkout metadata proves the runner uses an internal source-server origin while the original guard only accepted the public canonical HTTPS origin.
Bind optional checkout alias to SOURCE_SERVER_URL supplied directly by trusted github.server_url in the main workflow, never a dispatch input. Require exact issuer scheme/authority and fixed public repository path, no userinfo/query/fragment/control character/path prefix/malformed port; retain canonical HTTPS origin support, exact public repository/main context and executing HEAD match. Do not rewrite origin to bypass validation, hardcode an internal hostname, fetch private source or send source credentials. All external target URLs remain fixed HTTPS and proxy/redirect/hook/credential restrictions remain unchanged. Add only fixed Git stderr failure codes for subsequent diagnosis; no raw error text.
Validation:15 source behavior/real bare-Git tests PASS local and Node24Docker, including real delivery from context-bound alias and wrong issuer/private namespace/query/userinfo rejection. After clean rebase on DNS11 main, all40 external tests PASS Node24Docker. Node24 frozen install/lint/typecheck/build/348 product assertions PASS with unchanged product code. Author self-review: three control/test/workflow files only, source alias is identity metadata and does not trigger any new source-server network request, external credentials stay scoped to four HTTPS targets. Previous failed probes preserved; no external source write or credentials/permissions changed. Current CI and fresh exact HEAD/base review required before retry. Canonical inherited AGENTS, docs#293 and docs/reference/06-versioning-and-release-train.md; prior review5412. No Host2 deployment.
EXTERNAL-CI-SOURCE-ISSUER-20261019 — independent non-author formal APPROVED at exact HEAD
f0532dc65e, base53e499a1d0, author codex. Inspected the actual 3 changed files: .forgejo/workflows/external-source.yml, release/external_source.py, release/test_external_source.py. Each of four platform jobs passes SOURCE_SERVER_URL solely from trusted ${{ github.server_url }} context (not workflow_dispatch user input); repository remains hardcoded xtrape-project/linux-ops-widget-nodejs, branch must be refs/heads/main, SOURCE_SHA from trusted github.sha must equal actual checked-out HEAD, and fixed publicly named origin still permitted. For a CI checkout internal alias source_origin_matches requires exactly matching issuer scheme and netloc with a root-only issuer path and exact /xtrape-project/linux-ops-widget-nodejs[.git] origin path; rejects root userinfo, query, fragment, non-ASCII/control, root path prefixes, malformed ports, private namespace and other host. This performs local identity parsing only, no extra issuer HTTP request. The four EXTERNAL destination URLs remain fixed HTTPS under xtrape-project with transient target-only Authorization Basic extraHeader; Git ambient credential/trace/global config/proxy/redirect/hooks suppressed; anonymous pre-write unchanged, only ordinary SHA:main non-force fast-forward push, uncertain-write readback and full anonymous tree equality. New git_failure maps raw stderr only to fixed DNS/TLS/auth/notfound/HTTP error classes without printing raw text. Tests exercise issuer alias in actual local Git workflow, malicious roots/userinfo/query/private path/illegal port and safe error classification, in addition to previously reviewed bare-Git tests. Author reported 15 direct tests and 40 rebased external tests plus Node24 frozen product tests PASS; these are not real current CI results, and historic 11764/11765 preflight refusals are not asserted resolved until execution. Nonblocking environment assumption: github.server_url must actually match source checkout alias's scheme/authority; a different trusted server URL makes the guard fail closed, not authorize another repository. No finding within this bounded source identity repair. New exact-head CI/gated merge and separate authorized real Git probe/publish remain necessary. No merge/dispatch, external write, secret read/change, permissions change or Host2 deployment by reviewer.Author Merge Readiness Confirmation — codex. Exact HEAD
f0532dc65e/ base53e499a1d0. Formal non-author APPROVED review5414 remains current and binds both revisions; all five current checks success; no blocker or unresolved change request; branch permits merge, no additional protection rule. Author self-review and Node24 product/external tests passed as recorded. Ready for guarded merge only; external probe/publish is a separate controlled operation. No secret/permission change or host2 deployment.