fix(ci): workflow correctness and consistency fixes#33
Conversation
- Pin slither-analyzer==0.11.5 in contracts-mainnet-readiness.yml and
release-gate.Dockerfile to match the reusable Slither workflow
- Remove overbroad 0x[hex]{64} pattern from secrets-drift-guard that
caused false positives on bytes32 constants; tighten to require
key-assignment context (PRIVATE_KEY=, MNEMONIC=, SEED_PHRASE=)
- Fix verify-governance.sh to skip dismiss_stale_reviews check on dev
branch which has 0 required approvals
- Add canary to contracts-evidence-manifest.yml push trigger
- Fix github.event.inputs -> inputs context in release-gate-container
- Fix wait-port URL to port number in contracts-ci.yml integration test
- Add pull_request_target comment in release-pr-checklist and
release-evidence-validator explaining why it is used
- Add Docker Buildx setup and GHA layer caching to release-gate-container
workflow and run-release-gate-container.sh
Dependency ReviewThe following issues were found:
License Issues.github/workflows/contracts-release-gate-container.yml
OpenSSF Scorecard
Scanned Files
|
WalkthroughThis PR updates GitHub Actions workflows, container build configuration, and branch governance scripts to pin slither-analyzer dependencies, add BuildKit GitHub Actions caching to Docker builds, extend workflow triggers to include the canary branch, improve secret detection patterns, document security assumptions, and conditionally enforce stale review dismissal on protected branches. ChangesCI Infrastructure and Governance Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c1094573d
ℹ️ 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".
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/contracts-release-gate-container.yml:
- Around line 43-44: The setup-buildx step is redundant because the script uses
plain docker build; update the CI to actually use the created builder by
changing the build invocation in
contracts/script/ci/run-release-gate-container.sh from docker build to docker
buildx build (preserve existing flags, add --load or --push as needed for local
image usage) so the docker/setup-buildx-action@v3-created builder is used;
alternatively remove the docker/setup-buildx-action@v3 step if you prefer to
keep docker build (option B).
In @.github/workflows/secrets-drift-guard.yml:
- Line 45: Update the secrets-drift guard regex that currently matches
"(MNEMONIC|SEED_PHRASE|PRIVATE_KEY)[[:space:]]*[:=][[:space:]]*[^[:space:]]{12,}"
so it also detects quoted multi-word seed phrases; replace that pattern with one
that accepts either a contiguous token of 12+ non-space chars OR a quoted string
(single or double quotes) containing spaces, e.g. a pattern that alternates
between [^[:space:]]{12,} and "(...)" or '(...)'. Keep the same capture group
for the keys (MNEMONIC|SEED_PHRASE|PRIVATE_KEY) and preserve the existing
whitespace+assignment matching when making this substitution.
In `@contracts/script/ci/run-release-gate-container.sh`:
- Around line 15-20: The docker build invocation uses --cache-to "type=gha"
which will fail outside GitHub Actions; guard adding the cache flags by checking
for ACTIONS_CACHE_URL and ACTIONS_RUNTIME_TOKEN (or at least ACTIONS_CACHE_URL)
before including --cache-to (and optionally --cache-from) in the docker build
command so local runs (IMAGE_TAG default mark-release-gate:local) skip the GHA
cache export; modify the script around the docker build block to conditionally
append the --cache-to/--cache-from flags when those env vars are present and
fall back to a plain docker build when they are absent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b0986870-f672-4f4d-9911-6965906ecd6e
📒 Files selected for processing (10)
.github/workflows/contracts-ci.yml.github/workflows/contracts-evidence-manifest.yml.github/workflows/contracts-mainnet-readiness.yml.github/workflows/contracts-release-gate-container.yml.github/workflows/release-evidence-validator.yml.github/workflows/release-pr-checklist.yml.github/workflows/secrets-drift-guard.ymlcontracts/docker/release-gate.Dockerfilecontracts/script/ci/run-release-gate-container.shscripts/github/verify-governance.sh
Summary
Eight correctness and consistency fixes across CI workflows and supporting scripts.
Changes
contracts-mainnet-readiness.yml,release-gate.Dockerfile: pinslither-analyzer==0.11.5to match the reusable Slither workflowsecrets-drift-guard.yml: remove overbroad0x[hex]{64}pattern that flagged anybytes32constant; tighten to key-assignment context onlyscripts/github/verify-governance.sh: skipdismiss_stale_reviewscheck ondev(0 required approvals, no reviews to dismiss)contracts-evidence-manifest.yml: addcanaryto push trigger (was missing alongsidemainanddev)contracts-release-gate-container.yml: useinputscontext instead ofgithub.event.inputs; add Docker Buildx setup for layer cachingcontracts-ci.yml: fixwait-portto use port number instead of full URLrelease-pr-checklist.yml,release-evidence-validator.yml: add comment explainingpull_request_targetusagecontracts/script/ci/run-release-gate-container.sh: add--cache-from/--cache-to type=ghato Docker buildScope
.github/workflowscontracts/dockercontracts/script/ciscripts/githubRisk
Low. No contract logic or test changes. The secrets-drift-guard pattern change reduces false positives; real private key leaks are still caught by the key-assignment pattern and the dedicated Gitleaks scan.
Summary by CodeRabbit