Skip to content

Conversation

@weiji14
Copy link
Member

@weiji14 weiji14 commented Sep 12, 2025

Currently in beta released! Set update interval to monthly with cooldown of 7 days, and PR limit of 2 at a time.

Hoping that this will alleviate the maintenance burden of keeping packages up to date, and make ~= pinning more feasible (xref #46 (comment)).

See example in the wild at eqasim-org/ile-de-france@57f890d, with example update PR at eqasim-org/ile-de-france#358.

References:

Currently in beta. Set update interval to monthly with cooldown of 7 days, and PR limit of 2 at a time.
@github-actions
Copy link

Binder 👈 Test this PR on Binder

@mfisher87
Copy link
Member

The reviewer will need to re-lock the environment, right? Can we customize the dependabot message in any way? It'd be nice to include those instructions in the PR. From preliminary research, looks like we can't do this.

@mfisher87
Copy link
Member

We could add a workflow which adds a comment to a PR if: github.actor == 'dependabot[bot]'?

@weiji14
Copy link
Member Author

weiji14 commented Sep 15, 2025

The reviewer will need to re-lock the environment, right?

Yes

Can we customize the dependabot message in any way? It'd be nice to include those instructions in the PR. From preliminary research, looks like we can't do this.

Only the commit message at https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#commit-message-- can be modified it seems.

We could add a workflow which adds a comment to a PR if: github.actor == 'dependabot[bot]'?

Pangeo-docker-images has this workflow https://github.com/pangeo-data/pangeo-docker-images/blob/master/.github/workflows/PR.yml that automatically adds a /condalock command. See e.g. pangeo-data/pangeo-docker-images#614 (comment). We could port that over here? I do want to avoid the pull_request_target trigger though... Edit: actually, we can just use pull_request target according to pangeo-data/pangeo-docker-images#614 (comment), since we only want it for dependabot PRs which are not from forks.

Write `/condalock` command on dependabot PRs modifying environment.yml files. Adapted from https://github.com/pangeo-data/pangeo-docker-images/blob/2025.08.14/.github/workflows/PR.yml, with extra security hardening by Zizmor (e.g. https://docs.zizmor.sh/audits/#bot-conditions).
jobs:
DeployPangeoBot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == github.event.pull_request.head.repo.full_name
Copy link
Member Author

Choose a reason for hiding this comment

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

workflow which adds a comment to a PR if: github.actor == 'dependabot[bot]'?

Using a more secure variant here based on https://docs.zizmor.sh/audits/#bot-conditions that should help to avoid https://www.synacktiv.com/publications/github-actions-exploitation-dependabot

@weiji14
Copy link
Member Author

weiji14 commented Sep 19, 2025

@mfisher87, ok if you take another look?

@weiji14 weiji14 requested a review from tsnow03 September 22, 2025 23:43
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.

3 participants