You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The step 'Attach base image VEX to ee' was missing for the 'ee' build because of an explicit override setting dockerbaseimage: distroless for recent release branches. This created an inconsistency in security procedures between different image types.
This pull request refactors the .github/workflows/release.yml workflow to improve security, reliability, and maintainability. The changes are part of a policy sync and do not alter the core logic of the application.
Files Changed Analysis
The PR modifies a single file, .github/workflows/release.yml, with 46 additions and 18 deletions. The changes focus on replacing inline scripts with more robust, centralized steps and adding new validation logic to the CI pipeline.
Architecture & Impact Assessment
What this PR accomplishes:
Enhances Security: Introduces a new step to validate that the Go version used in the build container is the latest available patch release, preventing the use of outdated versions with potential vulnerabilities.
Improves Maintainability: Replaces a custom script for generating the test distribution matrix with a reusable GitHub Action. It also centralizes the installation of the Docker Scout CLI, which was previously duplicated in two separate steps.
Increases Reliability: The goreleaser command timeout is increased to 120 minutes to prevent failures during long builds.
Key technical changes introduced:
Go Version Validation: A new step is added to the build job that fetches the latest Go releases from go.dev and compares the version in the build container against the latest patch. The build will fail if the version is not up-to-date.
Centralized Docker Scout Installation: The installation of the Docker Scout CLI is now handled in a single, dedicated step that pins to a specific version (v1.22.0) and verifies its checksum. This replaces the previous, less secure curl | sh method.
Refactored Test Matrix: A run step that used curl to fetch a test matrix from an internal service has been replaced with a reusable action: TykTechnologies/github-actions/.github/actions/tests/distro-matrix@production.
Affected system components:
CI/CD Pipeline: The core release workflow is directly impacted. Builds are now stricter regarding the Go version. The configuration for the test matrix is now externalized to another repository.
VEX Attestation: The process for attaching VEX (Vulnerability Exploitability eXchange) data is made more robust by standardizing the installation of the docker-scout tool it depends on.
Workflow Visualization:
graph TD
subgraph "Build Job Enhancements"
A[Start Build] --> B{New: Validate Go Version};
B --> C[Build with Goreleaser];
C --> D{New: Centralized Docker Scout Install};
D --> E[Attach VEX Data];
end
subgraph "Tests Job Refactoring"
F[Old: Custom Script for Distro Matrix] --> G("New: Reusable 'distro-matrix' GitHub Action");
end
## Scope Discovery & Context Expansion
The changes in this PR, while confined to one file, have a broader impact on the development and release process:
- **`tykio/golang-cross` container**: This Docker image is a critical dependency. The new Go validation step means this container must be promptly updated whenever a new Go patch is released to avoid blocking builds.
- **`TykTechnologies/github-actions` repository**: The logic for determining which Linux distributions to run tests against is now managed by the `distro-matrix` action in this separate repository. This centralizes configuration but also means changes to the test matrix are managed outside the `tyk` repository.
<details>
<summary>Metadata</summary>
- Review Effort: 2 / 5
- Primary Label: chore
</details>
<!-- visor:section-end id="overview" -->
<!-- visor:thread-end key="TykTechnologies/tyk#8397@0dcd5d5" -->
---
*Powered by [Visor](https://probelabs.com/visor) from [Probelabs](https://probelabs.com)*
*Last updated: 2026-06-30T13:21:49.798Z | Triggered by: pr_updated | Commit: 0dcd5d5*
💡 **TIP:** You can chat with Visor using `/visor ask <your question>`
<!-- /visor-comment-id:visor-thread-overview-TykTechnologies/tyk#8397 -->
The Docker Scout CLI is pinned to version `1.22.0`. While pinning versions is a good security practice for build reproducibility and preventing the use of potentially malicious newer versions, it can also lead to the use of outdated software with known vulnerabilities if the pinned version is not updated regularly. 💡 SuggestionImplement a process to periodically review and update pinned versions of third-party tools used in the CI/CD pipeline. Consider using automated dependency management tools like Dependabot to get notified of new releases and potential vulnerabilities in this pinned version.
Architecture Issues (2)
Severity
Location
Issue
🟡 Warning
.github/workflows/release.yml:125-155
The "Validate Go version" script is overly complex, chaining multiple shell utilities like `docker`, `curl`, `jq`, `awk`, `sed`, and `cut`. This makes the script brittle, hard to read, and difficult to maintain. A simpler approach would improve clarity and robustness. 💡 SuggestionRefactor the script to simplify the parsing logic. For instance, `jq` can likely handle more of the version string extraction, reducing the need for `awk`, `sed`, and `cut`. Alternatively, consider encapsulating this logic in a reusable GitHub Action for better maintainability and reuse across workflows.
🟡 Warning
.github/workflows/release.yml:188
The `Install Docker Scout CLI` step is conditionally executed only for the `golang_cross == '1.25-bullseye'` build matrix entry. This creates a special case in the workflow logic. If VEX attestation is required for other builds in the future, this hardcoded condition will need to be updated, making the workflow less extensible. 💡 SuggestionTo make the workflow more extensible, control the execution of this step with a dedicated boolean variable in the build matrix (e.g., `attest: true`). The condition would then be `if: ${{ matrix.attest && startsWith(github.ref, 'refs/tags') }}`, which is more declarative and easier to extend to other build configurations without modifying the workflow structure.
Security Issues (1)
Severity
Location
Issue
🟡 Warning
.github/workflows/release.yml:176-177
The Docker Scout CLI is pinned to version `1.22.0`. While pinning versions is a good security practice for build reproducibility and preventing the use of potentially malicious newer versions, it can also lead to the use of outdated software with known vulnerabilities if the pinned version is not updated regularly. 💡 SuggestionImplement a process to periodically review and update pinned versions of third-party tools used in the CI/CD pipeline. Consider using automated dependency management tools like Dependabot to get notified of new releases and potential vulnerabilities in this pinned version.
\n\n
### Architecture Issues (2)
Severity
Location
Issue
🟡 Warning
.github/workflows/release.yml:125-155
The "Validate Go version" script is overly complex, chaining multiple shell utilities like `docker`, `curl`, `jq`, `awk`, `sed`, and `cut`. This makes the script brittle, hard to read, and difficult to maintain. A simpler approach would improve clarity and robustness. 💡 SuggestionRefactor the script to simplify the parsing logic. For instance, `jq` can likely handle more of the version string extraction, reducing the need for `awk`, `sed`, and `cut`. Alternatively, consider encapsulating this logic in a reusable GitHub Action for better maintainability and reuse across workflows.
🟡 Warning
.github/workflows/release.yml:188
The `Install Docker Scout CLI` step is conditionally executed only for the `golang_cross == '1.25-bullseye'` build matrix entry. This creates a special case in the workflow logic. If VEX attestation is required for other builds in the future, this hardcoded condition will need to be updated, making the workflow less extensible. 💡 SuggestionTo make the workflow more extensible, control the execution of this step with a dedicated boolean variable in the build matrix (e.g., `attest: true`). The condition would then be `if: ${{ matrix.attest && startsWith(github.ref, 'refs/tags') }}`, which is more declarative and easier to extend to other build configurations without modifying the workflow structure.
\n\n
### Performance Issues (1)
Severity
Location
Issue
🟡 Warning
.github/workflows/release.yml:134-138
The 'Validate Go version' step makes an uncached network call to `go.dev` on every run. This introduces an external dependency that can slow down the workflow and cause intermittent failures if the service is unavailable, reducing the reliability of the release pipeline. 💡 SuggestionTo improve performance and reliability, consider caching the downloaded release list using `actions/cache`. A cache keyed on the Go minor version could prevent redundant network calls, especially for retried jobs or frequent runs on the same branch.
Quality Issues (1)
Severity
Location
Issue
🟡 Warning
.github/workflows/release.yml:125-156
The Go version validation logic is a multi-line script embedded directly within the GitHub Actions workflow. This makes the workflow file harder to read, and the script itself is not easily reusable or testable. For better maintainability, complex scripts should be externalized. 💡 SuggestionConsider moving this shell script into a separate file (e.g., `.github/scripts/validate-go-version.sh`) and execute that script from the workflow step. This improves separation of concerns and makes both the workflow and the script easier to manage.
SentinelOne CNS Hardcoded Secret Detector
✅ Congratulations, your code is safe
SentinelOne CNS is a cloud-agnostic, agentless CSPM & CWPP solution that continuously detects and prevents vulnerabilities that have the highest probability of being exploited in Azure, AWS, Google Cloud, and Kubernetes.
SentinelOne CNS Hardcoded Secret Detector
✅ Congratulations, your code is safe
SentinelOne CNS is a cloud-agnostic, agentless CSPM & CWPP solution that continuously detects and prevents vulnerabilities that have the highest probability of being exploited in Azure, AWS, Google Cloud, and Kubernetes.
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
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.
Problem / Task
The step 'Attach base image VEX to ee' was missing for the 'ee' build because of an explicit override setting
dockerbaseimage: distrolessfor recent release branches. This created an inconsistency in security procedures between different image types.Requested by: U3P2L4XNE
Slack thread: https://slack.com/archives/C0ATZQCMG58/p1782763844850069
Changes
Testing