Skip to content

fix(security): require a patched Go scaffold floor - #412

Merged
devantler merged 5 commits into
mainfrom
codex/go-template-security-floor-r23
Oct 21, 2026
Merged

devantler merged 5 commits into
mainfrom
codex/go-template-security-floor-r23

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agentic Engineer

Why

The starter still permits a compiler affected by a newly published certificate-verification advisory. This security correction is triggered by the upstream advisory, not a speculative compatibility bump.

What

Require the supported patched minimum and prevent rollback with independent regression controls. Keep the starter minimal and correct its description of the already-migrated validation source.

Fixes #411

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

The new regression suite failed against the original independent ratchet because it accepted the old compiler floor. It now passes 11 controls, including rejection of 1.26.0/1.26.9 and malformed/extra-token directives, acceptance of 1.26.10 and later versions, and trailing-comment compatibility.

Local validation with Go 1.26.10 passes: configured formatting, build, package tests, golangci-lint (zero issues), renamed-scaffold build/tests, canonical agent shims, the actual floor check and mockery-hook fixtures. Workflow syntax, ShellCheck, whitespace and the exact released shell-pipeline validator pass, including all eight tracked shell files. The TODO scanner fixture join passes against the exact unchanged consumer-pinned 25f1dda catalogue checkout. Its Linux/Docker replay remains a native CI requirement; it was not claimed as locally executed. The existing deprecated-linter warning remains tracked in #399.

The module declaration remains the sole toolchain selection source; the ratchet is an independently hard-coded lower bound, not a second toolchain pin. This does not assert that every later host toolchain is patched: the 1.27 branch separately requires 1.27.3 per the upstream advisory. No vulnerability scan is disabled or suppressed.

Applied-rule readback confirms required Go validation comes from repository ID 933213756 (the maintained catalogue), matching the factual documentation correction. No authorization or agent behavior policy is broadened, and no heavy Go jobs are added to the trivial aggregator.

Current-head full native selected Go jobs, substantive review, protected merge and post-merge evidence remain required.

@github-code-quality

github-code-quality Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Go

Go / code-coverage/go

main codex/go-template-se... 315289b +/-
— 86% —

Line coverage data for the main branch is not yet available.

View coverage of the 3 most covered files.
File main codex/go-template-se... 315289b +/-
pkg/example/example.go — 100% —
pkg/featureflag/featureflag.go — 93% —
main.go — 0% —

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 21, 2026 04:41 UTC

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 7 0 0 0.08s
✅ ACTION zizmor 7 0 0 0 2.24s
⚠️ BASH bash-exec 7 1 0 0.04s
✅ BASH shellcheck 7 0 0 0.53s
✅ BASH shfmt 7 0 0 0 0.03s
✅ COPYPASTE jscpd yes no no 0.79s
✅ EDITORCONFIG editorconfig-checker 42 0 0 0.13s
✅ JSON jsonlint 1 0 0 0.17s
✅ JSON prettier 1 0 0 0 0.52s
✅ JSON v8r 1 0 0 2.26s
⚠️ MARKDOWN markdownlint 6 0 6 0 0.81s
✅ MARKDOWN markdown-table-formatter 6 0 0 0 0.3s
✅ REPOSITORY betterleaks yes no no 0.71s
✅ REPOSITORY checkov yes no no 25.83s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY grype yes no no 99.45s
✅ REPOSITORY osv-scanner yes no no 0.46s
✅ REPOSITORY secretlint yes no no 1.2s
✅ REPOSITORY syft yes no no 8.81s
✅ REPOSITORY trivy yes no no 14.89s
✅ REPOSITORY trivy-sbom yes no no 0.25s
✅ REPOSITORY trufflehog yes no no 5.13s
✅ SPELL lychee 18 0 0 1.38s
✅ YAML prettier 11 0 0 0 0.5s
✅ YAML v8r 11 0 0 7.21s
✅ YAML yamllint 11 0 0 0.7s

Detailed Issues

⚠️ BASH / bash-exec - 1 error
Results of bash-exec linter (version 5.3.9)
See documentation on https://megalinter.io/10.1.0/descriptors/bash_bash_exec/
-----------------------------------------------

✅ [SUCCESS] .github/scripts/run-mockery.sh
✅ [SUCCESS] .github/scripts/run-mockery.test.sh
❌ [ERROR] .github/scripts/verify-vendored-comment-scan.sh
    Error: File:[.github/scripts/verify-vendored-comment-scan.sh] is not executable

✅ [SUCCESS] scripts/go-floor.test.sh
✅ [SUCCESS] scripts/rename-placeholders.sh
✅ [SUCCESS] scripts/rename-placeholders.test.sh
✅ [SUCCESS] scripts/validate-agent-shims.test.sh
⚠️ MARKDOWN / markdownlint - 6 errors
AGENTS.md:24:401 error MD013/line-length Line length [Expected: 400; Actual: 541]
AGENTS.md:28:401 error MD013/line-length Line length [Expected: 400; Actual: 431]
AGENTS.md:32:401 error MD013/line-length Line length [Expected: 400; Actual: 521]
AGENTS.md:177:401 error MD013/line-length Line length [Expected: 400; Actual: 448]
CLAUDE.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "@AGENTS.md"]
GEMINI.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "@AGENTS.md"]

See detailed reports in MegaLinter artifacts

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 79b69a49-574c-4ac8-bb7e-c89cde948b75
📥 Commits

Reviewing files that changed from the base of the PR and between e8f6b06 and a003497.

📒 Files selected for processing: 5
  • .github/workflows/validate-scaffold.yaml
  • AGENTS.md
  • go.mod
  • scripts/go-floor-regression.test.sh
  • scripts/go-floor.test.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 12
  • GitHub Check: 🛡️ Vulnerability Scan
  • GitHub Check: 📊 Code Coverage
  • GitHub Check: 🧹 Lint - golangci-lint
  • GitHub Check: 🧪 Test
  • GitHub Check: 🧹 Lint - mega-linter
  • GitHub Check: 🔍 Dead Code Analysis
  • GitHub Check: 📦 Tidy
  • GitHub Check: 🏗️ Build
  • GitHub Check: zizmor
  • GitHub Check: Analyze (go)
  • GitHub Check: Validate Scaffold
  • GitHub Check: Analyze (actions)
🧰 Additional context used
📚 Code guidelines: 1
AGENTS.md — auto-discovered
📓 Path-based instructions: 1
Source excerpt: **Toolchain-floor policy.**

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • go.mod
🧠 Learnings: 1
📓 Common learnings
Learnt from: CR
Repo: devantler-tech/go-template

Timestamp: 2026-10-21T04:09:21.015Z
Learning: Source excerpt:
# AGENTS.md

## Maintenance (autonomous AI assistant)

**One deliberate exception to that rule:** `scripts/go-floor.test.sh` hard-codes
the floor in `floor_major` / `floor_minor` / `floor_patch`. A ratchet that read
its bound from the very file it checks could never fail, so the second copy is
what gives it any force at all. It is a **lower bound, not a second pin** —
`go.mod` may sit above it — so an ordinary tooling-driven bump needs no change
here. Raise it only when a bump is a **security floor that must never be
reverted**, and when you do, update `go.mod`, those three variables, and the
script's description in the file list above **in the same change**, or the
ratchet starts asserting a floor nothing else agrees with.
🪛 LanguageTool
AGENTS.md

[uncategorized] ~49-~49: The official name of this software platform is spelled with a capital “H”.
Context: ...validate-go-project.yamlworkflow fromdevantler-tech/.github` is required on every PR that targets t...

(GITHUB)

[uncategorized] ~77-~77: The official name of this software platform is spelled with a capital “H”.
Context: ... the workflow from the main branch of devantler-tech/.github, so a pull request here cannot change ...

(GITHUB)

🔇 Additional comments: 5
go.mod: 1

3-3: LGTM!

scripts/go-floor.test.sh: 1

3-4: LGTM!

Also applies to: 10-11

AGENTS.md: 1

32-32: LGTM!

Also applies to: 49-49, 77-77

scripts/go-floor-regression.test.sh: 1

1-37: LGTM!

.github/workflows/validate-scaffold.yaml: 1

42-43: LGTM!

📝 Walkthrough

The Go module requirement and rollback ratchet now use Go 1.26.10 as the minimum. A regression script checks accepted versions, rejected versions, and malformed directives. Scaffold validation runs that script. Documentation records the advisory rationale and updates shared workflow references.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to a0034

No actionable merge risk was identified. Complete the required CI and protected-merge checks.

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

Failed Failed checks: 1 error · 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Error Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check Inconclusive Issue #411 requires the Go 1.26.10 floor, an independent rollback ratchet, malformed-directive rejection, and regression controls. The reviewed files implement these requirements: go.mod uses 1.26.1… Provide reviewable evidence that the ordinary PR executes every selected Go validation job from devantler-tech/.github#237. The available evidence does not establish this requirement.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the security fix: requiring a patched Go scaffold floor. It matches the primary changes.
Description check Passed The description explains the advisory-driven Go version update, rollback controls, and validation scope. It is directly related to the changeset.
Out of Scope Changes check Passed The reviewed changes are limited to the Go module floor, its enforcement and regression tests, validation workflow integration, and related documentation. These changes directly support issue #411. No…
Full details: Out of Scope Changes check

Explanation

The reviewed changes are limited to the Go module floor, its enforcement and regression tests, validation workflow integration, and related documentation. These changes directly support issue #411. No unrelated product feature, second toolchain pin, heavy Go job, vulnerability-check disablement, or finding suppression is shown.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Linked Issues check

Explanation

Issue #411 requires the Go 1.26.10 floor, an independent rollback ratchet, malformed-directive rejection, and regression controls. The reviewed files implement these requirements: go.mod uses 1.26.10, scripts/go-floor.test.sh enforces the floor, and scripts/go-floor-regression.test.sh covers 11 rejection and acceptance cases. The supplied PR evidence reports the required formatting, build, test, lint, renamed-scaffold, and shell checks as passing. However, the same evidence states that current-head native selected Go jobs remain outstanding, and it does not establish that the ordinary PR executes every selected Go validation job from the maintained catalogue. The protected-merge and post-merge items are non-coding validation activities and do not affect this coding assessment.

Resolution

Provide reviewable evidence that the ordinary PR executes every selected Go validation job from devantler-tech/.github#237. The available evidence does not establish this requirement.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T04:44:12.458968Z 315289b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e57909c9f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/go-floor.test.sh Resolved
Comment thread scripts/go-floor-regression.test.sh Resolved
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Current head e57909c9f1a5b55cd97177eeda6ee9737260a703 adds the missing description for the assertion helper flagged by the earlier ancillary docstring check. All 11 regression controls, ShellCheck and whitespace checks still pass. The earlier review is not reused for this head.

Ordinary required Go validation run 39542799737 is complete and successful against this exact head. Every selected job actually ran and passed: tidy, golangci-lint, dead-code analysis, vulnerability scan, MegaLinter, build, test and coverage; the signed-fix follow-up jobs also passed without moving the head. The vulnerability job's native log independently records checkout of the maintained catalogue at 0c7b6c3509b73adbc7537e030935bb01987e625b and actual Go 1.26.10 selection.

The native scaffold gate 39542799251 also succeeded, including the real Linux TODO replay and shell integrity gate. All reported current-head checks have settled successfully or intentionally skipped. This supplies the execution evidence missing from the earlier linked-issue assessment; it is not a canary or a no-op PR.

CodeRabbit's current-hour included-review receipt reports zero remaining reviews in this repository. The normal fallback Codex review for the complete current head is running and remains a promotion prerequisite.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Both current review findings are fixed in 0aa26ac9379966429642ea311b8bfe5f77949406.

  • The real ratchet first reproduced acceptance of affected Go 1.27.0. It now explicitly rejects 1.27.0, 1.27.1 and 1.27.2, while retaining the lowest supported 1.26.10 minimum and accepting 1.27.3 and later safe release lines.
  • The regression helper no longer exists as a new syncable file. Its controls live in the existing, already sync-excluded scaffold gate under --self-test. This avoids relying on an upstream ignore-list edit reaching existing repositories, whose ignore lists are deliberately instance-owned.

All 16 version/format controls and the actual existing sync-exclusion assertion pass. ShellCheck, actionlint, the exact released shell-pipeline validator, build, package tests, lint (zero issues), renamed-scaffold build/tests, agent-shim and mockery fixtures also pass. The two inline threads are resolved with their fixes; no finding was deferred, suppressed or treated as covered by the previous review.

The new full native validation and substantive exact-head review remain promotion prerequisites. Earlier native execution proof remains historical evidence, not a green for this new head.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0aa26ac937

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/go-floor.test.sh Resolved
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Addressed the selected-toolchain finding in aeb73482818ac69f75656c793dd08fadd2c31d5c without introducing a second toolchain preference. The module remains the sole selection source; a new read-only check now inspects the compiler Go actually selects and rejects both affected release ranges. CI runs it after setup and before the renamed-scaffold build; the canonical local validation and newcomer guide include the same check.

The new runtime controls first rejected a valid patched version because no compiler-check mode existed. All 16 directive and nine selected-toolchain controls now pass. Independent local execution rejects an affected selected compiler and accepts the explicitly selected patched supported compiler. Unknown/development/empty version responses fail closed. This does not install software or alter the caller's environment.

The contributor-guide correction follows the newcomer skill: explain the check, link the upstream fixed-release advisory for recovery and preserve the existing fork, license, private-reporting, signature and submission policies. This was a scoped self-review with actual check execution; no independent newcomer usability session is claimed.

The earlier inline finding is resolved with the implementation. A fresh full-head review and native gates remain required; earlier passing runs are not reused as current-head evidence.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 315289b320

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Current-head readiness: 315289b320a4d2f675cfc7763ed9a5cd1fb0a8d9.

All 25 current-head checks have settled successfully or intentionally skipped, including every selected ordinary Go job and native scaffold validation. The actual selected-compiler check, 16 directive controls and nine compiler-version controls pass. Build/tests, vulnerability scanning, coverage and existing Linux replay/integrity gates were not replaced with a local subset.

Codex completed a substantive review against this full head and reports no unresolved findings, with a current-head no-major-issues receipt. Its historical has_any_findings flag remains true because the three earlier findings were reported and fixed; all three threads are resolved with their implementations. Fresh review/body/thread readback contains no new actionable finding or maintainer request.

The latest commit is the normal verified signed formatter child, changing only case formatting. It was fast-forwarded locally without discarding work and the complete 25-case regression suite was re-executed. The PR body contract passes and the live holder is this session.

All readable named/workflow gates pass. The configured code-quality rule remains UNVERIFIED in the helper, not labelled COMPLETE; GitHub independently reports CLEAN/MERGEABLE and its normal protected API is authoritative for that opaque gate.

Ready for promotion and protected merge. Post-merge source/default-branch checks remain required. No additional compiler preference, artificial release, weakened scan or change to existing generated repositories' ownership policy is introduced.

@devantler
devantler marked this pull request as ready for review October 21, 2026 04:45
@devantler
devantler requested a review from a team as a code owner October 21, 2026 04:45
@devantler
devantler merged commit 6227fa2 into main Oct 21, 2026
26 checks passed
@devantler
devantler deleted the codex/go-template-security-floor-r23 branch October 21, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Require the patched Go security floor in the scaffold

1 participant