Skip to content
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

Dependabot: specify insecure code execution for specific registry #3

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

jackbot
Copy link
Contributor

@jackbot jackbot commented Jan 22, 2025

In order to get Dependabot to work with our govuk_chat_private private
repo, we needed to define a "github" registry in the config file with a
set of credentials which allows Dependabot to check out that repo.

Furthermore it wouldn't check out the repo unless we set the
insecure-external-code-execution option to "allow". But it feels a
bit risky to be allowing insecure code execution for all of our gem
dependencies.

This commit is an attempt to tighten up this requirement by adding
another Bundler ecosystem that's references just the "github" registry
and sets the insecure-external-code-execution to "allow" hopefully
for just that registry.

The idea being that the other Bundler ecosystem doesn't have a registry
defined so perhaps Dependabot will use that one for all the public gems,
and use the "github" registry ecosystem for our private gem.

In order to get Dependabot to work with our govuk_chat_private private
repo, we needed to define a "github" registry in the config file with a
set of credentials which allows Dependabot to check out that repo.

Furthermore it wouldn't check out the repo unless we set the
`insecure-external-code-execution` option to `"allow"`. But it feels a
bit risky to be allowing insecure code execution for all of our gem
dependencies.

This commit is an attempt to tighten up this requirement by adding
another Bundler ecosystem that's references just the "github" registry
and sets the `insecure-external-code-execution` to `"allow"` hopefully
for just that registry.

The idea being that the other Bundler ecosystem doesn't have a registry
defined so perhaps Dependabot will use that one for all the public gems,
and use the "github" registry ecosystem for our private gem.
@govuk-ci govuk-ci temporarily deployed to govuk-chat-dependabot-r-dm6wpk January 22, 2025 15:37 Inactive
@@ -1,7 +1,11 @@
version: 2
updates:
- package-ecosystem: bundler
Copy link
Member

Choose a reason for hiding this comment

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

I think we should have registries section for this bit too, would that be rubygems?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The docs say that the registries section is only for private registries:

Configure access to private package registries to allow Dependabot to update a wider range of dependencies

Copy link
Member

Choose a reason for hiding this comment

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

Oh great - well let's give it a whirl. I'm probably less than 50% confident this'll work but worth a shot.

@jackbot jackbot merged commit 87d890b into main Jan 23, 2025
7 checks passed
@jackbot jackbot deleted the dependabot-registry branch January 23, 2025 09:36
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