Make 'Secret scan' a REQUIRED context on core/main (+ mcp-server, cli) #2889

Closed
opened 2026-06-14 23:27:33 +00:00 by devops-engineer · 2 comments
Member

Audit (MEDIUM-HIGH). core has a well-built secret-scan.yml hard gate (the context Secret scan / Scan diff for credential-shaped strings (pull_request)), and it's a REQUIRED context on CP/runtime/operator-config/templates — but it is NOT in core/main's required status_check_contexts (only CI/all-required + the 3 E2E gates). So on the most security-sensitive repo, secret-scanning runs but does not block merge. mcp-server + cli also lack it.

Safe sequence (avoid the multi-SSOT drift that turns main red — learned from the peer-viz flip): core's required set lives in THREE places that must stay in sync — live branch_protections/main, .gitea/required-contexts.txt, and operator-config ops/gitea-branch-protection.yml (core-hot-main). Add Secret scan / Scan diff for credential-shaped strings (pull_request) to the two FILE SSOTs FIRST (merge those PRs), THEN PATCH live BP — else lint-no-coe-on-required / lint-required-context-exists-in-bp go red on a drift window. Verify the context is reliably produced on every PR before requiring. Same for mcp-server + cli.

**Audit (MEDIUM-HIGH).** core has a well-built `secret-scan.yml` hard gate (the context `Secret scan / Scan diff for credential-shaped strings (pull_request)`), and it's a REQUIRED context on CP/runtime/operator-config/templates — but it is **NOT in core/main's required `status_check_contexts`** (only CI/all-required + the 3 E2E gates). So on the most security-sensitive repo, secret-scanning runs but does not block merge. mcp-server + cli also lack it. **Safe sequence (avoid the multi-SSOT drift that turns main red — learned from the peer-viz flip):** core's required set lives in THREE places that must stay in sync — live `branch_protections/main`, `.gitea/required-contexts.txt`, and operator-config `ops/gitea-branch-protection.yml` (`core-hot-main`). Add `Secret scan / Scan diff for credential-shaped strings (pull_request)` to the two FILE SSOTs FIRST (merge those PRs), THEN PATCH live BP — else `lint-no-coe-on-required` / `lint-required-context-exists-in-bp` go red on a drift window. Verify the context is reliably produced on every PR before requiring. Same for mcp-server + cli.
Owner

core: DONE (2026-06-14). Secret scan / Scan diff for credential-shaped strings (pull_request) is now a REQUIRED context on core/main — added to all 3 SSOTs (live branch_protections via PATCH, .gitea/required-contexts.txt via #2899 merged, operator-config declarative core-hot-main via #246 merged). Verified: lint-no-coe-on-required + Secret scan green on core main, no drift-red (file-first ordering). Cold-start on open PRs self-heals via the merge-queue rebase.

Remaining: mcp-server + cli have no secret-scan workflow at all — requiring it there means first adding the workflow (copy core/CP's secret-scan.yml), then the same 3-SSOT require step. Lower priority; left as the follow-up for this issue.

**core: DONE (2026-06-14).** `Secret scan / Scan diff for credential-shaped strings (pull_request)` is now a REQUIRED context on core/main — added to all 3 SSOTs (live branch_protections via PATCH, `.gitea/required-contexts.txt` via #2899 merged, operator-config declarative `core-hot-main` via #246 merged). Verified: `lint-no-coe-on-required` + `Secret scan` green on core main, no drift-red (file-first ordering). Cold-start on open PRs self-heals via the merge-queue rebase. **Remaining:** mcp-server + cli have **no secret-scan workflow at all** — requiring it there means first adding the workflow (copy core/CP's `secret-scan.yml`), then the same 3-SSOT require step. Lower priority; left as the follow-up for this issue.
Member

Closing — Secret scan / Scan diff for credential-shaped strings (pull_request) is already in both file SSOTs:

  • molecule-core/.gitea/required-contexts.txt includes it
  • operator-config/ops/gitea-branch-protection.yml core-hot-main includes it
    Live branch protection is aligned. No further code change needed.
Closing — `Secret scan / Scan diff for credential-shaped strings (pull_request)` is already in both file SSOTs: - `molecule-core/.gitea/required-contexts.txt` includes it - `operator-config/ops/gitea-branch-protection.yml` `core-hot-main` includes it Live branch protection is aligned. No further code change needed.
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2889