Skip to content

feat(#8508)!: run GitLab polling schedules as trigger account - #8519

Merged
ggallen merged 5 commits into
mainfrom
agent/8508-trigger-account-schedules
Oct 18, 2026
Merged

ggallen merged 5 commits into
mainfrom
agent/8508-trigger-account-schedules

Conversation

@fullsend-ai-coder

@fullsend-ai-coder fullsend-ai-coder Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Move managed GitLab polling schedules (fullsend slash poll and fullsend event poll) to the trigger-only service account after the dispatch activation gate passes. Scheduled polls then use the CI_JOB_TOKEN child-pipeline route (source=pipeline) delivered by #8482.

GitLab requires a protected-branch schedule owner to have merge access. If the Developer trigger account lacks that access, including on GitLab Free projects with Maintainers-only merge access, schedules remain installer-owned and polling continues through the Poller api route. The installer does not widen branch merge permissions to enable the move.

Closes #8508. Part of #8438. The managed webhook route is separate work in #8509.

Implementation

  • Gate ownership transfer on live trigger-account state, protected-branch merge access, dispatch restrictions, and committed CI configuration. The checks cover source admission for custom stages, unrelated jobs and includes, the root/wrapper/agent input contract and GitLab's input limit, the effective STAGE bridge including workflow overrides, script integrity, and overrides of variables used before identity verification. Bootstrap curl and tar commands also disable configuration and options that could execute untrusted code.
  • Create replacements before removing existing schedules, and verify their owner, ref, cron, timezone, active state, and variables. Preserve disabled schedules as disabled. Recover from interrupted adoption, drift repair, and hand-back without deleting a schedule whose ownership has changed unexpectedly.
  • Return account-owned schedules to the installer when activation is withdrawn, the account is retired or elevated, or a required check defers. Uninstall removes account-owned managed schedules without replacement.
  • Keep the installer-owned Poller route and its required merge-grant support. The webhook and any safe cleanup of that support belong to GitLab: route the managed webhook through the trigger-only account and remove the per-user merge grant #8509; the fallback must continue to work there.
  • Document the administrator trust assumption for inherited GitLab CI/CD variable scopes that the installer cannot read, the temporary PAT risk, the minimum compatible CLI and upgrade order, and the scaffold repair needed after an agent job rename.

Breaking change

After schedules move to the trigger account, older fullsend CLIs treat them as foreign and refuse repos install and repos uninstall. Minimum CLI for installer operations: the first release or source commit containing #8508. The fullsend poll --print-dispatch-routes probe gates polling and has existed since #8482; pins older than #8482 cannot poll after transfer. Upgrade the installer and the project's pinned fullsend_ref before transferring ownership; merge the matching scaffold repair first. Do not delete the schedules manually. An untagged-SHA source pin now clears Git and Go environment selectors before building; runners that depend on these settings should use a release pin, as described in the GitLab setup guide.

Temporary PAT risk

Account-owned schedule creation uses a temporary api-scoped PAT for the Developer trigger account. This grants broader API authority than schedule creation needs and, together with the account's deploy-key grant, could allow protected-branch writes if compromised. The implementation records the obligation before minting, checks Developer access, limits expiry to one day, keeps the token value in memory, records the PAT ID before use, revokes it on success and failure, and contains interrupted runs. The accepted risk is documented in the GitLab role-credential guidance.

Verification and merge gate

  • Unit and transport regressions cover ownership, disabled-state preservation, interrupted cleanup, gate deferral, source separation, input bridging, helper tampering, and reactivation errors.
  • make lint and the Go tests for internal/repos, internal/cli, internal/gitlablifecycle, internal/forge, and internal/forge/gitlab pass locally. The repository package reports 92.4% statement coverage; the new workflow override check reports 85.7% coverage.
  • Live acceptance passed on PR head 4ad92bb (2026-10-18). On a disposable self-managed GitLab project, the natural slash-poll pipeline ran as trigger account user 36536 and dispatched a triage child pipeline with source=pipeline and the same creator. The agent job reached Running agent: triage, then stopped at inference credential validation because the disposable project lacked a usable Vertex credential. The test project was uninstalled and marked for deletion. This verifies the scheduled dispatch path required by GitLab: own managed polling schedules with the trigger-only account #8508; full agent completion and cross-tier behavior remain outside this check.

Full cross-tier live validation remains in #8245.

@fullsend-ai-review

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Ended 9:03 PM UTC

Commit: 7241eab · View workflow run →

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:05 PM UTC · Completed 9:21 PM UTC

Commit: 7241eab · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.61

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Site preview

Preview: https://c07c7cca-site.fullsend-ai.workers.dev

Commit: 4ad92bb5594d2023dda509a5c8728677ddd9783a

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Oct 16, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Large diff across 44 files with high recent churn in touched repository modules is balanced by substantial test coverage (0.41 ratio), bot authoring with no CI workflow or dependency modifications, and complete coverage of linked issue #8508 acceptance criteria.

Previous run

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Large diff across 44 files with breaking CLI compatibility is balanced by an established bot author, zero protected or security-sensitive paths, substantial test coverage, and complete alignment with active issue acceptance criteria.

Previous run (2)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

While the PR is large and introduces a breaking change for older CLIs, unchanged Tier 1 signals with strong test coverage (41%), zero protected or dependency file modifications, full alignment with issue #8508 acceptance criteria, and bot authorship keep overall risk moderate.

Previous run (3)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

While the PR is large and introduces a breaking change for older CLIs, unchanged Tier 1 signals with strong test coverage (41%), zero protected or dependency file modifications, full alignment with issue #8508 acceptance criteria, and bot authorship keep overall risk moderate.

Previous run (4)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

While the PR is large and introduces a breaking change for older CLIs, strong test coverage (42%), zero protected or dependency file modifications, full alignment with issue #8508 acceptance criteria, and bot authorship with maintainer sign-off keep overall risk moderate.

Previous run (5)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Large diff by an established bot author with substantial test coverage and no protected or dependency changes, balanced by elevated churn in touched repo areas and breaking schedule ownership changes gated by runtime activation checks rather than an opt-in toggle.

Previous run (6)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

High change volume, breaking CLI compatibility, and active file churn are balanced by comprehensive test coverage, zero protected path modifications, an established bot author, and strong linked issue alignment.

Previous run (7)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

While the PR has a large diff and modifies existing schedule ownership without a feature flag, risk remains moderate due to full issue acceptance criteria coverage, extensive unit tests, zero protected or security-sensitive file changes, and known bot authorship.

Previous run (8)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Large diff size and high recent churn in touched GitLab repository files are balanced by zero protected path changes, strong test file ratio (0.44), bot author, and clear alignment with linked issue acceptance criteria under an activation-gated schedule ownership transition.

Previous run (9)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Large diff size and high recent churn in touched GitLab repository files are balanced by zero protected path changes, strong test file ratio (0.44), bot author, and clear alignment with linked issue acceptance criteria under an activation-gated schedule ownership transition.

Previous run (10)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Large diff size and high recent churn in touched CLI and repository files are balanced by zero protected path changes, strong test file coverage, and clear alignment with the linked issue under an activation-gated schedule ownership transition.

Previous run (11)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Large diff size and high recent churn in touched CLI and repository files are balanced by zero protected path changes, strong test file coverage, and clear alignment with the linked issue under an activation-gated schedule ownership transition.

Previous run (12)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Large diff size and high recent churn in touched CLI and repository files are balanced by zero protected path changes, strong test file coverage, and clear alignment with the linked issue under an activation-gated schedule ownership transition.

Previous run (13)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Large diff (4,334 lines across 34 files) with high recent churn in internal/repos is balanced by a 41% test file ratio, zero protected or CI workflow changes, dispatch activation gate fallback safety, and complete alignment with linked issue acceptance criteria.

Previous run (14)

Risk Assessment: moderate (2/5)

Details

Large diff (4,205 lines across 34 files) with high recent churn in internal/repos is balanced by a 41% test file ratio, zero protected or CI workflow changes, dispatch activation gate fallback safety, and complete alignment with linked issue acceptance criteria.

Previous run (15)

Risk Assessment: moderate (2/5)

Details

Large diff (3,847 lines across 31 files) with high recent churn in internal/repos is balanced by a 45% test file ratio, zero protected or CI workflow changes, dispatch activation gate fallback safety, and complete alignment with linked issue acceptance criteria.

Previous run (16)

Risk Assessment: moderate (2/5)

Details

Large diff (+3,472 lines across 31 files) with high recent churn in internal/repos is balanced by 45% test file ratio, zero protected or CI path changes, dispatch activation gate fallback safety, and complete alignment with linked issue acceptance criteria.

Previous run (17)

Risk Assessment: moderate (2/5)

Details

Large diff (+3435 lines across 31 files) in GitLab trigger schedule lifecycle with high recent churn in internal/repos, balanced by strong test coverage (45% test files), zero protected or CI paths, dispatch gate safety, and complete alignment with linked issue acceptance criteria.

Previous run (18)

Risk Assessment: moderate (2/5)

Details

Large diff (+3271 lines across 30 files) in GitLab trigger schedule lifecycle with high recent churn in internal/repos, balanced by strong test coverage (43% test files), no protected or CI paths, and close alignment with linked issue acceptance criteria.

Previous run (19)

Risk Assessment: moderate (2/5)

Details

Large diff (+3133 lines across 28 files) in GitLab trigger schedule lifecycle with high recent churn in internal/repos, balanced by strong test coverage (43% test files), no protected or CI paths, and close alignment with linked issue acceptance criteria.

Previous run (20)

Risk Assessment: moderate (2/5)

Details

Large diff size and high recent git churn are balanced by bot authorship, zero protected paths, strong test coverage, and alignment with the linked issue under an activation gate; Tier 1 signals are unchanged from the prior review.

Previous run (21)

Risk Assessment: moderate (2/5)

Details

Preserved moderate risk score as the incremental commit leaves Tier 1 metadata and activation-gated issue alignment unchanged, with large diff size and high recent churn balanced by bot authorship, zero protected paths, and strong test coverage.

Previous run (22)

Risk Assessment: moderate (2/5)

Details

Large diff size and high churn across repository management files are balanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with the linked issue under an activation gate.

Previous run (23)

Risk Assessment: moderate (2/5)

Details

Large diff size and high churn across repository management files are balanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with the linked issue under an activation gate.

Previous run (24)

Risk Assessment: moderate (2/5)

Details

Large diff size and moderate git churn across modified files are balanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with the linked issue under an activation gate.

Previous run (25)

Risk Assessment: moderate (2/5)

Details

Large diff size and moderate git churn across modified files are balanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with the linked issue under an activation gate.

Previous run (26)

Risk Assessment: moderate (2/5)

Details

Large diff size and high commit churn in touched files are counterbalanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with linked issue #8508 under an activation gate.

Previous run (27)

Risk Assessment: moderate (2/5)

Details

Large diff size and git churn are balanced by bot authorship, zero protected paths, strong test coverage, and full alignment with linked issue #8508 under an activation gate, with a minimal delta (about 50 lines across two files) since the prior review.

Previous run (28)

Risk Assessment: moderate (2/5)

Details

Large diff size and recent git churn across modified files are balanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with the linked issue under an activation gate.

Previous run (29)

Risk Assessment: moderate (2/5)

Details

Large diff size and recent git churn across modified files are balanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with the linked issue under an activation gate.

Previous run (30)

Risk Assessment: moderate (2/5)

Details

Large diff size and recent git churn across modified files are balanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with the linked issue under an activation gate.

Previous run (31)

Risk Assessment: moderate (2/5)

Details

Large diff size and recent git churn across modified files are balanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with the linked issue under an activation gate.

Previous run (32)

Risk Assessment: moderate (2/5)

Details

Large diff size and moderate git churn across modified files are balanced by bot authorship, zero protected paths, strong test coverage, and complete alignment with the linked issue under an activation gate.

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJiYWNrd2FyZC1pbmNvbXBhdGlibGUiLCJmaWxlIjoiaW50ZXJuYWwvc2NhZmZvbGQvZnVsbHNlbmQtcmVwby1naXRsYWIvLmdpdGxhYi9jaS9zY3JpcHRzL2luc3RhbGwtZnVsbHNlbmQtY2xpLnNoIiwiaWQiOiJmXzJmYzliMTE3OTk5MjQ2NDMiLCJsaW5lIjo5MywiYWN0aW9uYWJsZSI6ZmFsc2V9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImJhY2t3YXJkLWluY29tcGF0aWJsZSIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcmVwb3MuZ28iLCJpZCI6ImZfYTczMDdjMjliYzBhZWZiNiIsImxpbmUiOjg4NywiYWN0aW9uYWJsZSI6ZmFsc2V9XX0= -->

Review

Findings

Low

  • [backward-incompatible] internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/scripts/install-fullsend-cli.sh:93 — On the untagged-SHA fullsend_ref source-build path, the script now unsets GIT_EXEC_PATH, GIT_CONFIG_*, GIT_TEMPLATE_DIR, GOFLAGS, GOENV, GOTOOLCHAIN, GOROOT and GOCACHEPROG. Self-hosted or air-gapped runners that rely on GOTOOLCHAIN=local or GOFLAGS=-mod=vendor may reach the network or fail after the scaffold repair. Tagged release pins take the download path and are unaffected, and the PR docs describe the behavior.
    Remediation: Optionally keep a runner-set GOTOOLCHAIN=local and clear only code-injecting variables, or fail fast with a clear message. Mention the change in the scaffold-repair release notes.

  • [backward-incompatible] internal/cli/repos.go:887 — Once schedules move to the trigger account, older fullsend CLIs refuse repos install/repos uninstall with a generic "foreign resource" error. The PR documents the minimum CLI and marks the title with !, but the install output does not warn the person running a new install.
    Remediation: Optionally print a one-time info line during repos install when ownership transfers, pointing to the minimum CLI version.

Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImluamVjdGlvbi12dWxuIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90c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hYi9jaS9zY3JpcHRzL2luc3RhbGwtZnVsbHNlbmQtY2xpLnNoIiwiaWQiOiJmXzZjMzk2MmMyYTBkYmM0ODYiLCJhY3Rpb25hYmxlIjpmYWxzZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYmFja3dhcmQtaW5jb21wYXRpYmxlIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYmNpLmdvIiwiaWQiOiJmXzA5N2UzYjk1ZDIxMTY0NTQiLCJhY3Rpb25hYmxlIjpmYWxzZX1dfQ== -->

Review

Findings

Medium

  • [injection-vuln] internal/repos/gitlab_trigger_jobs.go:137 — The pre-authorization denylist gitlabPreauthProtectedVariables does not cover GitLab Runner checkout controls GIT_STRATEGY and GIT_CHECKOUT. A project/inherited variable or committed YAML setting GIT_STRATEGY=none or GIT_CHECKOUT=false passes the gate, and on a runner with a persistent workspace the managed jobs could source stale or modified install-fullsend-cli.sh or job scripts before identity/HMAC authorization. Exploitation needs a Maintainer-level principal and a persistent workspace, so this is defense-in-depth.
    Remediation: Add GIT_STRATEGY, GIT_CHECKOUT (and related checkout controls such as GIT_CLEAN_FLAGS) to gitlabPreauthProtectedVariables, with gate regression tests.

Low

  • [pattern-inconsistency] internal/repos/gitlab_trigger_dispatch_gate.go:227 — The script paths for trust-ci-server-ca.sh and select-gitlab-role-token.sh are raw string literals although gitlabTrustScriptPath and gitlabRoleTokenScriptPath exist in internal/repos/uninstall.go.
    Remediation: Use the existing constants.
  • [api-shape] internal/repos/gitlab_variable_scopes.go:47 — gitlabInheritedVariableScan hardcodes the "webhook fast-path deferred: " prefix, forcing gitlabDispatchVariableOverrideProblem (gitlab_trigger_dispatch_gate.go:674) to strip it with strings.TrimPrefix.
    Remediation: Return an unadorned reason from the scanner and let each consumer add its own prefix.
  • [doc-style] internal/repos/gitlab_trigger_consumer.go:19 — stageCondition has no doc comment.
    Remediation: Add a doc comment starting with stageCondition.
  • [doc-style] internal/repos/gitlab_trigger_dispatch_gate.go:476 — gitlabSafePinnedVersion has no doc comment.
    Remediation: Add a doc comment starting with gitlabSafePinnedVersion.
  • [backward-incompatible] internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/scripts/install-fullsend-cli.sh — The source-build path now unsets GOFLAGS, GOENV, GOTOOLCHAIN, GOROOT, GOCACHEPROG and GIT_CONFIG_*. Deployed scaffolds pinned to a SHA on self-hosted or air-gapped runners may rely on these (e.g. GOTOOLCHAIN=local) and have no opt-out.
    Remediation: Note the behavior change in the upgrade notes; optionally add an opt-out for source builds.
  • [backward-incompatible] internal/repos/gitlabci.go — gitlabAgentBridgesDispatchInputs now inspects only the job named fullsendAgentJobName. A deployed template with the input bridge under another job name is reported as not bridged and the gate refuses the child-pipeline route until a scaffold repair (fail-closed, consistent with the documented upgrade order).
    Remediation: Ensure the upgrade notes state that scaffolds with a renamed or custom agent job need the repair first.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (2)

Review

Findings

High

  • [command-injection] internal/repos/gitlab_trigger_jobs.go:143 — The pre-authorization variable denylist (gitlabPreauthProtectedVariables) omits GOCACHEPROG. It passes both the committed-YAML and project/inherited-variable checks and survives install-fullsend-cli.sh's unset list. On the source-pinned path (go build in that script), Go executes the program named by GOCACHEPROG (supported without an experiment flag since Go 1.24; go.mod requires 1.26.5). A configuration that points it at a repository-controlled executable passes the activation gate and runs code with the trigger account's credentials and CI_JOB_TOKEN before creator/HMAC verification. This is the same threat model as the already-denied GOFLAGS/GOENV/GOTOOLCHAIN/GOROOT.
    Remediation: Add GOCACHEPROG to gitlabPreauthProtectedVariables and unset it in install-fullsend-cli.sh before invoking Go. Add regression tests for committed, project, and readable inherited overrides.

Low

  • [breaking-config] internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/scripts/install-fullsend-cli.sh:26 — The script now unconditionally unsets runner-provided GOFLAGS, GOENV, GOTOOLCHAIN, GOROOT, GIT_CONFIG_* and GIT_TEMPLATE_DIR, including on the release-download path where it has no security purpose. Self-hosted or air-gapped runners often set these deliberately. For example, clearing GOTOOLCHAIN=local lets Go try to download a newer toolchain, which fails offline. The breaking-change notes and docs cover only schedule ownership and CLI version compatibility.
    Remediation: Limit the unsets to the source-build branch, or document the new behaviour in the operations guide and the BREAKING CHANGE note.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (3)

Review

Findings

High

  • [command-injection] internal/repos/gitlab_trigger_jobs.go:140 — The pre-authorization denylist gitlabPreauthProtectedVariables misses GIT_TEMPLATE_DIR and GOROOT. install-fullsend-cli.sh clears GIT_EXEC_PATH, GIT_CONFIG_, GOFLAGS, GOENV, GOTOOLCHAIN and PYTHON but not these two. On the source-pinned path it runs a plain git init (no --template=), then git checkout FETCH_HEAD, then go build. A GIT_TEMPLATE_DIR pointing at a checked-out directory with an executable hooks/post-checkout is copied by git init and run by the checkout; a GOROOT pointing at an attacker-controlled tree makes go build run its compiler/linker. Both run in before_script, before run-agent-job.sh verifies creator/HMAC, with trigger-account credentials and CI_JOB_TOKEN present, even when the managed scripts match the scaffold. A project CI/CD variable or committed variables: entry setting either name passes the gate. The base branch's checkout-mr-source.sh already treats GIT_TEMPLATE_DIR as a known vector. Exploiting this needs the ability to set a project variable or commit CI config to the protected branch, so it weakens the gate's own threat model rather than opening a path for a less-privileged actor.
    Remediation: Add GIT_TEMPLATE_DIR and GOROOT to gitlabPreauthProtectedVariables and unset both in install-fullsend-cli.sh before any git or go command. Run git init --template= (or an empty template dir) and -c core.hooksPath=/dev/null for the temporary source checkout. Add gate regression entries showing committed, project, and inherited overrides of these names defer activation.

Medium

  • [fail-open] internal/repos/gitlab_variable_scopes.go:50 — The dispatch activation gate (gitlabDispatchVariableOverrideProblem) calls gitlabInheritedVariableOverrideProblem, which skips group scopes that return forbidden (this line) and ignores a forbidden instance read, so the gate still returns Ready and moves schedule ownership to the trigger account when inherited inventories cannot be read. The new regression test (gitlab_trigger_dispatch_gate_test.go ~1011-1016) asserts this. The skip logic exists on the base branch (webhook fast path); this PR adds a second caller with a much larger reserved set (PATH, LD_, BASH_ENV, proxy/CA-trust, HOME, Git/Go/Python variables) and a new consequence (ownership transfer). The behavior is documented, but the trust list names CI_ and FULLSEND_* examples, not the execution-controlling variables, and does not say an inherited override of them runs unverified code before creator/HMAC verification. Only instance admins and group Owners can write the unreadable scopes, so this is a design/documentation gap rather than a path for a lower-privileged actor.
    Remediation: Preferably defer ownership transfer (keep installer-owned schedules) when an applicable inherited scope is unreadable, with an explicit operator opt-in. At minimum, extend 'Inherited CI/CD variable trust' to name the execution-controlling pre-authorization variables, state that an inherited override runs before identity verification with trigger-account credentials, and have repos install report which inherited scopes were unverified when it transfers ownership.

Low


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (4)

Review

Findings

Medium

  • [command-injection] internal/repos/gitlab_trigger_jobs.go:131 — The new gitlabPreauthProtectedVariables denylist (applied to committed YAML and to project/inherited CI/CD variables in the dispatch gate) is incomplete, so matching the shipped script bytes does not establish that only shipped code runs before identity verification. It blocks PATH, loader variables, BASH_ENV, TAR_OPTIONS, curl config, proxy and CA variables, but not other variables that select what code runs: GIT_EXEC_PATH, GIT_CONFIG_, GOFLAGS (e.g. -toolexec), PYTHONPATH/PYTHONSTARTUP. install-fullsend-cli.sh only unsets LD_AUDIT, LD_PRELOAD, LD_LIBRARY_PATH, BASH_ENV and TAR_OPTIONS, then runs git fetch/go build for source-pinned versions. run-agent-job.sh (unchanged) runs python3 -c for HMAC verification without -I, so a PYTHONPATH pointing at a committed sitecustomize.py runs before verification completes, including in release installs. Exploiting this requires the ability to commit CI config or set project/inherited CI/CD variables (Maintainer or group admin), so this weakens a defense-in-depth check rather than opening a new escalation path for a less-privileged actor. It still contradicts the boundary the PR's own comment claims.
    Remediation: Add GIT_EXEC_PATH, GIT_CONFIG_
    (GLOBAL/SYSTEM/COUNT/PARAMETERS), GOFLAGS/GOENV/GOTOOLCHAIN and PYTHONPATH/PYTHONSTARTUP/PYTHONHOME to gitlabPreauthProtectedVariables. Unset them in install-fullsend-cli.sh before any external command runs. Run the authorization-critical Python in run-agent-job.sh with python3 -I. Add gate regression tests for the new entries.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (5)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJoaWdoIiwiY2F0ZWdvcnkiOiJmYWlsLW9wZW4iLCJmaWxlIjoiaW50ZXJuYWwvcmVwb3MvZ2l0bGFiX3RyaWdnZXJfam9icy5nbyIsImlkIjoiZl85MWM1ZmVjODc1Mzk3ZWJkIiwibGluZSI6MTMzLCJhY3Rpb25hYmxlIjp0cnVlfSx7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJsb2dpYy1lcnJvciIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy9naXRsYWJfdHJpZ2dlcl9jb25zdW1lci5nbyIsImlkIjoiZl8yZmYyNzFmODc3MzZjZDk1IiwibGluZSI6NzMsImFjdGlvbmFibGUiOnRydWV9LHsic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImZhaWwtb3BlbiIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy9naXRsYWJfdHJpZ2dlcl9kaXNwYXRjaF9nYXRlLmdvIiwiaWQiOiJmXzUxN2ZkNmVkM2JiZTA5ZjYiLCJsaW5lIjo2NjAsImFjdGlvbmFibGUiOnRydWV9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImJhY2t3YXJkLWluY29tcGF0aWJsZSIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy9naXRsYWJfdHJpZ2dlcl9hY2NvdW50LmdvIiwiaWQiOiJmXzJjYTk3YzU2NDcwMTU2YjMiLCJsaW5lIjoxMTU2LCJhY3Rpb25hYmxlIjpmYWxzZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYmFja3dhcmQtaW5jb21wYXRpYmxlIiwiZmlsZSI6ImludGVybmFsL2ZvcmdlL2dpdGxhYi9jaS5nbyIsImlkIjoiZl81ZWNiN2I4ZmQzMDQ2ZGI3IiwibGluZSI6MTM2NywiYWN0aW9uYWJsZSI6ZmFsc2V9XX0= -->

Review

Findings

High

  • [fail-open] internal/repos/gitlab_trigger_jobs.go:133 — The pre-authorization environment check is incomplete. It rejects PATH, LD_PRELOAD, LD_LIBRARY_PATH, BASH_ENV and the listed curl/proxy/CA overrides, but accepts TAR_OPTIONS, LD_AUDIT, HOME and XDG_CONFIG_HOME in committed YAML and readable CI/CD variable scopes. For example, TAR_OPTIONS='--checkpoint=1 --checkpoint-action=exec=./payload.sh' makes the shipped install-fullsend-cli.sh run a repository script during release extraction, before identity or HMAC authorization. HOME/XDG_CONFIG_HOME can also select a repository-controlled curl config, because the installer calls curl without -q. Matching every managed script and job against the scaffold therefore does not show that only shipped code executes, and the activation gate can still approve credential-bearing account-owned pipelines with these overrides.
    Remediation: Reject these additional execution/configuration-loading variables in the shared pre-authorization checks and add gate regression tests for committed, project and inherited definitions. Also harden the bootstrap commands themselves: disable curl configuration loading and remove TAR_OPTIONS and loader overrides before invoking external programs.

Medium

  • [logic-error] internal/repos/gitlab_trigger_consumer.go:73 — The consumer gate checks only the built-in stages plus the literal fullsend-custom-stage, which does not establish admission for real custom stages. Root workflow rules that admit scheduled polling, and admit source=pipeline only when $STAGE != "deploy", pass every sampled stage even when the repository config dispatches a custom deploy agent. The gate can then activate and migrate schedule ownership although those dispatches are rejected by the root workflow. The existing API route can still admit that stage, so the migration introduces a functional regression.
    Remediation: Check all configured dispatchable stages, or conservatively prove workflow admission for any valid nonempty stage instead of treating one synthetic value as representative. Add a regression test with a custom stage excluded specifically from source=pipeline workflows.

  • [fail-open] internal/repos/gitlab_trigger_dispatch_gate.go:660 — The activation gate treats inaccessible inherited-variable inventories as unverified-but-acceptable. gitlabInheritedVariableOverrideProblem skips forbidden instance and ancestor-group scopes and returns success, and the new test permits Ready when both inventories return forbidden. Reserved definitions in those scopes (for example an inherited CI_API_V4_URL, BASH_ENV or LD_PRELOAD) remain unverified while install records activation and moves schedules to the trigger account. This is a documented trust assumption on administrators and group Owners, so the residual risk is mainly accidental incompatibility rather than an escalation path.
    Remediation: Consider making inaccessible inherited scopes defer trigger-account activation, or require an explicit administrator acknowledgement for those scopes, and test forbidden instance and ancestor-group inventories.

Low

  • [backward-incompatible] internal/repos/gitlab_trigger_account.go:1156 — The ownership move is compatible in one direction only. The ledger and activation record formats are unchanged, so a pre-PR CLI reads them without complaint, but its checkForeignResources treats any account-owned schedule as foreign and fails closed on repos install, rotation and repos uninstall for a project this CLI has moved. The error does not name a CLI version. The docs tell users to upgrade and the PR title carries !; the remaining exposure is automation pinned to an older CLI.
    Remediation: Add an explicit minimum-CLI-version line to the release notes and to the older-CLI section of docs/contributing/gitlab-role-credentials.md. Keep the ! on the PR title and squash commit.

  • [backward-incompatible] internal/forge/gitlab/ci.go:1367 — ListPipelineSchedules now errors for the whole page if any schedule has id<=0 or owner.id<=0, and GetPipelineSchedule rejects a non-positive owner ID or a response with no variable details. These shapes were previously tolerated, so non-trigger paths (convergeSchedules, preflight, uninstall) now fail on an unusual owner. A missing owner is still tolerated.
    Remediation: Consider limiting strict owner validation to code paths that act on ownership; if it stays, document and test it against supported GitLab versions.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (6)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6InNlY3JldC1leHBvc3VyZSIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy9naXRsYWJfdHJpZ2dlcl9qb2JzLmdvIiwiaWQiOiJmXzkyOWRhNzcyMDA5ZmU4MDMiLCJsaW5lIjoxMjksImFjdGlvbmFibGUiOnRydWV9XX0= -->

Review

Findings

Medium

  • [secret-exposure] internal/repos/gitlab_trigger_jobs.go:129 — The pre-authorization variable denylist (gitlabPreauthProtectedVariables) covers CI_API_V4_URL, CI_PROJECT_DIR, CI_JOB_TOKEN, PATH, LD_PRELOAD, LD_LIBRARY_PATH and BASH_ENV, but not the variables that change how curl connects: CURL_HOME/CURLRC, HTTPS_PROXY/https_proxy/ALL_PROXY, and CA overrides such as CURL_CA_BUNDLE/SSL_CERT_FILE. The shipped poll job sources install-fullsend-cli.sh in before_script, and that installer runs plain curl -fsSL (no -q, no proxy stripping) for the release archive and checksums.txt; pin-ci-job-identity.sh by contrast uses -q and env -u CURLRC -u CURL_HOME .... A committed or project-level CURL_HOME pointing at the checkout (with a repository .curlrc) plus HTTPS_PROXY could pass the activation gate and let a proxy substitute both archive and checksums, running an attacker binary before authorization as the trigger account. Reachability is limited: it needs merge access to the protected default branch or Maintainer access to project variables, and the gate runs only at CLI time.
    Remediation: Harden the installer downloads the way pin-ci-job-identity.sh does (-q first, --noproxy '*', run curl via env -u CURLRC -u CURL_HOME -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY and lowercase forms), or add CURL_HOME, CURLRC, the proxy variables and CA-bundle variables to gitlabPreauthProtectedVariables. Add a regression test showing a committed CURL_HOME/HTTPS_PROXY override defers activation.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (7)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJoaWdoIiwiY2F0ZWdvcnkiOiJpbmplY3Rpb24tdnVsbiIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy9naXRsYWJfdHJpZ2dlcl9qb2JzLmdvIiwiaWQiOiJmXzgyNGFjYTFlZWNlMDc1NzQiLCJsaW5lIjoxMjgsImFjdGlvbmFibGUiOnRydWV9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6InN0YWxlLWRvYyIsImZpbGUiOiJkb2NzL2NsaS9SRUFETUUubWQiLCJpZCI6ImZfMmM3MTZiYWY3MTEwOWYwNyIsImxpbmUiOjI4LCJhY3Rpb25hYmxlIjp0cnVlfSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJtaXNzaW5nLWRvYyIsImZpbGUiOiJkb2NzL2NvbnRyaWJ1dGluZy9naXRsYWItcm9sZS1jcmVkZW50aWFscy5tZCIsImlkIjoiZl80ZWNkMGQ4M2M3ZGZiYjQxIiwibGluZSI6MTY2LCJhY3Rpb25hYmxlIjp0cnVlfSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJicmVha2luZy1jbGkiLCJmaWxlIjoiaW50ZXJuYWwvcmVwb3MvZ2l0bGFiX3RyaWdnZXJfYWNjb3VudC5nbyIsImlkIjoiZl9mODY5MjQzYzhlZWJhMWVlIiwibGluZSI6MTE4MiwiYWN0aW9uYWJsZSI6ZmFsc2V9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImJyZWFraW5nLWNvbmZpZyIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy9naXRsYWJjaS5nbyIsImlkIjoiZl9iYTliNTZmNjZjZjBkYjY2IiwibGluZSI6MTU1MywiYWN0aW9uYWJsZSI6ZmFsc2V9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6InBlcm1pc3Npb24tZXhwYW5zaW9uIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX3NjaGVkdWxlcy5nbyIsImlkIjoiZl85OTIwYmM3NDRhZWM2MGFlIiwibGluZSI6NjUyLCJhY3Rpb25hYmxlIjpmYWxzZX1dfQ== -->

Review

Findings

High

  • [injection-vuln] internal/repos/gitlab_trigger_jobs.go:128 — The new pre-authorization override check protects CI_API_V4_URL, CI_PROJECT_DIR, CI_JOB_TOKEN, LD_PRELOAD, LD_LIBRARY_PATH and BASH_ENV but leaves PATH unrestricted. A committed root-level PATH="$CI_PROJECT_DIR/bin:..." passes the scan and the exact-content checks, so a repository-provided bin/curl runs from install-fullsend-cli.sh before identity pinning, with the protected role credentials and (after this PR) the trigger account's CI_JOB_TOKEN. Matching the shipped script bytes does not establish that only shipped code runs before authorization.
    Remediation: Reject PATH overrides in committed configuration and readable project/inherited variable inventories, or establish a trusted executable search path before any managed bootstrap command runs. Add a regression test with a root-level PATH override pointing at a repository-controlled directory.

Low

  • [stale-doc] docs/cli/README.md:28 — The fullsend poll row ties the child-pipeline route only to the webhook fast path; scheduled cron polling now runs as the trigger account and uses child-pipeline once dispatch activation is recorded (webhook stays on api until GitLab: route the managed webhook through the trigger-only account and remove the per-user merge grant #8509).
    Remediation: Mention the cron-polling case and the webhook api route in that row.
  • [missing-doc] docs/contributing/gitlab-role-credentials.md:166 — The "Variables and secrets" table and the canonical-constants list omit FULLSEND_GITLAB_DISPATCH_ACTIVATION / VarGitLabDispatchActivation (pre-existing gap; this PR added the variable to the operations.md table).
    Remediation: Add the row and constant.
  • [breaking-cli] internal/repos/gitlab_trigger_account.go:1182 — Older CLIs that meet account-owned schedules print the already-shipped "remove or reassign them" message, which conflicts with the new "upgrade, do not delete" guidance. Not fixable in this PR; make sure the upgrade-first note reaches release notes.
  • [breaking-config] internal/repos/gitlabci.go:1553 — gitlabAgentBridgesDispatchInputs now inspects only the job named fullsendAgentJobName and rejects duplicate variables keys; customized or older scaffolds defer activation (safe fallback), but docs do not mention that renaming the agent job blocks activation.
  • [permission-expansion] internal/repos/gitlab_trigger_schedules.go:652 — Adoption mints a temporary api-scoped PAT while the trigger account holds its deploy-key grant. This is explicitly accepted in the GitLab: own managed polling schedules with the trigger-only account #8508 credential contract and has recorded obligation, one-day expiry, in-memory token, redaction and cleanup; no change requested.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (8)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2pvYnMuZ28iLCJpZCI6ImZfYmYxODAwZGVjM2U2MmU4OSIsImxpbmUiOjE3NSwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYXBpLXNoYXBlIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2Rpc3BhdGNoX2dhdGUuZ28iLCJpZCI6ImZfZTlkZjhlODkwOTI5YTUyNyIsImxpbmUiOjI5MSwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiZG9jLXN0eWxlIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2NvbnN1bWVyLmdvIiwiaWQiOiJmX2M5MGVkNDNhZjE0MzFlYzgiLCJsaW5lIjoyNDksImFjdGlvbmFibGUiOnRydWV9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImRvYy1zdHlsZSIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy9naXRsYWJfdHJpZ2dlcl9kaXNwYXRjaF9nYXRlLmdvIiwiaWQiOiJmXzg3N2FiNjE2NTdjMzMyMTciLCJsaW5lIjo0MDUsImFjdGlvbmFibGUiOnRydWV9XX0= -->

Review

Findings

Medium

  • [logic-error] internal/repos/gitlab_trigger_jobs.go:175 — The committed-YAML override check omits CI_PIPELINE_SCHEDULE_DESCRIPTION. A root-level variables entry (or workflow:rules:variables entry) setting it to an unrelated value passes this check, while gitlabScheduledPollProblem (gitlab_trigger_consumer.go) evaluates the poll rules with the real schedule description and never sees the override. The activation gate can report Ready and move schedule ownership to the trigger account even though GitLab's effective value makes both shipped poll-job rules fail, leaving scheduled pipelines with no poll job (polling silently stops). The project/group/instance-variable check (gitlabDispatchVariableOverrideProblem) already reserves this variable; committed YAML is not covered.
    Remediation: Reject committed overrides of CI_PIPELINE_SCHEDULE_DESCRIPTION in the scheduled-pipeline scan (or fold their effective values into scheduled-poll admission evaluation), and add regression tests for root-level and workflow-rule overrides that require the gate to defer.

Low

  • [api-shape] internal/repos/gitlab_trigger_dispatch_gate.go:291 — gitlabManagedJobOverride signals unparseable or unverifiable YAML with the in-band sentinel string "unverifiable managed"; other YAML helpers in internal/repos use the comma-ok (result, ok bool) idiom. Stylistic only (unexported, one caller, fail-closed).
    Remediation: Return (name string, ok bool) and update the single call site in gitlabDispatchRouteScaffoldProblem.
  • [doc-style] internal/repos/gitlab_trigger_consumer.go:249 — gitlabJobAdmits has no doc comment, unlike neighbouring helpers; it is now also used for the poll job.
    Remediation: Add a doc comment describing the template, jobName and env parameters and the rules/when evaluation.
  • [doc-style] internal/repos/gitlab_trigger_dispatch_gate.go:405 — gitlabFirstDocument (405), gitlabSameYAMLNode (449) and gitlabJobNode (547) lack doc comments.
    Remediation: Add doc comments describing purpose and return values.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (9)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2NvbnN1bWVyLmdvIiwiaWQiOiJmXzg3OWFhNWQ3NzQ4MDc5ZmYiLCJsaW5lIjozNSwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoiZWRnZS1jYXNlIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2Rpc3BhdGNoX2dhdGUuZ28iLCJpZCI6ImZfYTVkMDZlZDYyZDVlMTAzYyIsImxpbmUiOjQ2NywiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoiaW5qZWN0aW9uLXZ1bG4iLCJmaWxlIjoiaW50ZXJuYWwvcmVwb3MvZ2l0bGFiX3RyaWdnZXJfam9icy5nbyIsImlkIjoiZl82MDk3MGQ3ZWVjOWViOTkyIiwibGluZSI6MTYxLCJhY3Rpb25hYmxlIjp0cnVlfSx7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJzdGFsZS1kb2MiLCJmaWxlIjoiZG9jcy9jb250cmlidXRpbmcvZ2l0bGFiLXJvbGUtY3JlZGVudGlhbHMubWQiLCJpZCI6ImZfZTU0MjM2OTVlMWRlZjVhNCIsImxpbmUiOjgzOCwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiZmFpbC1vcGVuIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2Rpc3BhdGNoX2dhdGUuZ28iLCJpZCI6ImZfOTMwMzQ5MmE2MjJkOTQ2ZiIsImxpbmUiOjY0NiwiYWN0aW9uYWJsZSI6ZmFsc2V9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6Im1pc3NpbmctZG9jIiwiZmlsZSI6ImRvY3MvZ3VpZGVzL2dldHRpbmctc3RhcnRlZC9vcGVyYXRpb25zLm1kIiwiaWQiOiJmXzYzODUwYTVjZWFmYjdhZmYiLCJsaW5lIjo4NiwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiaW5jb21wbGV0ZS1kb2MiLCJmaWxlIjoiZG9jcy9ndWlkZXMvZ2V0dGluZy1zdGFydGVkL29wZXJhdGlvbnMubWQiLCJpZCI6ImZfN2ExODU5NGQ4YzQ3ODA2MyIsImxpbmUiOjEzNiwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiaW5jb21wbGV0ZS1kb2MiLCJmaWxlIjoiZG9jcy9ndWlkZXMvZ2V0dGluZy1zdGFydGVkL3JlcG8tbWFuYWdlbWVudC5tZCIsImlkIjoiZl8yOWM0MTQ2YjU0MzAzMzBjIiwibGluZSI6NjQ2LCJhY3Rpb25hYmxlIjp0cnVlfV19 -->

Review

Findings

Medium

  • [logic-error] internal/repos/gitlab_trigger_consumer.go:35 — The consumer check assumes STAGE equals the dispatched stage input without verifying the effective pipeline-level YAML bridge. A root variables: {STAGE: ''} override passes the input-schema, forwarding and job checks, yet GitLab rejects every source=pipeline dispatch, so the gate can report Ready and transfer schedule ownership despite a broken consumer.
    Remediation: Verify the effective pipeline-level STAGE bridge before supplying this environment value (or evaluate admission with the actual committed variable definitions) and add a regression with an empty or incorrect root STAGE bridge.

  • [edge-case] internal/repos/gitlab_trigger_dispatch_gate.go:467 — Prefix and suffix matches can overlap (FULLSEND_VERSION="__FULLSEND_VERSION__" replaced by FULLSEND_VERSION="), yielding slice bounds [1246:1245]. A malformed committed helper panics the installation instead of deferring activation.
    Remediation: Reject content shorter than len(parts[0])+len(parts[1]) before slicing, and add a regression for overlapping matches.

  • [injection-vuln] internal/repos/gitlab_trigger_jobs.go:161 — The pre-authorization variable check covers rule-evaluation variables and CI_API_V4_URL, CI_PROJECT_DIR and CI_JOB_TOKEN, but accepts execution-controlling variables such as LD_PRELOAD, LD_LIBRARY_PATH or BASH_ENV. Matching the shipped script bytes therefore does not establish that only shipped code runs before identity verification. Exploitation needs default-branch or project-variable write access and the gate is an install-time check, so this is medium.
    Remediation: Reject execution-controlling environment overrides (at minimum LD_PRELOAD, LD_LIBRARY_PATH, BASH_ENV) in committed YAML and project/inherited variables before activating schedule ownership, with regressions showing such overrides defer activation.

  • [stale-doc] docs/contributing/gitlab-role-credentials.md:838 — The 'Dispatch activation gate' text says the gate must pass before any webhook or schedule dispatch path "uses the trigger token". Scheduled polling now runs as the trigger account and dispatches via CI_JOB_TOKEN; the token is reserved for the webhook path (GitLab: route the managed webhook through the trigger-only account and remove the per-user merge grant #8509). This contradicts the updated comment in gitlab_trigger_dispatch_gate.go.
    Remediation: Change "uses the trigger token" to "uses the trigger account", noting that scheduled polling uses the account's CI_JOB_TOKEN while the token is reserved for the webhook move (GitLab: route the managed webhook through the trigger-only account and remove the per-user merge grant #8509).

Low

  • [fail-open] internal/repos/gitlab_trigger_dispatch_gate.go:646 — Forbidden instance/ancestor-group inherited-variable inventories are treated as unverified rather than deferring activation. This is a documented trust assumption (instance administrators and group Owners) mirroring the webhook path, and failing closed would block installs by project Maintainers; informational.
    Remediation: Optional hardening: warn when an inherited scope could not be read.

  • [missing-doc] docs/guides/getting-started/operations.md:86 — FULLSEND_GITLAB_DISPATCH_ACTIVATION is missing from the CI/CD variable reference table although the CLI provisions and deletes it (pre-existing gap; documented in infrastructure-reference.md).
    Remediation: Add a row describing it as the protected, unmasked activation record written by repos install after the gate passes.

  • [incomplete-doc] docs/guides/getting-started/operations.md:136 — Teardown step 5 ("Delete fullsend pipeline schedules") does not say repos uninstall already removes managed schedules, which step 1 (updated here) now states.
    Remediation: Clarify that manual deletion is only needed for manual teardown or a failed uninstall.

  • [incomplete-doc] docs/guides/getting-started/repo-management.md:646 — The trigger-account and "Removing repos" sections omit the breaking-change note that older CLIs treat account-owned schedules as foreign and refuse repos install/repos uninstall.
    Remediation: Add a note or link to the docs/cli/repos.md breaking-change section.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (10)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2NvbnN1bWVyLmdvIiwiaWQiOiJmXzE0ZjY2MjBkMmM1NTU0MTciLCJsaW5lIjo5NCwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYmFja3dhcmQtaW5jb21wYXRpYmxlIiwiZmlsZSI6ImludGVybmFsL2ZvcmdlL2dpdGxhYi9jaS5nbyIsImlkIjoiZl8xYTg0MzIzZWZiZGQwMmZkIiwibGluZSI6MTI4MiwiYWN0aW9uYWJsZSI6ZmFsc2V9XX0= -->

Review

Findings

Medium

  • [logic-error] internal/repos/gitlab_trigger_consumer.go:94 — The consumer check can succeed without a runnable agent stage. For example, adding stages: [dispatch, poll] to an otherwise compatible root configuration passes the new gate. Scheduled polling checks that poll exists. This function checks workflow rules, includes, input bridges, and job admission, but never verifies that the effective stages list contains agent. GitLab replaces included stages with the root list. Later source=pipeline dispatches then fail configuration validation because the shipped agent job uses the missing agent stage. Activation is still reported ready and schedule ownership has already moved.
    Remediation: Before returning success, use gitlabEffectiveStagesProblemForStage with the root, wrapper, and agent template to require the agent stage. Add gate tests for root and wrapper stages lists that retain poll but omit agent.

Low

  • [backward-incompatible] internal/forge/gitlab/ci.go:1282 — GetPipelineSchedule and ListPipelineSchedules now return a hard error when GitLab reports an owner ID of 0 or less, or a schedule ID of 0 or less (list only). A malformed response previously worked and now fails the whole call. The risk is low because GitLab always reports positive IDs.
    Remediation: No change required. Optionally tolerate owner.id == 0 as an unknown owner, which is the documented meaning of the zero OwnerID.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (11)

Review

Findings

Medium

  • [auth-bypass] internal/repos/gitlab_trigger_dispatch_gate.go:171 — The new gate byte-compares only pin-ci-job-identity.sh, run-poll-job.sh and run-agent-job.sh, and checks the poll/agent/dispatcher jobs' YAML script entries. The accepted before_script sources install-fullsend-cli.sh (which sources trust-ci-server-ca.sh) before identity/HMAC authorization, and neither helper, the role-selection helper nor the dispatcher job script is content-checked. A customized helper could run extra commands with injected protected credentials while the gate still approves trigger-account schedule ownership. Needs a protected-default-branch commit (insider), which limits but does not remove the risk.
    Remediation: Content-verify the pre-authorization helper scripts (install-fullsend-cli.sh allowing for rendered placeholders, trust-ci-server-ca.sh, the role-selection helper, the dispatcher job script) and add regression tests showing extra commands in a helper defer activation.

  • [error-handling] internal/repos/converge.go:2588 — In activatePipelineSchedules, any forbidden UpdatePipelineSchedule now yields Action "none" instead of "error" without checking the schedule owner. For a disabled managed schedule owned by another human, --reactivate-schedules can succeed without reactivating it, since the trigger-account stage only handles schedules that account owns; a plain permission 403 is swallowed the same way. Previously this was reported as an error.
    Remediation: Suppress the forbidden error only after verifying the owner is the recorded trigger-account generation whose ownership stage will reactivate it; keep the error for other owners and authorization failures; add a regression test for a human-owned disabled schedule when trigger activation defers.

Low


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (12)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6InN0YWxlLWRvYyIsImZpbGUiOiJkb2NzL2d1aWRlcy9nZXR0aW5nLXN0YXJ0ZWQvY29uZmlndXJpbmctZ2l0bGFiLm1kIiwiaWQiOiJmX2FiYjU4MWU1ZjgxZmFhYzciLCJsaW5lIjo4MDQsImFjdGlvbmFibGUiOnRydWV9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2NvbnN1bWVyLmdvIiwiaWQiOiJmX2QwMjk1OWMyNmEwNjc0MGEiLCJsaW5lIjo4MCwiYWN0aW9uYWJsZSI6ZmFsc2V9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2Rpc3BhdGNoX2dhdGUuZ28iLCJpZCI6ImZfMWMzMzBlODcwZDQyMjlhNiIsImxpbmUiOjE3MSwiYWN0aW9uYWJsZSI6ZmFsc2V9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImJhY2t3YXJkLWluY29tcGF0aWJsZSIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy9naXRsYWJfdHJpZ2dlcl9hY2NvdW50LmdvIiwiaWQiOiJmXzU2NTM5MWNjZWJlMjNlYzQiLCJsaW5lIjoxMTc3LCJhY3Rpb25hYmxlIjpmYWxzZX0seyJzZXZlcml0eSI6ImluZm8iLCJjYXRlZ29yeSI6InBlcm1pc3Npb24tZXhwYW5zaW9uIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX3NjaGVkdWxlcy5nbyIsImlkIjoiZl84ZDlhMjk2Njg1NTk2NTZkIiwibGluZSI6NTUyLCJhY3Rpb25hYmxlIjpmYWxzZX1dfQ== -->

Review

Findings

Medium

  • [stale-doc] docs/guides/getting-started/configuring-gitlab.md:804 — Under "Polling schedule ownership", the guide says that if an install stops before the trigger-account stage, "the activation stays withdrawn and the account-owned schedules cannot dispatch until an install completes." The same PR's docs/contributing/gitlab-role-credentials.md (~lines 1033-1040) says the opposite: withdrawing activation makes the poll job select the api route, so account-owned schedules keep dispatching with the Poller credential. The unchanged pin-ci-job-identity.sh defaults the route to api and selects child-pipeline only when a matching ledger and activation record exist. The guide misstates operator-visible behavior and the credential used.
    Remediation: Say that while activation is withdrawn, account-owned schedules keep running on the api route with the Poller credential, so scheduled dispatch continues until an install completes.

Low

  • [logic-error] internal/repos/gitlab_trigger_consumer.go:80 — gitlabDispatchConsumerProblem checks that the wrapper forwards dispatch inputs to the agent template but never checks that the agent job bridges them into its environment (gitlabAgentBridgesDispatchInputs is not called). A committed agent template with a blank FULLSEND_DISPATCH_HMAC or EVENT_PAYLOAD_CHUNK_NN bridge can pass the gate, and dispatched agents then fail HMAC verification. This is a gate-completeness gap, not a regression: the installer-owned API route sends the same inputs into the same template.
    Remediation: Call gitlabAgentBridgesDispatchInputs on the committed agent template in the consumer gate and add tests with missing or blank HMAC/payload bridges.
  • [logic-error] internal/repos/gitlab_trigger_dispatch_gate.go:171 — gitlabDispatchRouteScaffoldProblem compares only pin-ci-job-identity.sh, run-poll-job.sh and run-agent-job.sh; it does not check install-fullsend-cli.sh or the CLI version it installs. If the committed CLI pin predates the child-pipeline route, polls running as the trigger account fail the --print-dispatch-routes probe, where installer-owned API-route polls did not. The state is unusual and fails closed with an upgrade message.
    Remediation: Optionally include the committed CLI pin (e.g. rendered FULLSEND_VERSION) in activation readiness and defer migration when it cannot support child-pipeline dispatch.
  • [backward-incompatible] internal/repos/gitlab_trigger_account.go:1177 — Older CLIs treat any trigger-account-owned schedule as foreign, so after this CLI migrates schedules, an older CLI's install/uninstall fails closed ("owns N pipeline schedule(s) that fullsend did not create"). No documentation tells mixed-version operators to upgrade first.
    Remediation: Optionally add a docs note to run install/uninstall with a CLI at least as new as the one that created the account-owned schedules.

Info

  • [permission-expansion] internal/repos/gitlab_trigger_schedules.go:552 — Schedule adoption mints another short-lived api-scoped PAT for the trigger account, broader than schedule creation needs and, with the deploy-key grant, effectively protected-branch write authority. Issue GitLab: own managed polling schedules with the trigger-only account #8508 justifies acting as this account; the code records PATPending before creation, saves PATID before use, and sets a one-day expiry. If cleanup fails the PAT stays usable until a later run revokes it or it expires, so the documented accepted risk is a real residual risk.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (13)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2NvbnN1bWVyLmdvIiwiaWQiOiJmXzRhNDBjYmQwNWJlYjdmNDEiLCJsaW5lIjoxOCwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZX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jOGEzN2Q3ZDI3ZDUyNDQiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifSx7ImlkIjoiZl84OGIxNTczMmQ2NGIyYmM0Iiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn1dfQ== -->

Review

Findings

Medium

  • [logic-error] internal/repos/gitlab_trigger_consumer.go:18 — The consumer gate verifies only STAGE=triage (gitlabAgentChildEnv), although polling dispatches other configured stages. A root workflow that admits all source=api dispatches but restricts source=pipeline to $STAGE == "triage" passes this check. Install then transfers schedule ownership and switches the dispatch route, breaking every non-triage dispatch that previously worked through the API route.
    Remediation: Verify admission for every effective configured stage, or conservatively defer conditions that depend on a particular stage value rather than merely its non-empty status. Add a regression where triage child pipelines are admitted but another dispatched stage is rejected.

  • [logic-error] internal/repos/gitlab_trigger_consumer.go:48 — Include admission is evaluated with the same environment as workflow/job admission, including the synthetic STAGE value. GitLab evaluates include rules before YAML-defined variables are available (the shipped wrapper says so itself), so a customized root or wrapper include conditioned on $CI_PIPELINE_SOURCE == "pipeline" && $STAGE passes this gate yet is omitted at runtime. Schedule ownership could then move without a reachable agent job.
    Remediation: Evaluate include rules with an environment that does not assume STAGE is available, and conservatively defer STAGE-dependent include rules. Add regressions for both include hops.

Low

  • [fail-open] internal/repos/gitlab_trigger_dispatch_gate.go:380 — The schedule-ownership gate reuses the inherited-variable helper, which skips group and instance inventories that return forbidden, so activation can pass without verifying those scopes (the head test expects Ready in that case). This is a deliberate trust decision documented in gitlab_variable_scopes.go and docs/contributing/gitlab-role-credentials.md, and only instance admins and group Owners can set those variables. The user-facing "Inherited CI/CD variable trust" callout in configuring-gitlab.md still names only the webhook fast path, so schedule ownership extends the assumption without disclosing it. (Reclassified from medium.)
    Remediation: Add schedule ownership to that callout in docs/guides/getting-started/configuring-gitlab.md, or defer when any inherited scope is unreadable.

Earlier findings

  • f_b3bd76132b16fb4f — resolved_by_change: the push builds the agent-child workflow check from the agent template (fullsendAgentTemplatePath) instead of the dispatcher template in gitlab_trigger_consumer.go; regression TestGitLabEffectiveWorkflowProblemForEnv_UsesAgentTemplate.
  • f_a53f534daefad3a9 — resolved_by_change: gitlabAgentJobAdmits now resolves the matching rule's/job's when and rejects manual and on_failure; regressions for rule-level and job-level when: manual|on_failure were added.
  • f_d1dbec7642bf26b6 — resolved_by_change: managedGlobalExecProblem in gitlab_trigger_jobs.go now rejects poll-template global execution defaults when the poll job disables inheritance but the dispatcher/agent jobs inherit; covered by TestCheckGitLabTriggerDispatchGate_PollTemplateGlobalsReachOtherManagedJobs.
  • f_68826f79f9655584 — reclassified medium → low: documented, deliberate trust boundary (see finding above).

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (14)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhYl90cmlnZ2VyX2NvbnN1bWVyLmdvIiwiaWQiOiJmX2IzYmQ3NjEzMmIxNmZiNGYiLCJsaW5lIjo0NSwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoiaW50ZXJuYWwvcmVwb3MvZ2l0bGFiX3RyaWdnZXJfY29uc3VtZXIuZ28iLCJpZCI6ImZfYTUzZjUzNGRhZWZhZDNhOSIsImxpbmUiOjEzMywiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoiZmFpbC1vcGVuIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL2dpdGxhY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RmMmExZjUiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifSx7ImlkIjoiZl9kZmQyNGM5ZTQ1MTAyMTBkIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn0seyJpZCI6ImZfNmVkMWU5NTEyYzkyZmMyMyIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9LHsiaWQiOiJmXzNjOGEzN2Q3ZDI3ZDUyNDQiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifV19 -->

Review

Findings

Medium

  • [logic-error] internal/repos/gitlab_trigger_consumer.go:45 — The agent-child workflow check passes the dispatcher template instead of the agent template (files[fullsendDispatcherTemplatePath] into gitlabEffectiveWorkflowProblemForEnv, which also labels it as the dispatcher). For source=pipeline the wrapper includes fullsend-agent.yml, so agent-template workflow rules that reject the child pipeline pass, and dispatcher workflow rules defer activation for no reason.
    Remediation: Pass files[fullsendAgentTemplatePath] and make the helper's diagnostic filename a parameter. Add tests for inherited agent-template workflow rules that reject and admit the pipeline.
  • [logic-error] internal/repos/gitlab_trigger_consumer.go:133 — The agent-job admission check does not establish that the agent runs automatically. evaluateRules treats any matching rule whose when is not never as admitted, so when: manual / when: on_failure (rule-level or job-level) passes. The gate can activate dispatch and move schedule ownership while dispatched agents stay blocked or skipped. The dispatcher check handles these cases; the consumer check does not.
    Remediation: Resolve the matching rule's effective when, falling back to the job-level when, and defer unless it starts the agent automatically. Add tests for manual and on_failure at rule and job level.
  • [fail-open] internal/repos/gitlab_trigger_dispatch_gate.go:380 — Activation still succeeds when instance or group variable inventories return Forbidden; unreadable scopes are skipped and the gate test expects Ready. A CI_PIPELINE_SOURCE override in an unreadable inherited scope would invalidate the job-isolation evaluation. Behavior is unchanged by the latest push.
    Remediation: Defer activation when an applicable inherited scope cannot be inspected, or require independently verified evidence that it cannot override the evaluator's predefined variables.
  • [auth-bypass] internal/repos/gitlab_trigger_jobs.go:92 — Managed includes are exempt by name without enforcing source separation. If the poll job sets inherit: default: false, a default:after_script in the poll template is never checked against a dispatcher admitted in scheduled pipelines, which could inherit and run it as the trigger account. The new before_script/script chain comparisons do not close this path.
    Remediation: Require managed includes and jobs to reject sources outside their intended set, or evaluate merged global execution defaults against every managed job reachable in each pipeline source. Add a regression test for a schedule-admitted dispatcher inheriting defaults from the poll template.

Earlier findings

  • f_88b15732d64b2bc4 — resolved_by_change: the latest commit adds gitlabDispatchConsumerProblem (gitlab_trigger_consumer.go) and requires the agent and dispatcher jobs to run the shipped before_script/script chains, addressing the producer-only scaffold verification. The consumer-check gaps above are separate findings.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 9:22 PM UTC · Completed 9:34 PM UTC

Commit: 7241eab · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.17

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Addressed all nine review findings: eight fixed in code, tests and docs, one informational finding left unchanged with a recorded reason. The pre-commit hooks could not run because the sandbox could not fetch hook repositories; gofmt, go vet and git diff --check were run directly and pass, as do the internal/repos and internal/gitlablifecycle tests. Some internal/cli tests (PostScriptEnv schema and fetch service) fail in this sandbox with or without this change.

Fixed (8):

  1. A failed disable leaves an active replacement that a retry treats as in sync (adoption and hand-back) (internal/repos/gitlab_trigger_schedules.go): When disabling a replacement fails, the active replacement is now deleted with installer authority (and not reported as created), for both the account adoption path and the hand-back path. Added retry tests that check the recovered active state, and extended the existing disable-failure test to assert the retry leaves the event schedule disabled.
  2. Reactivation uses the installer client although only a schedule's owner can edit it, and runs before the trigger-account stage (internal/repos/converge.go): Confirmed the ordering: converge schedule repair runs before the trigger-account stage. A forbidden update during reactivation is now reported as a non-error deferral instead of failing the install. A new ReactivateSchedules option, set from --reactivate-schedules, makes the trigger-account stage replace a disabled account-owned schedule with an active one (both on adoption and on hand-back). Added tests for the deferral and for reactivation under the account; the CLI reference row for the flag notes this.
  3. Schedule ref comparison is exact and ignores the refs/heads/ form (internal/repos/gitlab_trigger_schedules.go): Added scheduleRefIsBranch, which accepts the branch name or its refs/heads/ form, and used it in the in-sync check. Added an idempotency test with qualified refs.
  4. dispatchActivationRecorded accepts trailing content and duplicate keys (internal/repos/gitlab_trigger_schedules.go): The activation record must now be a single JSON object followed by EOF with no duplicate keys, matching the ledger decoder. Added a test that trailing content and a duplicate key leave the gate inactive, mint no PAT and touch no schedule.
  5. Uninstall list for the trigger-only account omits the managed polling schedules (docs/guides/getting-started/operations.md): Added the account-owned managed polling schedules to the uninstall removal list.
  6. Summary-level trigger-account docs omit schedule ownership, hand-back and uninstall deletion (docs/guides/getting-started/repo-management.md): Mentioned schedule ownership in the section summary, hand-back in the Deferral and Rotation bullets, a new Uninstall bullet, and the schedule deletion in the uninstall description.
  7. require.Equal inside httptest handlers (internal/gitlablifecycle/trigger_schedules_test.go): Replaced require.Equal with assert.Equal and an early return in both handlers.
  8. %s used for the schedule description in an error (internal/repos/gitlab_trigger_schedules.go): Switched the no-schedule-ID error to %q.

Disagreed (1):

  1. Another issuance point for an api-scoped PAT on the trigger identity (informational, not actionable): The reviewer marked this non-actionable: the issuance is authorized by GitLab: own managed polling schedules with the trigger-only account #8508 and the PAT controls (pending record before issuance, PAT ID recorded before use, no value in the ledger, cleanup on every path) were verified. No narrower schedule scope exists, so no code change was made.

Tests: passed

CI inspections (5):

  1. CI / test (passing, success)
  2. CI / commit-lint (passing, success)
  3. codecov/patch (passing, success)
  4. E2E Tests / playback (passing, success)
  5. E2E Tests / behaviour (passing, success)

Conflict update: skipped; strategy none; forge MERGEABLE; target main@b9fe1fe15c6ba37104c71fccbe8e1f54461a887b

Decision points
  • How to avoid an active replacement surviving a failed disable (alternatives: Create the replacement with its intended active state in one call, Delete the incomplete replacement on failure; rationale: Creating with an active flag would change the forge.Client and bootstrap interfaces used by many callers. Deleting the incomplete replacement with installer authority gives the same recovery with a local change.)
  • How the install reactivates schedules the trigger account owns (alternatives: Hand schedules back before reactivation, Add a take-ownership forge method, Have the trigger-account stage replace them under --reactivate-schedules; rationale: The trigger-account stage already replaces schedules while preserving their state and holds the account credential under the project lease, so passing the flag through is the smallest change.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

fullsend-ai-coder Bot added a commit that referenced this pull request Oct 16, 2026
- Remove an active replacement schedule when disabling it fails, for both
  adoption and hand-back, so a retry cannot delete the disabled original.
- Accept the refs/heads/ form of a schedule ref when checking drift.
- Require one JSON object with no duplicate keys for the dispatch activation.
- Let the trigger-account stage reactivate schedules it owns under
  --reactivate-schedules; the installer's reactivation defers on a forbidden
  update instead of failing the install.
- Document schedule ownership in the uninstall, summary and CLI docs.
- Use assert in httptest handlers and %q for the schedule description.

Note: pre-commit could not fetch hook repositories (TLS verification failed in
the sandbox); gofmt, go vet and git diff --check were run directly. Unrelated
internal/cli tests (PostScriptEnv schema, fetch service) fail in this sandbox
with or without this change.

Addresses #8519

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:37 PM UTC · Completed 9:48 PM UTC

Commit: e0b185b · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.94

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 9:50 PM UTC · Completed 9:58 PM UTC

Commit: e0b185b · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.82

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 2 (bot-triggered)

Addressed all open findings. Adoption retries now use the surviving original's active state, so an interrupted replacement is replaced rather than letting the original be deleted. Hand-back now verifies an installer-owned copy's ref, cron, active state and variables before treating it as covering the account-owned schedule, and replaces incomplete copies. Fixed the stale package overview and PAT comments in gitlab_trigger_account.go. The non-actionable permission-expansion note is recorded as a disagreement with no change. Tests for internal/repos, gitlablifecycle and forge pass, and new-code coverage is high. pre-commit could not fetch hook repositories in the sandbox (TLS failure), so gofmt, go vet and git diff --check were run directly.

Fixed (3):

  1. Disabled-state preservation fails after an interrupted replacement creation (edge-case, gitlab_trigger_schedules.go) (internal/repos/gitlab_trigger_schedules.go): While an original owned by someone else survives, it now records the intended active state; an account-owned replacement whose active state differs (for example, a disable that never completed) is no longer treated as in sync and is replaced with one in the right state before the original is deleted. Added a retry test that leaves an active replacement beside a disabled original, plus a test for the opposite mismatch.
  2. Hand-back treats any installer-owned schedule with the managed description as a sufficient replacement (logic-error, gitlab_trigger_schedules.go) (internal/repos/gitlab_trigger_schedules.go): Hand-back now counts an installer-owned schedule as a copy only when its ref, cron, active state and (absence of) variables match the account-owned schedule it replaces. A mismatching copy is deleted, and a complete copy is created first when none matches; nothing is deleted if creating the copy fails. Tests cover wrong active state in both directions, another ref, another cron, variables, and a failed copy creation. The same fix also covers the create-then-disable window on the hand-back side of the first finding, because the account-owned schedule stays as the record until a complete copy exists.
  3. Stale references around the schedule methods and package overview in gitlab_trigger_account.go (carried stale-reference finding) (internal/repos/gitlab_trigger_account.go): Updated the package overview to explain that steps 2-7 are the Maintainer bootstrap and that the schedule migration mints its own short-lived PAT while the account stays at Developer. Updated the bootstrap PAT scope comment to include schedule creation. Clarified the UpdatePipelineSchedule comment on the bootstrap API: only the owner can edit these schedules, so the installer cannot do it.

Disagreed (1):

  1. The API-scoped bootstrap PAT is reused to create schedules as the trigger account (permission-expansion, low, not actionable): The reviewer marked this non-actionable and asked to keep the existing cleanup and containment controls. Those controls are unchanged. I did not find a narrower GitLab token scope that works for schedules owned by a service account, so the scope stays as is.

Tests: passed

CI inspections (4):

  1. test (passing, success): Passing on the PR head before this fix.
  2. codecov/patch (passing, success): Patch coverage gate passed before this fix.
  3. commit-lint (passing, success): Passing on the PR head before this fix.
  4. E2E Tests (playback, behaviour, gate) (passing, success): All passing on the PR head before this fix.

Conflict update: skipped; strategy none; forge MERGEABLE; target main

Decision points
  • How to make an interrupted replacement recoverable without a forge.Client signature change (alternatives: Create replacements with their intended active state in one request (needs an active parameter on CreatePipelineSchedule in forge.Client, the fake, the GitHub and GitLab clients and all callers), Derive the intended state from the surviving original on retry and verify hand-back copies against the account-owned schedule; rationale: The reviewer accepted either atomic creation or recovering the intended state. Recovering it avoids widening the shared forge.Client interface, and the surviving original (adoption) or account-owned schedule (hand-back) is always present until the replacement is verified, so it is a reliable record.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

fullsend-ai-coder Bot added a commit that referenced this pull request Oct 16, 2026
- Treat the surviving original as the record of a schedule's intended active
  state, so an account-owned replacement whose disable never completed is
  replaced on retry instead of deleting the disabled original.
- Count an installer-owned schedule as a hand-back copy only when its ref,
  cron, active state and variables match the account-owned schedule; replace
  and delete incomplete copies once a complete one exists.
- Update the trigger-account overview and bootstrap PAT comments for the
  schedule migration.

Note: pre-commit could not fetch hook repositories (TLS verification failed in
the sandbox); gofmt, go vet and git diff --check were run directly.

Addresses #8519

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:00 PM UTC · Completed 10:08 PM UTC

Commit: 2aaf801 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.92

fullsend-ai-review[bot]

This comment was marked as outdated.

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ❌ Failure (running pre-script: exit status 1: Fix iteration 6 exceeds bot cap of 5. Escalating to human. The review→fix loop has run 6 times without converging. A human can still direct the agent with /fs-fix (u…) · Started 9:55 PM UTC · Completed 9:55 PM UTC

Commit: 1b4253f · View workflow run →

Effort: high

Move managed polling schedules to the trigger account only after live
activation checks pass and the account can merge into the protected
branch. Keep installer-owned schedules and the Poller route as the
fallback. Verify schedule ownership, active state, cron, timezone,
variables, and protected-branch identity before replacing originals.

Check committed CI jobs, includes, input schemas and bridges, custom
stage admission, pre-authorization variable overrides, the GitLab input
limit, and runner configuration before activation. Harden the CLI
bootstrap against curl configuration, tar options, and loader overrides.
Hand schedules back before bootstrap elevation and preserve recovery
across interrupted runs and installer credential rotation.

Document the minimum compatible CLI and upgrade order, the inherited
variable trust assumption, and the temporary PAT risk.

BREAKING CHANGE: Once managed GitLab polling schedules move to the
trigger account, older fullsend CLIs treat them as foreign and refuse
repos install and repos uninstall. Upgrade the installer and pinned
CLI to a release or source commit containing #8508 before the move.

Signed-off-by: Greg Allen <gallen@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:36 PM UTC · Completed 10:51 PM UTC

Commit: 2b036cf · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $5.34

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 10:53 PM UTC · Completed 11:00 PM UTC

Commit: 2b036cf · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.31

Extend gitlabPreauthProtectedVariables with GIT_EXEC_PATH, GIT_CONFIG_*,
GOFLAGS/GOENV/GOTOOLCHAIN and PYTHON{PATH,STARTUP,HOME}; unset them in
install-fullsend-cli.sh; run the HMAC verification python with -I; add
gate regression test entries.

Note: pre-commit hooks could not run (hook repos unreachable from the
sandbox); gofmt, bash -n, go vet and go test passed instead.

Addresses #8519

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Addressed the single medium finding by extending the pre-authorization variable denylist, unsetting the same variables in the install script, isolating the HMAC python invocation, and adding gate regression entries. Tests in internal/repos and internal/scaffold pass; pre-commit could not run in the sandbox (hook repos unreachable), so gofmt, bash -n and go vet were run directly.

Fixed (1):

  1. [command-injection] gitlabPreauthProtectedVariables denylist is incomplete (Git, Go, Python code-selecting variables) (internal/repos/gitlab_trigger_jobs.go): Added GIT_EXEC_PATH, GIT_CONFIG_GLOBAL/SYSTEM/COUNT/PARAMETERS, GOFLAGS, GOENV, GOTOOLCHAIN, PYTHONPATH, PYTHONSTARTUP and PYTHONHOME to the denylist. Unset them in install-fullsend-cli.sh before any external command, ran the HMAC verification python3 with -I in run-agent-job.sh, and added the new names to the dispatch-gate regression tests.

Tests: passed

CI inspections (5):

  1. test (passing, success)
  2. build (passing, success)
  3. gate (passing, success)
  4. codecov/patch (passing, success)
  5. commit-lint (passing, success)

Conflict update: skipped; strategy none; forge MERGEABLE; target main@900784ad746307784a5c76bae136d9a0e218eda3

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 11:02 PM UTC · Completed 11:19 PM UTC

Commit: 59e40e3 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $4.88

fullsend-ai-review[bot]

This comment was marked as outdated.

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 11:21 PM UTC · Completed 11:33 PM UTC

Commit: 59e40e3 · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.93

- Add GIT_TEMPLATE_DIR and GOROOT to the pre-authorization variable
  denylist, unset them in install-fullsend-cli.sh, and run the
  source-pinned git init/checkout with an empty template and a null
  hooks path. Add gate regression entries for project, inherited, and
  committed overrides.
- Have the dispatch gate report inherited CI/CD variable scopes it could
  not read, print them from repos install, and document that an
  inherited override of an execution-controlling variable runs before
  creator/HMAC verification.
- Clarify the minimum CLI versions: the route probe only gates polling
  (#8482 onward); installer operations after a transfer need #8508.

Not done: deferring ownership transfer when an inherited scope is
unreadable (opt-in design change, shared with the webhook path).
Pre-commit could not fetch hook repos (TLS); gofmt, go vet, git diff
--check and bash -n were run directly. shellcheck is not installed.
Six unrelated internal/cli tests fail identically on the base branch
(sandbox environment).

Addresses #8519

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 2 (bot-triggered)

Addressed all four findings in the latest review. Two are fixed in code, tests and docs: the denylist and installer hardening, and unverified-scope reporting. One is a docs correction. One preferred alternative, deferring on unreadable scopes, is recorded as a disagreement because it is a design change. Verification: build, vet and gofmt are clean, and the repos and scaffold packages pass. Six internal/cli tests (post-script env and fetch service) fail identically on the unmodified base branch because of the sandbox environment. pre-commit could not fetch hook repositories (TLS failure), so gofmt, go vet, git diff --check and bash -n were run directly. shellcheck and golangci-lint are not installed here.

Fixed (3):

  1. Pre-authorization denylist misses GIT_TEMPLATE_DIR and GOROOT (command-injection, high) (internal/repos/gitlab_trigger_jobs.go): Added GIT_TEMPLATE_DIR and GOROOT to gitlabPreauthProtectedVariables, unset both in install-fullsend-cli.sh, and made the source-pinned path run git init with an empty template and the checkout with core.hooksPath=/dev/null. Extended the gate regression tests so project, committed (global, hidden job, workflow rule) and inherited (group, instance) overrides of both names defer activation.
  2. Dispatch gate stays Ready when inherited variable scopes are unreadable (fail-open, medium) (internal/repos/gitlab_variable_scopes.go): Implemented the reviewer's stated minimum. The inherited scan now records the scopes it could not read, the gate exposes them as UnverifiedInheritedScopes, and repos install prints them when the gate is Ready. The inherited CI/CD variable trust section now names the execution-controlling variables and states that an inherited override runs before creator/HMAC verification with the trigger account's credentials. Added tests for the gate field and the CLI report.
  3. Minimum compatible CLI wording is incorrect (incorrect-doc, low) (docs/guides/getting-started/configuring-gitlab.md): Reworded both docs: the route probe only gates polling and passes for CLIs from refactor(#8438): add CI_JOB_TOKEN child-pipeline agent dispatch route #8482 onward; the cannot-poll claim is limited to CLIs older than refactor(#8438): add CI_JOB_TOKEN child-pipeline agent dispatch route #8482; the minimum CLI for installer operations (repos install and uninstall) after a transfer is the first release or commit containing GitLab: own managed polling schedules with the trigger-only account #8508. Applied the same change in docs/contributing/gitlab-role-credentials.md.

Disagreed (1):

  1. Preferably defer ownership transfer, behind an explicit operator opt-in, when an applicable inherited scope is unreadable: The reviewer offered this as the preferred option but also accepted the documentation-and-reporting minimum, which is what was implemented. Deferring on forbidden scopes changes behavior shared with the base-branch webhook path and would block installs by project Maintainers who cannot read instance or group variables. It needs a new opt-in flag, which is a product decision outside this review-fix. Recommend a follow-up issue if maintainers want stricter behavior.

Tests: passed

CI inspections (8):

  1. test (passing, success): Passing on the previous head.
  2. web (passing, success): Passing on the previous head.
  3. gateway-doc-configs (passing, success): Passing on the previous head.
  4. commit-lint (passing, success): Passing on the previous head.
  5. test-sandbox-darwin (passing, success): Passing on the previous head.
  6. E2E Tests (behaviour, playback, gate) (passing, success): Passing on the previous head.
  7. codecov/patch (passing, success): Passing on the previous head. This push adds new code and tests, so it will be re-evaluated.
  8. DCO (passing, success): Passing on the previous head.

Conflict update: skipped; strategy none; forge MERGEABLE; target main@900784ad746307784a5c76bae136d9a0e218eda3

Decision points
  • How far to go on the inherited-scope fail-open finding (alternatives: Defer ownership transfer when an inherited scope is unreadable, with an operator opt-in, Document the trust boundary and report unverified scopes at install time; rationale: The second option is the reviewer's stated minimum, and it avoids a new flag and a behavior change shared with the webhook path.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 11:35 PM UTC · Completed 11:49 PM UTC

Commit: 3d069cc · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $4.09

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 11:51 PM UTC · Completed 11:57 PM UTC

Commit: 3d069cc · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.38

Deny GOCACHEPROG in the pre-authorization variable list (committed YAML,
project, and inherited scopes), unset it before the source build, and add
regression tests. Limit the Git and Go environment unsets in
install-fullsend-cli.sh to the source-build branch so the release-download
path no longer clears runner-provided values such as GOTOOLCHAIN=local.

Note: pre-commit could not fetch hook repos (TLS failure in sandbox); ran
gofmt, go vet, go test, and bash -n directly.

Addresses #8519

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 3 (bot-triggered)

Addressed both findings: GOCACHEPROG is now denied and unset, and the Git/Go env unsets are limited to the source-build path. Tests in internal/repos and internal/scaffold pass.

Fixed (2):

  1. GOCACHEPROG missing from the pre-authorization protected variable denylist (internal/repos/gitlab_trigger_jobs.go): Added GOCACHEPROG to gitlabPreauthProtectedVariables (covers committed YAML, project, and inherited scopes), unset it in install-fullsend-cli.sh before the source build, listed it in the security-assumption docs, and added regression tests for committed, project, and group/instance inherited overrides.
  2. install-fullsend-cli.sh unconditionally unsets Go and Git environment, including on the release-download path (internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/scripts/install-fullsend-cli.sh): Moved the Git and Go unsets into the source-build branch so the release-download path leaves runner-provided values (e.g. GOTOOLCHAIN=local) untouched. The Python and loader unsets stay at the top of the script.

Tests: passed

CI inspections (4):

  1. test (passing, success)
  2. commit-lint (passing, success)
  3. codecov/patch (passing, success)
  4. E2E Tests (playback, behaviour, gate) (passing, success)

Conflict update: skipped; strategy none; forge MERGEABLE; target main@900784ad7

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 11:59 PM UTC · Completed 12:17 AM UTC

Commit: f8f4898 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $6.12

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🤖 Fix · Started 12:19 AM UTC

Commit: f8f4898 · View workflow run →

- Add GIT_STRATEGY, GIT_CHECKOUT and GIT_CLEAN_FLAGS to the pre-authorization
  variable denylist, with gate regression tests.
- Use the existing script path constants in the dispatch gate.
- Return an unprefixed reason from the inherited-variable scanner; the
  webhook wrapper adds its own prefix.
- Add doc comments for stageCondition and gitlabSafePinnedVersion.
- Document the source-build environment unsets and the custom agent job
  repair requirement.

Disagreements/notes: pre-commit hooks could not run (network blocked by the
sandbox); gofmt, go vet, and go test for internal/repos and internal/scaffold
pass. internal/cli TestStartFetchService_* fail without these changes too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 4 (bot-triggered)

Addressed all seven findings: extended the pre-authorization variable denylist with GIT_STRATEGY, GIT_CHECKOUT and GIT_CLEAN_FLAGS (with tests), used the existing script path constants, moved the fast-path prefix to its consumer, added the two doc comments, and documented the two backward-compatibility behaviors. go vet and go test pass for internal/repos and internal/scaffold. Pre-commit hooks could not run because the sandbox blocks the network. Unrelated internal/cli TestStartFetchService_* tests fail in the sandbox both with and without this change.

Fixed (7):

  1. Pre-authorization denylist omits GitLab Runner checkout controls (internal/repos/gitlab_trigger_jobs.go): Added GIT_STRATEGY, GIT_CHECKOUT and GIT_CLEAN_FLAGS to gitlabPreauthProtectedVariables and extended the gate regression tests (project, committed YAML, group and instance scopes) and the inherited-variable trust docs.
  2. Script paths are raw string literals instead of existing constants (internal/repos/gitlab_trigger_dispatch_gate.go): Use gitlabTrustScriptPath and gitlabRoleTokenScriptPath.
  3. Inherited variable scanner hardcodes the webhook fast-path prefix (internal/repos/gitlab_variable_scopes.go): gitlabInheritedVariableScan now returns an unprefixed reason; gitlabInheritedVariableOverrideProblem (webhook consumer) adds the prefix, and the dispatch gate no longer strips it.
  4. stageCondition has no doc comment (internal/repos/gitlab_trigger_consumer.go): Added a doc comment.
  5. gitlabSafePinnedVersion has no doc comment (internal/repos/gitlab_trigger_dispatch_gate.go): Added a doc comment.
  6. Source-build path unsets Go/Git environment variables with no documented behavior change (docs/guides/getting-started/configuring-gitlab.md): The unsets are already limited to the source-build branch; documented the behavior and that runners relying on them should pin a release version. No opt-out added (reviewer marked it optional and non-actionable).
  7. Agent-bridge inspection only covers the shipped agent job name (docs/guides/getting-started/configuring-gitlab.md): Documented that scaffolds with a renamed or custom agent job need the scaffold repair first and the gate refuses the child-pipeline route until then. Code behavior is intentionally fail-closed and unchanged.

Tests: passed

CI inspections (5):

  1. behaviour (unrelated, failure): The GitHub E2E behaviour suite failed in a base-composed harness dispatch scenario that runs against a separate test repository; this PR changes only GitLab trigger-account code and docs. Rerun the E2E workflow; if it persists, file an issue with the e2e owners.
  2. test (passing, success)
  3. build (passing, success)
  4. codecov/patch (passing, success)
  5. commit-lint (passing, success)

Conflict update: skipped; strategy none; forge MERGEABLE; target main

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:34 AM UTC · Completed 12:49 AM UTC

Commit: 4ad92bb · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $4.93

Comment thread internal/cli/repos.go Resolved

This branch was successfully deployed

1 active and 1 inactive deployments
site-preview — 4ad92bb5 Deployed Oct 18, 2026 by github-actions[bot]
dev — 4ad92bb5 Deployed Oct 18, 2026 by fullsend-ai-coder[bot] via playback #17025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/docs User-facing documentation component/install CLI install and app setup go Pull requests that update go code needs-human Agent loop needs human intervention ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate type/feature New capability request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitLab: own managed polling schedules with the trigger-only account

1 participant