Skip to content

[TT-19585 master] gromit: sync templates - #8998

Open
probelabs[bot] wants to merge 1 commit into
masterfrom
releng/master
Open

probelabs[bot] wants to merge 1 commit into
masterfrom
releng/master

Conversation

@probelabs

@probelabs probelabs Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Auto-generated from gromit templates by policy sync.

Ticket Details

TT-19585
Status In Code Review
Summary releng: retry packagecloud uploads in the Publish packages step

Generated at: 2026-11-26 20:41:36

@probelabs
probelabs Bot requested a review from a team as a code owner November 26, 2026 20:06
@probelabs
probelabs Bot enabled auto-merge (squash) November 26, 2026 20:06
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

zizmor findings

Severity Count
High 5
Medium 28
Low 20
Info 24

Full details are in the workflow run.

@probelabs

probelabs Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request, automatically generated by the gromit policy sync tool, introduces significant enhancements to the CI/CD release pipeline. The primary changes focus on improving the reliability of package publishing and integrating security scanning into the workflow.

Files Changed Analysis

  • .github/workflows/plugin-compiler-build.yml & .github/workflows/plugin-compiler-ng-build.yml: Both files receive a minor update, adding pull-requests: read permissions. This allows the dep-guard job to read PR labels during re-runs, improving its functionality.
  • .github/workflows/release.yml: This file contains the majority of the changes:
    • The goreleaser command is modified to --skip=publish for tagged releases, effectively separating the artifact build process from the publishing step.
    • A new Publish packages step is introduced. This step runs only on tagged releases, reads artifact metadata from dist/artifacts.json, and uploads Linux packages (.deb, .rpm) to Packagecloud with a retry mechanism (up to 3 attempts) to handle transient network failures.
    • Four new secret scanning steps are added using a shared GitHub Action. One step scans the dist directory (build artifacts), and the other three scan the ee, fips, and std Docker images after they are pushed to the CI registry. These scans are currently non-blocking (continue-on-error: true).

Architecture & Impact Assessment

  • What this PR accomplishes: It refactors the release workflow to be more robust and secure by decoupling the build and publish stages, adding retries to package uploads, and integrating automated secret scanning for both artifacts and Docker images.

  • Key technical changes introduced:

    1. Decoupled Release Steps: The goreleaser process is now responsible only for building artifacts. A new, separate shell script within the workflow handles the publishing logic.
    2. Robust Publishing: The new Publish packages step implements a retry loop, making the release process more resilient to intermittent upload failures.
    3. Integrated Security Scanning: Automated secret scanning is added as a post-build step for artifacts and Docker images, providing an early detection mechanism for inadvertently committed secrets.
  • Affected system components: The changes are confined to the GitHub Actions CI/CD pipeline. There is no impact on the runtime behavior of the Tyk application itself.

Updated Release Workflow

The release.yml workflow has been updated to include distinct steps for publishing and secret scanning after the initial build.

sequenceDiagram
    participant Job as "goreleaser job"
    participant GoReleaser as "goreleaser release"
    participant SecretScanDist as "Scan dist for secrets"
    participant PublishPackages as "Publish packages (on tag)"
    participant BuildPushImage as "Build & Push Docker Image"
    participant SecretScanImage as "Scan Docker Image"

    Job->>GoReleaser: Run build (--skip=publish)
    GoReleaser-->>Job: Artifacts created in 'dist'

    Job->>SecretScanDist: Scan 'dist' directory (non-blocking)
    SecretScanDist-->>Job: Report findings

    Job->>PublishPackages: Publish Linux packages from 'dist' with retries
    PublishPackages-->>Job: Packages sent to Packagecloud

    Job->>BuildPushImage: Build and push image to CI registry
    BuildPushImage-->>Job: Returns image digest

    Job->>SecretScanImage: Scan image via digest (non-blocking)
    SecretScanImage-->>Job: Report findings
Loading

Scope Discovery & Context Expansion

  • The changes originate from a centralized template synchronization (gromit), indicating a broader organizational initiative to standardize and secure CI/CD practices across multiple repositories.
  • The use of the shared TykTechnologies/github-actions repository for the secret-scan action confirms this pattern is likely being rolled out to other projects.
  • To fully understand the context, a reviewer should examine the implementation of the secret-scan action in the TykTechnologies/github-actions repository. Additionally, reviewing this project's .goreleaser.yml configuration would provide insight into how the ee, fips, and std artifacts are defined, which are now consumed by the new publishing script.
Metadata
  • Review Effort: 2 / 5
  • Primary Label: chore

Powered by Visor from Probelabs

Last updated: 2026-11-26T20:45:21.865Z | Triggered by: pr_updated | Commit: 6b2dfe1

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs

probelabs Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Security Issues (4)

Severity Location Issue
🟡 Warning .github/workflows/release.yml:196-201
The 'Scan dist for secrets' step is configured as non-blocking with `continue-on-error: true` and `enforce: "false"`. This configuration allows the CI/CD pipeline to proceed with publishing artifacts even if secrets are detected, which could lead to accidental secret exposure.
💡 SuggestionTo enforce the security scan as a preventative control, configure the step to fail the workflow if secrets are found. Set `continue-on-error` to `false` and update `enforce` to `"true"`.
🟡 Warning .github/workflows/release.yml:347-352
The 'Scan ee image for secrets' step is configured as non-blocking with `continue-on-error: true` and `enforce: "false"`. This allows the CI/CD pipeline to publish the Docker image even if secrets are found within its layers, posing a risk of secret leakage.
💡 SuggestionTo prevent the release of container images containing secrets, configure the step to fail the workflow upon detection. Set `continue-on-error` to `false` and update `enforce` to `"true"`.
🟡 Warning .github/workflows/release.yml:511-516
The 'Scan fips image for secrets' step is configured as non-blocking with `continue-on-error: true` and `enforce: "false"`. This allows the CI/CD pipeline to publish the Docker image even if secrets are found within its layers, posing a risk of secret leakage.
💡 SuggestionTo prevent the release of container images containing secrets, configure the step to fail the workflow upon detection. Set `continue-on-error` to `false` and update `enforce` to `"true"`.
🟡 Warning .github/workflows/release.yml:673-678
The 'Scan std image for secrets' step is configured as non-blocking with `continue-on-error: true` and `enforce: "false"`. This allows the CI/CD pipeline to publish the Docker image even if secrets are found within its layers, posing a risk of secret leakage.
💡 SuggestionTo prevent the release of container images containing secrets, configure the step to fail the workflow upon detection. Set `continue-on-error` to `false` and update `enforce` to `"true"`.

Architecture Issues (1)

Severity Location Issue
🟡 Warning .github/workflows/release.yml:186-241
The `Publish packages` step embeds a complex, multi-line shell script directly within the workflow YAML. This script is over 30 lines long and contains non-trivial logic, including JSON parsing with `jq`, parallel execution with `xargs`, and a retry loop for package uploads. Embedding complex scripts in YAML harms readability, maintainability, and testability.
💡 SuggestionExtract the shell script logic into a new file in the repository (e.g., `ci/bin/publish-packages.sh`). The workflow `run` step should then be simplified to execute this script inside the Docker container. This change will improve modularity, testability, and readability of the CI workflow.

Performance Issues (1)

Severity Location Issue
🟡 Warning .github/workflows/release.yml:40-679
The `goreleaser` job has been modified to include several new, potentially time-consuming steps (artifact scanning, package publishing, and image scanning) in a sequential manner. This monolithic job structure will lead to a significant increase in the total pipeline execution time, as independent tasks that could be parallelized are forced to run one after another. The new steps add substantial potential runtime, with timeouts of 60 minutes for publishing and 20 minutes for each of the four new scanning steps.
💡 SuggestionTo improve pipeline performance and reduce the total wall-clock time for a release, the `goreleaser` job should be refactored into a multi-job workflow that leverages parallelism. A recommended approach is: 1. Create a `build` job that runs `goreleaser release` to generate artifacts and then uploads the `dist` directory. 2. Create downstream jobs that depend on the `build` job and can run in parallel with each other: - A `publish-packages` job that downloads the `dist` artifact, scans it for secrets, and then runs the package publishing script. - A `build-and-scan-images` job using a matrix strategy (for ee, fips, std) that downloads the `dist` artifact, builds the corresponding Docker image, pushes it, and then runs the security scan. This change would allow independent tasks like package publishing and the various image builds to run concurrently, significantly reducing the overall workflow duration.

Quality Issues (1)

Severity Location Issue
🟡 Warning .github/workflows/release.yml:210
The FIPS Linux package is being published to the `tyk/tyk-ee-unstable` packagecloud repository, which is the same destination used for the standard EE package. This might be unintentional and could lead to confusion for users or incorrect package consumption. Typically, distinct artifacts like FIPS-compliant builds are published to separate, clearly-named repositories.
💡 SuggestionVerify that publishing FIPS packages to the `tyk/tyk-ee-unstable` repository is the intended behavior. If they should be in a separate repository, update the hardcoded repository name in the `jq` command for the `fips` package type.

Powered by Visor from Probelabs

Last updated: 2026-11-26T20:44:28.829Z | Triggered by: pr_updated | Commit: 6b2dfe1

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs probelabs Bot changed the title [TT-19584 master] gromit: sync templates [TT-19385 master] gromit: sync templates Nov 26, 2026
rafalgolarz
rafalgolarz previously approved these changes Nov 26, 2026

@rafalgolarz rafalgolarz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good: the three synced workflow files are byte-identical to gromit master's golden output reviewed in gromit#590 (report-only secret scans and the Publish packages step for tyk-gateway-unstable/tyk-ee-unstable). [head e819a5b]

@probelabs probelabs Bot changed the title [TT-19385 master] gromit: sync templates [TT-19585 master] gromit: sync templates Nov 26, 2026
@sentinelone-cnapp-eu1

Copy link
Copy Markdown

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.

1 similar comment
@sentinelone-cnapp-eu1

Copy link
Copy Markdown

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.

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.

1 participant