sec: GitLab pipelines-must-succeed + Maintainer approval (AC-04) #696
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#696
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Gate
P1 supply-chain. Internal audit
INTERNAL_GROK46_1787908099AC-04 / INF-28 (re-verified 2026-08-28 viaglab api). Sister of FE-01 (Chain B): a red CI on a public repo with forks enabled can still merge tomain.This is a GitLab project-settings ticket plus a short in-repo note. Not a contract change.
Current codebase / project settings
glab api projects/PlasticDigits%2Fcl8y-dex-terraclassic(2026-08-28):.gitlab-ci.ymlalready runs on MRs:gitleaks, path-filteredcargo-audit,test-contracts,test-indexer-lib,test-indexer-integration,test-frontend,test-frontend-build. gitleaks already runs on every MR (not path-filtered), so every MR can have a pipeline.mainis protected (Maintainers-only push/merge, no force-push) — keep that. Fork MRs can still run in this project (INF-06). CI caches are not branch-scoped (INF-05; out of scope here unless cheap).Why the new implementation is needed
All CI security gates are advisory if a Maintainer can merge a red (or skipped) pipeline. That is the foothold for Chain B (poisoned frontend env, dependency, or indexer change). Enabling “pipelines must succeed” + one approval rule makes the existing jobs actually gate
main.Constraints / guardrails
gitleaksis always-on, a pipeline should exist. Confirm “skipped pipelines treated as successful” does not reopen a no-pipeline merge hole. If GitLab would block MRs with no jobs, keep the always-on gitleaks job.merge_requests_author_approvalshould stay off if you add an approval rule. Prefer 1 Maintainer approval from someone other than the author.approvals_before_mergevia a random API experiment on production without a Maintainer present. Prefer GitLab UI + record the resulting JSON on this issue.docs/security-model.mdordocs/supply-chain-security.mdthatmainrequires a green pipeline. No emails in the issue or commit.Relevant files
.gitlab-ci.ymlgitleaksso every MR has a pipelinedocs/supply-chain-security.mddocs/security-model.mdmain)Recommended direction
glab api projects/PlasticDigits%2Fcl8y-dex-terraclassicsnippet on this issue after the change (only_allow_merge_if_pipeline_succeeds=true).mainrequires green CI + approval; break-glass is a temporary settings flip by two Maintainers.make verify-issue-<N>can only grep the docs + a recorded settings snippet indocs/(do not bake a live API token into CI). Optional: a script that reads the public project API (no token) and asserts the boolean — project visibility is public soonly_allow_merge_if_pipeline_succeedsmay be visible; if the field is not public, skip the script and keep the paste.Acceptance criteria
only_allow_merge_if_pipeline_succeedsistrue(API or UI screenshot on this issue).gitleaks(or another cheap job) still runs on everymerge_request_eventso docs-only MRs have a pipeline.docs/supply-chain-security.md(no secrets).make verify-issue-<N>documents how an agent re-checks the setting (glab api).Test plan — happy / bad path
test+securitystagestest-frontendmaindirect pushTest plan — attack / abuse vectors
.gitlab-ci.ymldiffs is the control (state this in the docs)main(protected); cannot approve as MaintainerVerification criteria
glab apiJSON fields listed above.make verify-issue-<N>lists theglabre-check command.