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

RFC 153 - Remove allowlists from Dependabot configs #153

Merged
merged 3 commits into from
Aug 16, 2022

Conversation

ChrisBAshton
Copy link
Contributor

@ChrisBAshton ChrisBAshton commented Aug 8, 2022

@ChrisBAshton ChrisBAshton marked this pull request as ready for review August 8, 2022 11:34
Copy link
Member

@brucebolt brucebolt left a comment

Choose a reason for hiding this comment

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

This RFC makes me very happy.

We've had several Rails upgrades that have proven more difficult than expected as multiple dependencies needed upgrading. Doing these updates incrementally would've spread this work over a longer period of time and focussed on a single gem at a time.

@DilwoarH
Copy link

DilwoarH commented Aug 9, 2022

Thank you for raising this, I've had many occasions where there has been a vulnerability due to a package used by another package but dependabot never picked it up!

🏅

rfc-153-revert-rfc-126.md Outdated Show resolved Hide resolved
rfc-153-revert-rfc-126.md Outdated Show resolved Hide resolved
@kevindew
Copy link
Member

Thanks for looking into this and raising this - awesome stuff 👍 As someone who merges a heck of a lot of dependabot PRs, this proposal does make me a little concerned as it doesn’t really feel like we stay on top of the ones we have?

Rather than having this unusual “Revert RFC 126” would be able to give this a new title and indicate that it supersedes RFC 126 (and update that RFC to indicate it was superseded). Revert sounds like a step backwards and doesn’t remove remove that the RFC existed and was expected. I’d suggest something like "Treat dependabot dependencies equally" ?

It sounds like the main motivation to change the behaviour is due to the security issue? I’m assuming we’d not be considering changing our configuration if it wasn’t for this as the other things listed in problems seem to be successes or unknowns. Not too big a deal as it doesn’t affect the proposal but does read a bit strange.

Have we contacted GitHub at all to see what they recommend? It’s a bit of a pain as it used to do security updates despite the file configuration and then that seemed to change sometime earlier this year (e.g. alphagov/whitehall#6451). I somewhat wonder can you have two sets of configuration for a package-ecosystem - one that is an allow list and one that is security updates only?

A few of further questions I have are:

  • Who would be intended to implement changes to the dependabot.yml files?
  • How do we know if this creates a problem? are platform reliability going to be monitoring or are individual teams?
  • Is that RFC intended to indicate it is bad (or forbidden) practice to use an allow list or is that at owning teams discretion?

@ChrisBAshton
Copy link
Contributor Author

Thanks for the review, @kevindew - responses below:

This proposal does make me a little concerned as it doesn’t really feel like we stay on top of the ones we have?

Yes, it will be harder to keep on top of these PRs in the short term: a sacrifice worth making to ensure we receive security updates, in my opinion. Teams have agency to work towards retiring repositories, removing dependencies, or even telling Dependabot to ignore major versions (which would not block security PRs), if they so wish. They can do so via 'ignore' lists (as hinted at in the RFC) or via GitHub comments. Meanwhile, Platform Reliability are hoping to introduce some more automation in future to help teams deal with the load (which we expect to increase by around 36% in the short term).

Anecdotally, the updated configs might even make certain upgrades easier to perform.

Rather than having this unusual “Revert RFC 126” would be able to give this a new title and indicate that it supersedes RFC 126 (and update that RFC to indicate it was superseded).

Fair point. I'll rename, and update the other RFC 👍

It sounds like the main motivation to change the behaviour is due to the security issue? I’m assuming we’d not be considering changing our configuration if it wasn’t for this as the other things listed in problems seem to be successes or unknowns. Not too big a deal as it doesn’t affect the proposal but does read a bit strange.

Yes, absolutely. For context, this RFC came out of us trying to find ways to re-enable security updates, and concluding that the configs we arrived at in RFC-126 were preventing us from doing that. Given that these configs came in via an RFC, it feels important that any major change or removal of configs should also be subject to an RFC. We also recently spotted the intent to 'review the RFC after 6 months', so decided to perform a full review.

Have we contacted GitHub at all to see what they recommend? I somewhat wonder can you have two sets of configuration for a package-ecosystem - one that is an allow list and one that is security updates only?

That idea was already attempted in the spike linked in the RFC (which is also where we reached out to GitHub for support).

Who would be intended to implement changes to the dependabot.yml files?

I was imagining Platform Reliability would do it. We're quite well versed in raising PRs en-masse, and given there's no testing or deployment stage needed, it shouldn't be too much effort. We'd also merge the PRs ourselves, taking approval of this RFC as consent to make changes to the repos.

How do we know if this creates a problem? Are Platform Reliability going to be monitoring or are individual teams?

By "problem", do you mean 'creates too many PRs for devs to handle', or 'unexpectedly breaks Dependabot'?
For the latter, Platform Reliability will be keeping an eye. For the former, I hadn't considered any formal monitoring of numbers, but I would expect us to take another snapshot of statistics before and after the next major change±.

± I'm hoping 'next major change' == 'automatically merge certain PRs', but that discussion is out of scope for this RFC.

Is that RFC intended to indicate it is bad (or forbidden) practice to use an allow list or is that at owning teams discretion?

I would hope teams will point to this RFC as a reason to not use an allow list, but you're right, I haven't written a hard rule here. I'd say it's up to teams discretion, but I can't really think of a situation where we wouldn't need security updates applied, so maybe it should have a section stating "teams MUST NOT use allow lists in Dependabot configs". What do you think?

@kevindew
Copy link
Member

Yes, it will be harder to keep on top of these PRs in the short term: a sacrifice worth making to ensure we receive security updates, in my opinion.

Yup, it's quite a blow that the security update ones stopped working as it's a major use case. Also seems a bit frustrating having to tinker around with the ignore config if we get a bit overwhelmed.

Yes, absolutely. For context, this RFC came out of us trying to find ways to re-enable security updates, and concluding that the configs we arrived at in RFC-126 were preventing us from doing that. Given that these configs came in via an RFC, it feels important that any major change or removal of configs should also be subject to an RFC. We also recently spotted the intent to 'review the RFC after 6 months', so decided to perform a full review.

Sure, perhaps lead the problems section with this to state that the principal problem is the lack of security updates since dependabot's behaviour changed

That idea was already attempted in the spike linked in the RFC (which is also where we reached out to GitHub for support).

Argh, sorry I missed that. Thats frustrating - awesome to get the @issyl0 support though ❤️ . Did we also try having a wildcard for allow of * and see if later options overrode it (though that feels a total hack so probably not wise).

Who would be intended to implement changes to the dependabot.yml files?

I was imagining Platform Reliability would do it. We're quite well versed in raising PRs en-masse, and given there's no testing or deployment stage needed, it shouldn't be too much effort. We'd also merge the PRs ourselves, taking approval of this RFC as consent to make changes to the repos.

Great stuff, may be worth having this in the consequences?

How do we know if this creates a problem? Are Platform Reliability going to be monitoring or are individual teams?

By "problem", do you mean 'creates too many PRs for devs to handle', or 'unexpectedly breaks Dependabot'? For the latter, Platform Reliability will be keeping an eye. For the former, I hadn't considered any formal monitoring of numbers, but I would expect us to take another snapshot of statistics before and after the next major change±.

I meant the former, though I'd not really characterise it as too many PRs too handle, since dependabot stops opening new ones more that that just linger.

± I'm hoping 'next major change' == 'automatically merge certain PRs', but that discussion is out of scope for this RFC.

Yeah, I'm skeptical we'll get to that point myself but like you say out-of-scope. I generally tend to find ones that just pass aren't a big deal though, more the failed build ones seem to linger for ages.

Is that RFC intended to indicate it is bad (or forbidden) practice to use an allow list or is that at owning teams discretion?

I would hope teams will point to this RFC as a reason to not use an allow list, but you're right, I haven't written a hard rule here. I'd say it's up to teams discretion, but I can't really think of a situation where we wouldn't need security updates applied, so maybe it should have a section stating "teams MUST NOT use allow lists in Dependabot configs". What do you think?

Yup, that sounds like something good to state in consequences. Perhaps go for SHOULD NOT? It wouldn't seem that wrong to me for a gem to not be monitoring a security issue in a dependency for instance.

@issyl0
Copy link
Contributor

issyl0 commented Aug 11, 2022

Argh, sorry I missed that. Thats frustrating - awesome to get the @issyl0 support though ❤️ .

When I can help I always will try to! 😍 It was an interesting thing to figure out, albeit not the answer you really wanted!

- Rename the RFC (and filename) to better describe the proposal
- Frontload the 'security' issue in the Problem section
- Clarify the expected consequences of the RFC
@ChrisBAshton
Copy link
Contributor Author

@kevindew I've pushed up some commits in response to your comments 👍

@ChrisBAshton ChrisBAshton changed the title RFC 153 - Revert RFC 126 "Custom configuration for Dependabot" RFC 153 - Remove allowlists from Dependabot configs Aug 12, 2022
Copy link
Member

@kevindew kevindew left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @ChrisBAshton

@ChrisBAshton ChrisBAshton merged commit 471912a into main Aug 16, 2022
@ChrisBAshton ChrisBAshton deleted the revert-rfc-126 branch August 16, 2022 08:13
brucebolt added a commit to alphagov/govuk_message_queue_consumer that referenced this pull request Aug 16, 2022
This makes the configuration consistent with the rest of GOV.UK, taking
into account [RFC-153](alphagov/govuk-rfcs#153).
brucebolt added a commit to alphagov/omniauth-gds that referenced this pull request Aug 16, 2022
This makes the configuration consistent with the rest of GOV.UK, taking
into account [RFC-153](alphagov/govuk-rfcs#153).
@ChrisBAshton
Copy link
Contributor Author

Allow-list removal PRs:

alphagov/content-data-admin#1086
alphagov/content-data-api#1745
alphagov/locations-api#109
alphagov/local-links-manager#947
alphagov/govuk-dependencies#133
alphagov/support#999
alphagov/support-api#672
alphagov/release#1009
alphagov/govuk-puppet#11788
alphagov/govuk-developer-docs#3653
alphagov/asset-manager#950
alphagov/authenticating-proxy#356
alphagov/bouncer#355
alphagov/cache-clearing-service#412
alphagov/collections#2925
alphagov/collections-publisher#1665
alphagov/contacts-admin#1033
alphagov/content-publisher#2570
alphagov/content-store#974
alphagov/content-tagger#1358
alphagov/datagovuk-tech-docs#102
alphagov/datagovuk_find#1097
alphagov/datagovuk_publish#1139
alphagov/email-alert-api#1788
alphagov/email-alert-frontend#1376
alphagov/email-alert-service#543
alphagov/feedback#1487
alphagov/finder-frontend#2856
alphagov/frontend#3340
alphagov/government-frontend#2530
alphagov/govspeak#252
alphagov/govspeak-preview#255
alphagov/govuk-content-api-docs#91
alphagov/govuk-display-screen#60
alphagov/govuk-pact-broker#140
alphagov/govuk-technical-2ndline-dashboard#59
alphagov/govuk_publishing_components#2925
alphagov/govuk_schemas#70
alphagov/hmrc-manuals-api#722
alphagov/places-manager#774
alphagov/info-frontend#1091
alphagov/licence-finder#1190
alphagov/link-checker-api#545
alphagov/manuals-publisher#1927
alphagov/maslow#853
alphagov/paste-html-to-govspeak#240
alphagov/publisher#1660
alphagov/publishing-api#2142
alphagov/router-api#488
alphagov/seal#323
alphagov/search-admin#821
alphagov/search-analytics#147
alphagov/service-manual-frontend#1160
alphagov/service-manual-publisher#1104
alphagov/short-url-manager#728
alphagov/side-by-side-browser#18
alphagov/signon#1920
alphagov/smart-answers#6106
alphagov/specialist-publisher#2081
alphagov/static#2855
alphagov/transition#1199
alphagov/travel-advice-publisher#1414
alphagov/whitehall#6764

sihugh added a commit to alphagov/search-api that referenced this pull request Jan 31, 2023
In [RFC-153](alphagov/govuk-rfcs#153), we proposed and agreed to remove 'allow lists' from all [GOV.UK](http://gov.uk/) Dependabot configs, in order to re-enable security updates.

Trello card: https://trello.com/c/DuA0q9Ck/2966-remove-allow-lists-from-dependabot-configs-2
sihugh added a commit to alphagov/search-api that referenced this pull request Jan 31, 2023
In [RFC-153](alphagov/govuk-rfcs#153), we proposed and agreed to remove 'allow lists' from all [GOV.UK](http://gov.uk/) Dependabot configs, in order to re-enable security updates.

Trello card: https://trello.com/c/DuA0q9Ck/2966-remove-allow-lists-from-dependabot-configs-2
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.

7 participants