-
Couldn't load subscription status.
- Fork 1
Copier update (pre-commit bumps) #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@ejfine has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 3 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughTemplate and tooling versions were bumped; curl install commands hardened; GitHub workflows changed to set persist-credentials: false and add a context-dump step; linting and pre-commit configs updated (including new check-jsonschema); ruff ignores expanded; minor README guidance tweak; template answers and security config adjusted. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant W as Workflow Job
participant CO as actions/checkout
participant ST as Steps
Dev->>GH: Push / PR / Dispatch
GH->>W: Start job
rect rgb(230,240,250)
note right of W: New/modified
W->>ST: Display full GitHub context (toJSON(github))
ST-->>W: Context printed
end
rect rgb(240,235,250)
note right of CO: Changed setting
W->>CO: Checkout code with persist-credentials: false
CO-->>W: Code checked out without stored credentials
end
W->>ST: Run remaining steps (build/test/tag)
ST-->>W: Results
W-->>GH: Job complete
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the upstream template by pulling in changes from the base template via Copier, including version bumps for various tools and dependencies, security improvements, and new features.
Key changes:
- Version updates for Python/JavaScript packages and tools (uv, pnpm, FastAPI, Pulumi, etc.)
- Security enhancements including
persist-credentials: falsefor GitHub Actions checkout steps - Addition of new pre-commit hooks and tooling (check-jsonschema, zizmor configuration)
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| template/ruff.toml | Adds D105 ignore rule for magic method docstrings |
| template/.pre-commit-config.yaml | Updates prettier repo, adds check-jsonschema hook, version bumps for hadolint and ruff |
| template/.github/workflows/*.yaml | Adds persist-credentials: false and debugging output |
| template/.devcontainer/install-ci-tooling.py.jinja | Enhances curl command with security and reliability options |
| extensions/context.py | Updates multiple package versions and adds new dependencies |
| Various root files | Mirror changes from template files for consistency |
| .github/zizmor.yml | New configuration file for zizmor security tool |
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| persist-credentials: false | ||
| - name: Bump version and push tag | ||
| uses: mathieudutour/[email protected] | ||
| uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b # v6.2 |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a commit SHA for GitHub Actions is a good security practice, but the comment indicates this should be v6.2. Verify that the SHA a22cf08638b34d5badda920f9daf6e72c477b07b actually corresponds to the v6.2 release tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (8)
.github/reusable_workflows/build-docker-image.yaml (1)
39-42: Scope permissions to the job and pin Actions by commit SHA
- Move contents: write from workflow to the job that actually needs it (least privilege).
- Consider pinning actions (checkout, buildx, build-push, upload-artifact) to commit SHAs for supply-chain hardening.
Can you confirm which steps truly require contents: write, and whether you’re open to pinning these actions to SHAs across workflows for consistency?
.github/workflows/tag-on-merge.yaml (1)
16-20: Also pin actions/checkout to a commit SHAMinor hardening tweak to match the above pinning practice.
.github/workflows/ci.yaml (1)
13-15: Consider defaulting permissions to least privilege and pin actions by SHA
- Set a conservative top-level permissions (e.g., contents: read) and grant job-level elevations only where needed (mutex, statuses).
- Pin actions (checkout, cache, upload-artifact) to SHAs.
Would you like a follow-up PR to scope permissions per job and pin remaining Actions to SHAs?
.github/workflows/get-values.yaml (1)
27-29: Dumping full GitHub context: consider gatingUseful for debugging but noisy. Consider running only on pull_request or behind a debug flag.
Confirm this won’t bloat logs for frequent push events; okay to gate behind an input?
template/.devcontainer/install-ci-tooling.py.jinja (2)
68-68: Hardened curl flags — nice improvement. Consider adding--retry-all-errorsand-S.These improve resilience and error visibility.
Apply this diff:
- f"curl -fsSL --connect-timeout 20 --max-time 40 --retry 3 --retry-delay 5 --retry-connrefused --proto '=https' https://astral.sh/uv/{UV_VERSION}/install.sh | sh", + f"curl -fsSL -S --connect-timeout 20 --max-time 40 --retry 3 --retry-all-errors --retry-delay 5 --retry-connrefused --proto '=https' https://astral.sh/uv/{UV_VERSION}/install.sh | sh",
106-120: Avoid passing a one‑element list tosubprocess.run(..., shell=True)on POSIX.With
shell=True, pass a string (not["npm -v"]), or dropshell=Trueand pass an arg list.Apply this diff:
- cmd = ( + cmd = ( [ pwsh, # type: ignore[reportPossiblyUnboundVariable] # this matches the conditional above that defines pwsh "-NoProfile", "-NonInteractive", "-Command", cmd, ] if is_windows - else [cmd] + else cmd ) _ = subprocess.run(cmd, shell=True, check=True).devcontainer/install-ci-tooling.py (2)
68-68: Curl hardening — LGTM. Consider parity with template (--retry-all-errors,-S).Apply this diff:
- f"curl -fsSL --connect-timeout 20 --max-time 40 --retry 3 --retry-delay 5 --retry-connrefused --proto '=https' https://astral.sh/uv/{UV_VERSION}/install.sh | sh", + f"curl -fsSL -S --connect-timeout 20 --max-time 40 --retry 3 --retry-all-errors --retry-delay 5 --retry-connrefused --proto '=https' https://astral.sh/uv/{UV_VERSION}/install.sh | sh",
106-120: Use string (not[cmd]) withshell=Trueon POSIX to avoid execution issues.This prevents the shell from treating the entire list element as a program name.
Apply this diff:
- cmd = ( + cmd = ( [ pwsh, # type: ignore[reportPossiblyUnboundVariable] # this matches the conditional above that defines pwsh "-NoProfile", "-NonInteractive", "-Command", cmd, ] if is_windows - else [cmd] + else cmd ) _ = subprocess.run(cmd, shell=True, check=True)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (18)
.copier-answers.yml(2 hunks).devcontainer/devcontainer.json(1 hunks).devcontainer/install-ci-tooling.py(2 hunks).github/reusable_workflows/build-docker-image.yaml(1 hunks).github/workflows/ci.yaml(1 hunks).github/workflows/get-values.yaml(1 hunks).github/workflows/pre-commit.yaml(1 hunks).github/workflows/tag-on-merge.yaml(1 hunks).github/zizmor.yml(1 hunks).pre-commit-config.yaml(5 hunks)README.md(1 hunks)extensions/context.py(4 hunks)ruff.toml(1 hunks)template/.devcontainer/install-ci-tooling.py.jinja(1 hunks)template/.github/workflows/get-values.yaml(1 hunks)template/.github/workflows/pre-commit.yaml(1 hunks)template/.pre-commit-config.yaml(5 hunks)template/ruff.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data3.yaml)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.13.2, --data-file tests/copier_data/data2.yaml)
🔇 Additional comments (25)
ruff.toml (1)
48-49: Add D105 ignore looks goodAligns with template; reduces noise on magic methods.
.github/reusable_workflows/build-docker-image.yaml (1)
69-70: Good hardening: disable persisted credentialsUsing persist-credentials: false is a solid default.
.github/workflows/tag-on-merge.yaml (2)
20-20: Good: no credential persistence on checkoutKeeps git remotes tokenless; action uses GITHUB_TOKEN input anyway.
22-22: Action pinned to commit SHANice supply‑chain hardening for github-tag-action.
template/.pre-commit-config.yaml (5)
105-129: Prettier mirror swap and exclusions LGTMSwitch to rbubley/mirrors-prettier and exclude template/.* make sense for templates.
182-186: Add check-jsonschema for workflows — good additionCatches schema issues in GH workflows early.
214-218: Zizmor block left commented — keep as future opt‑inNo action needed now.
229-229: Hadolint bumpVersion update looks fine.
237-237: Ruff pre-commit bumpLooks good and aligns with ruff config changes.
template/ruff.toml (1)
48-49: Template ruff ignore D105 — consistent with rootKeeps lint expectations aligned across template and repo.
.pre-commit-config.yaml (5)
105-129: Prettier mirror swap and exclusions LGTMMatches template; avoids formatting template assets.
182-186: Add check-jsonschema for workflows — goodImproves CI reliability on workflow changes.
214-218: Commented zizmor hook — fine to deferOptional security scanner can be enabled later.
229-229: Hadolint bumpNo issues spotted.
237-237: Ruff pre-commit bumpLooks consistent with ruff.toml updates.
.github/workflows/ci.yaml (1)
57-59: Good: disable credential persistence in CI checkoutPrevents accidental pushes via embedded tokens.
.github/workflows/get-values.yaml (1)
32-34: Good: disable credential persistenceConsistent with other workflows.
.github/workflows/pre-commit.yaml (2)
33-39: Good hardening: disable persisted credentials on checkout (push path).Looks correct for least‑privilege.
If any subsequent step needs to push (none apparent here), confirm it re‑authenticates Git explicitly since checkout won’t persist the token.
40-45: Mirror hardening for non‑push path looks good.Consistent with above; no issues spotted.
Same note: verify no step implicitly relies on persisted git auth.
template/.github/workflows/get-values.yaml (1)
30-34: Checkout with persist-credentials: false: good; verify downstream push logic.The job later may push a commit on Dependabot branches. Ensure the update-devcontainer-hash action (or a follow-up step) performs its own authenticated push, since checkout won’t persist the token.
template/.github/workflows/pre-commit.yaml (2)
33-39: Security hardening: persist-credentials disabled (push path).Looks right and aligns with other workflows.
Confirm no steps assume persisted git auth.
40-45: Security hardening mirrored for non‑push path.Consistent and OK.
Same verification note re: push/auth if ever added.
.devcontainer/devcontainer.json (1)
64-64: Context hash bump — LGTM.Hash update only; no behavior change.
.devcontainer/install-ci-tooling.py (1)
10-11: Version bumps (uv, pnpm) — LGTM.extensions/context.py (1)
13-15: Version/context updates — LGTM. Ensure downstream templates consume new keys.Values align with the bumped tooling; verify child templates reference new keys (e.g., uuid_utils_version, iconify/nuxt test utils) before release.
Also applies to: 23-23, 35-38, 41-41, 60-71
| python_version: 3.12.7 | ||
| repo_name: copier-python-package-template | ||
| repo_org_name: LabAutomationAndScreening | ||
| repo_org_name_for_copyright: Lab Automation & Screening |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quote value containing an ampersand to avoid YAML parsing edge cases.
Safer to quote strings with “&” to prevent any anchor parsing quirks.
Apply this diff:
-repo_org_name_for_copyright: Lab Automation & Screening
+repo_org_name_for_copyright: "Lab Automation & Screening"📝 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.
| repo_org_name_for_copyright: Lab Automation & Screening | |
| repo_org_name_for_copyright: "Lab Automation & Screening" |
🤖 Prompt for AI Agents
In .copier-answers.yml around line 11, the value repo_org_name_for_copyright
contains an ampersand and must be quoted to avoid YAML interpreting it as an
anchor; update the line so the string is wrapped in quotes (single or double) —
e.g. change to repo_org_name_for_copyright: "Lab Automation & Screening" —
ensuring proper YAML quoting and saving the file.
| rules: | ||
| template-injection: | ||
| ignore: | ||
| # this is just echo-ing out the github context to be visible for debugging, it's not executing commands | ||
| - get-values.yaml:28 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tighten ignore path to match the template file precisely.
The ignore entry references get-values.yaml:28; the changed file lives under template/.github/workflows. Use the full path to avoid a mis‑match.
Apply this diff:
- - get-values.yaml:28
+ - template/.github/workflows/get-values.yaml:28📝 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.
| rules: | |
| template-injection: | |
| ignore: | |
| # this is just echo-ing out the github context to be visible for debugging, it's not executing commands | |
| - get-values.yaml:28 | |
| rules: | |
| template-injection: | |
| ignore: | |
| # this is just echo-ing out the github context to be visible for debugging, it's not executing commands | |
| - template/.github/workflows/get-values.yaml:28 |
🤖 Prompt for AI Agents
.github/zizmor.yml lines 1-5: the ignore path "get-values.yaml:28" is too broad
and doesn't include the template directory; update the ignore entry to the full
path "template/.github/workflows/get-values.yaml:28" so it precisely matches the
template file location.
| To create a new repository using this template: | ||
| 1. Create a basic devcontainer either using the Codespaces default or using the file `.devcontainer/devcontainer-to-instantiate-template.json` from [the base template repo](https://github.com/LabAutomationAndScreening/copier-base-template/blob/main/.devcontainer/devcontainer-to-instantiate-template.json) | ||
| 1. Inside that devcontainer, run `python .devcontainer/install-ci-tooling.py` to install necessary tooling to instantiate the template (you can copy/paste the script from this | ||
| 1. Inside that devcontainer, run `python .devcontainer/install-ci-tooling.py` to install necessary tooling to instantiate the template (you can copy/paste the script from this repo...and you can paste it in the root of the repo if you want) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify path if script is moved to repo root and tighten wording.
Apply this diff:
-1. Inside that devcontainer, run `python .devcontainer/install-ci-tooling.py` to install necessary tooling to instantiate the template (you can copy/paste the script from this repo...and you can paste it in the root of the repo if you want)
+1. Inside that devcontainer, run `python .devcontainer/install-ci-tooling.py` to install necessary tooling to instantiate the template. You can copy the script from this repo; if you place it at the repository root, run `python install-ci-tooling.py` instead.📝 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.
| 1. Inside that devcontainer, run `python .devcontainer/install-ci-tooling.py` to install necessary tooling to instantiate the template (you can copy/paste the script from this repo...and you can paste it in the root of the repo if you want) | |
| 1. Inside that devcontainer, run `python .devcontainer/install-ci-tooling.py` to install necessary tooling to instantiate the template. You can copy the script from this repo; if you place it at the repository root, run `python install-ci-tooling.py` instead. |
🤖 Prompt for AI Agents
In README.md around line 10, the instruction about running python
.devcontainer/install-ci-tooling.py is ambiguous if the script is copied to the
repo root and wording is loose; update the sentence to explicitly state both
paths and tighten phrasing: show the primary command using
.devcontainer/install-ci-tooling.py and add an alternative command for running
the script if placed in the repository root (./install-ci-tooling.py), clarify
that you can copy the script from this repository into either location, and
reword to a concise imperative (e.g., "Run ... to install the required tooling;
you may copy the script from this repository to .devcontainer/ or to the
repository root and run the appropriate path").
| - name: Display full GitHub context | ||
| run: echo '${{ toJSON(github) }}' | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gate the GitHub context dump to avoid noisy logs and potential metadata leakage.
Restrict to trusted events or an explicit debug flag.
Apply this diff to add a guard on the step:
- - name: Display full GitHub context
- run: echo '${{ toJSON(github) }}'
+ - name: Display full GitHub context
+ if: ${{ (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') && (inputs.debug || env.ACTIONS_STEP_DEBUG == 'true') }}
+ run: echo '${{ toJSON(github) }}'And add this input at the top (outside this hunk) so callers can enable when needed:
# under on.workflow_call.inputs
debug:
description: 'Enable verbose context logging'
type: boolean
default: false🤖 Prompt for AI Agents
In template/.github/workflows/get-values.yaml around lines 27 to 29, the
workflow unconditionally echoes the entire GitHub context which can leak
metadata and create noisy logs; add a workflow_call input named debug (boolean,
default false) at the top under on.workflow_call.inputs and modify the Display
full GitHub context step to run only when either inputs.debug is true or the
event is a trusted event (e.g., github.event_name in a whitelist or specific
actor/permission checks); implement the condition using the workflow expression
(inputs.debug == 'true' || <trusted-event-check>) so the echo runs only when
explicitly enabled or for trusted events.
Pull in upstream template changes
Summary by CodeRabbit
Documentation
Chores