Skip to content

fix: pin dependencies - #170

Merged
moshloop merged 1 commit into
mainfrom
fix/pin-dependencies
Aug 3, 2026
Merged

fix: pin dependencies#170
moshloop merged 1 commit into
mainfrom
fix/pin-dependencies

Conversation

@adityathebe

@adityathebe adityathebe commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Pinned build, test, lint, benchmark, and release tooling to fixed versions for more consistent and reproducible execution.
    • Locked Docker build images to immutable digests, improving supply-chain reliability.

Pin workflow actions, build images, and benchstat to immutable hashes. Give the dynamic Docker target a stable default so internal stages are recognized as pinned.
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Benchstat

Base: f8d783cb66d4dbf5c779911e21fac7d3f24a8818
Head: 4f7fa970ba11f3fb363b8b4c58acfe4d3e933a66

4 minor regression(s) (all within 5% threshold)

Benchmark Base Head Change p-value
RunExpressionContextCompile/compile/smallEnv-4 321.6µ 328.7µ +2.19% 0.002
Serialize/Size-10-4 34.08µ 34.43µ +1.02% 0.009
Serialize/Size-100-4 324.1µ 326.8µ +0.83% 0.026
RunExpressionContext/cacheHit/largeEnv-4 10.46µ 10.55µ +0.79% 0.041
1 improvement(s)
Benchmark Base Head Change p-value
Serialize_NoNativeTypes/Size-100-4 90.42µ 88.53µ -2.10% 0.004
Full benchstat output
goos: linux
goarch: amd64
pkg: github.com/flanksource/gomplate/v3
cpu: AMD EPYC 9V74 80-Core Processor                
                                               │ bench-base.txt │           bench-head.txt           │
                                               │     sec/op     │    sec/op     vs base              │
RunExpressionContext/cacheHit/smallEnv-4            1.728µ ± 6%   1.706µ ± 21%       ~ (p=0.310 n=6)
RunExpressionContext/cacheHit/largeEnv-4            10.46µ ± 2%   10.55µ ±  5%  +0.79% (p=0.041 n=6)
RunExpressionContextCompile/compile/smallEnv-4      321.6µ ± 1%   328.7µ ±  1%  +2.19% (p=0.002 n=6)
RunExpressionContextCompile/compile/largeEnv-4      333.2µ ± 1%   332.2µ ±  2%       ~ (p=0.699 n=6)
Serialize/Size-10-4                                 34.08µ ± 1%   34.43µ ±  1%  +1.02% (p=0.009 n=6)
Serialize/Size-100-4                                324.1µ ± 1%   326.8µ ±  0%  +0.83% (p=0.026 n=6)
Serialize/Size-1000-4                               3.333m ± 0%   3.344m ±  1%       ~ (p=0.180 n=6)
Serialize/Size-10000-4                              41.69m ± 1%   41.51m ±  2%       ~ (p=0.937 n=6)
Serialize_NoNativeTypes/Size-100-4                  90.42µ ± 1%   88.53µ ±  2%  -2.10% (p=0.004 n=6)
Serialize_NoNativeTypes/Size-1000-4                 910.7µ ± 1%   909.0µ ±  1%       ~ (p=0.937 n=6)
Serialize_NoNativeTypes/Size-10000-4                9.139m ± 1%   9.112m ±  1%       ~ (p=0.180 n=6)
geomean                                             306.5µ        306.6µ        +0.04%

                                               │ bench-base.txt │            bench-head.txt            │
                                               │      B/op      │     B/op      vs base                │
RunExpressionContext/cacheHit/smallEnv-4             664.0 ± 0%     664.0 ± 0%       ~ (p=1.000 n=6) ¹
RunExpressionContext/cacheHit/largeEnv-4           2.445Ki ± 0%   2.445Ki ± 0%       ~ (p=1.000 n=6) ¹
RunExpressionContextCompile/compile/smallEnv-4     194.4Ki ± 0%   194.4Ki ± 0%       ~ (p=0.699 n=6)
RunExpressionContextCompile/compile/largeEnv-4     196.3Ki ± 0%   196.3Ki ± 0%       ~ (p=0.457 n=6)
Serialize/Size-10-4                                11.06Ki ± 0%   11.06Ki ± 0%       ~ (p=1.000 n=6) ¹
Serialize/Size-100-4                               95.51Ki ± 0%   95.51Ki ± 0%       ~ (p=0.610 n=6)
Serialize/Size-1000-4                              952.3Ki ± 0%   952.3Ki ± 0%       ~ (p=0.314 n=6)
Serialize/Size-10000-4                             10.04Mi ± 0%   10.01Mi ± 0%       ~ (p=0.097 n=6)
Serialize_NoNativeTypes/Size-100-4                 36.33Ki ± 0%   36.33Ki ± 0%       ~ (p=1.000 n=6) ¹
Serialize_NoNativeTypes/Size-1000-4                365.6Ki ± 0%   365.6Ki ± 0%       ~ (p=1.000 n=6)
Serialize_NoNativeTypes/Size-10000-4               3.584Mi ± 0%   3.584Mi ± 0%       ~ (p=1.000 n=6)
geomean                                            110.7Ki        110.6Ki       -0.02%
¹ all samples are equal

                                               │ bench-base.txt │           bench-head.txt            │
                                               │   allocs/op    │  allocs/op   vs base                │
RunExpressionContext/cacheHit/smallEnv-4             20.00 ± 0%    20.00 ± 0%       ~ (p=1.000 n=6) ¹
RunExpressionContext/cacheHit/largeEnv-4             101.0 ± 0%    101.0 ± 0%       ~ (p=1.000 n=6) ¹
RunExpressionContextCompile/compile/smallEnv-4      2.254k ± 0%   2.254k ± 0%       ~ (p=1.000 n=6) ¹
RunExpressionContextCompile/compile/largeEnv-4      2.337k ± 0%   2.337k ± 0%       ~ (p=1.000 n=6) ¹
Serialize/Size-10-4                                  268.0 ± 0%    268.0 ± 0%       ~ (p=1.000 n=6) ¹
Serialize/Size-100-4                                2.518k ± 0%   2.518k ± 0%       ~ (p=1.000 n=6) ¹
Serialize/Size-1000-4                               25.80k ± 0%   25.80k ± 0%       ~ (p=1.000 n=6)
Serialize/Size-10000-4                              265.0k ± 0%   264.8k ± 0%       ~ (p=0.567 n=6)
Serialize_NoNativeTypes/Size-100-4                   911.0 ± 0%    911.0 ± 0%       ~ (p=1.000 n=6) ¹
Serialize_NoNativeTypes/Size-1000-4                 9.758k ± 0%   9.758k ± 0%       ~ (p=1.000 n=6) ¹
Serialize_NoNativeTypes/Size-10000-4                100.1k ± 0%   100.1k ± 0%       ~ (p=0.636 n=6)
geomean                                             2.641k        2.641k       -0.01%
¹ all samples are equal

@github-actions github-actions Bot added the build label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The pull request replaces mutable GitHub Action, benchstat, and Go Alpine image references with immutable commit SHAs or a digest across CI workflows and Docker build files.

Changes

Build Input Pinning

Layer / File(s) Summary
Workflow and tool reference pins
.github/workflows/benchmark.yml, .github/workflows/lint.yml, .github/workflows/release.yml, .github/workflows/test.yml
Workflow actions use commit SHAs. The benchstat installation uses a fixed commit instead of latest.
Docker base image pins
Dockerfile, Dockerfile.integration
Both Go Alpine base images use a fixed SHA256 digest.

Suggested reviewers: hairyhenderson, moshloop

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: pinning workflow actions, the benchstat installation, and Docker base images to immutable references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pin-dependencies
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/pin-dependencies

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/lint.yml (1)

16-24: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Pin the golangci-lint version.

The action is pinned, but version: latest still selects a moving tool version. Replace it with an exact approved version.

Proposed fix
         with:
-          version: latest
+          version: vX.Y.Z
🤖 Prompt for 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.

In @.github/workflows/lint.yml around lines 16 - 24, Replace the moving
`version: latest` setting in the `golangci-lint` action configuration with the
exact approved golangci-lint version, while preserving the existing action pin
and arguments.
🧹 Nitpick comments (1)
Dockerfile.integration (1)

1-1: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Use a direct digest reference for the shared Go base image.

golang:1.26-alpine is mutable and can resolve to another Go 1.26.x patch. Since this digest refers to the golang:1.26.5-alpine multi-platform image and is already pinned, reference the digest directly in both Dockerfiles so golang:1.26-alpine changes do not affect these builds.

🤖 Prompt for 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.

In `@Dockerfile.integration` at line 1, Replace the mutable golang:1.26-alpine
reference with the specified direct digest reference in Dockerfile.integration
at lines 1-1 and Dockerfile at lines 3-3, preserving the existing pinned digest
so both builds use the golang:1.26.5-alpine image.
🤖 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/benchmark.yml:
- Around line 22-25: Update the actions/checkout step in the benchmark workflow
to disable GitHub credential persistence by setting its persist-credentials
option to false, while preserving the existing full-history fetch configuration.

---

Outside diff comments:
In @.github/workflows/lint.yml:
- Around line 16-24: Replace the moving `version: latest` setting in the
`golangci-lint` action configuration with the exact approved golangci-lint
version, while preserving the existing action pin and arguments.

---

Nitpick comments:
In `@Dockerfile.integration`:
- Line 1: Replace the mutable golang:1.26-alpine reference with the specified
direct digest reference in Dockerfile.integration at lines 1-1 and Dockerfile at
lines 3-3, preserving the existing pinned digest so both builds use the
golang:1.26.5-alpine image.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cccd4168-1a8f-46ab-ac8d-db8c199578d4

📥 Commits

Reviewing files that changed from the base of the PR and between f8d783c and 4f7fa97.

📒 Files selected for processing (6)
  • .github/workflows/benchmark.yml
  • .github/workflows/lint.yml
  • .github/workflows/release.yml
  • .github/workflows/test.yml
  • Dockerfile
  • Dockerfile.integration

Comment on lines 22 to 25
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not persist the GitHub token in the checkout.

Later steps use local Git operations and execute checked-out code. actions/checkout otherwise stores GITHUB_TOKEN in .git/config. Disable credential persistence to reduce token exposure.

Proposed fix
       - name: Checkout code
         uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
         with:
+          persist-credentials: false
           fetch-depth: 0
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
fetch-depth: 0
🧰 Tools
🪛 zizmor (1.28.0)

[warning] 22-25: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for 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.

In @.github/workflows/benchmark.yml around lines 22 - 25, Update the
actions/checkout step in the benchmark workflow to disable GitHub credential
persistence by setting its persist-credentials option to false, while preserving
the existing full-history fetch configuration.

Source: Linters/SAST tools

@moshloop
moshloop merged commit 796e67d into main Aug 3, 2026
9 checks passed
@moshloop
moshloop deleted the fix/pin-dependencies branch August 3, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants