Repository navigation
CI: Harden workflows (strict bash + fail-fast gating) - #17
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR hardens our CI and reusable security workflows by standardizing Bash execution and enabling strict error handling (
set -Eeuo pipefail). It also improves supply-chain safety by pinning workflow action SHAs, fixes Python caching behavior, and aligns local CI tooling with the same dependency-lock guarantees used in CI.Highlights
defaults.run.shell: bashwhere appropriate to avoid shell drift.set -Eeuo pipefailto script steps across CI + reusable security workflows for fail-fast behavior..ci-local.shwith CI by enforcing/lockingrequirements.test.lock(same contract as CI).What changed
Control plane (Docker / Compose / Observability / CI)
.github/workflows/ci.yaml):defaults.run.shell: bashto jobs that run Bash snippets.set -Eeuo pipefailto relevantrun:scripts (changes detection, policy enforcement, build metadata, gating)._trivy_repo.yaml: standardized Bash defaults + strict mode in scripted steps._trivy_image.yaml: standardized Bash defaults + strict mode in scan-ref compute + gating scripts._govulncheck.yaml: standardized Bash defaults + strict mode for install/PATH + scan + gating._pip_audit.yaml: standardized Bash defaults + strict mode for venv/bootstrap + scan + gating._dependency_check.yaml: standardized Bash defaults + strict mode for epoch compute + scan + gating.load-tool-versionscomposite action:.ci-tool-versions.shfrom$GITHUB_WORKSPACE.GITHUB_ENV..ci-local.shto include the same lock behavior forrequirements.test.lockas CI (fail if drift / enforce regeneration + diff behavior, depending on your implementation).Services (Go / Java / Python)
requirements.lock+requirements.test.lockare treated as the source of truth consistently (CI + local parity).Docs / Tooling
Breaking changes / Migration notes
None.
How to test
Local / Integration
Verify
golang-gin/**,java-springboot/**,python-django/**) and confirm only relevant jobs run.policyjob blocks non-maintainers.requirements.lockorrequirements.test.lockchanges..venv-cistate across lock changes.continue-on-error).Gate - fail if ... found issuesstep fails the job when gating is enabled.Confirm
.ci-tool-versions.shvalidation fails closed if:Confirm local tooling parity:
.ci-local.shenforces/updatesrequirements.test.lockconsistently with CI expectations.Artifacts
Notes
-u) can surface previously hidden issues if scripts relied on unset variables. This is intentional to avoid silent misconfigurations.set +ewhere needed (e.g., Docker Hub temp tag cleanup).References