Repository navigation
Proposal to reduce inactive collaborator duration #1524
Description
The current security incidents around Linux made me realize that we should look into Node.js organization from a different perspective.
The current inactive collaborator duration is 18 months (1.5 years). Collaborators have write access to the repository, access to collaborator private repository and can run CI at any time (and run any code on our infrastructure).
The requirement to keep collaborator status is:
- Approve a pull-request that landed to main branch
- Author and land a pull-request to main branch at least once in 18 months
I'd like to reduce the inactive collaborator duration to 6 months or 12 months.
My reasonings are:
- People who have not contributed or reviewed or landed a pull-request for more than 6 months has a high chance to not do it for the remainder of 18 months. Having them as "dormant" creates a security risk.
- Due to the complexity of Node.js and the quantity of commits we land every year (around 2300~ commits in 2023 if I'm not mistaken), it's doesn't seem possible for a collaborator to review a pull-request even though they have not contributed for a really long time, and the validity of that review (or block) might or might not be correct.
- Even though we have Slack channels that we can track/monitor of edge cases like force-pushes, landing pull-requests without changes, it's possible that a security incident might occur, in an area we didn't think of. From a security perspective each member of Node.js organization is a risk similar to what's happening right now in Linux ecosystem. This might be harsh to hear, but in reality we all know in our heart that having access to CI (through
request-cior custom tasks) pose serious security risk. - Throughout my Node.js contributing experience (referencing the past 2-3 years), I've seen contributors who never contributed block certain pull-requests that frustrate Node.js contributors, and even resulted in several resignations.
My logic might be flawed, and 6 months or 12 months might not be the correct duration, but I think we have the obligation (to the users of Node.js) to think about collaborator membership and security of it soon.
I believe that we should at least discuss/think about this in the short term.
cc @nodejs/tsc
Activity
joyeecheung commentedon Mar 30, 2024
Back in 2018 at one collaboration summit I proposed to revoke the commit bit if it has not been used to commit anything in 3 months: https://github.com/joyeecheung/talks/blob/master/node_collab_summit_201805/core_collaboartors_status_and_scope.pdf (when I investigated in 2018, ~50% of the collaborators would be affected if we did that). Collaborators could request to go back if they started sending PR again.
Didn't follow up because there were some pushbacks.
benjamingr commentedon Mar 31, 2024
As a counter point I don't think this was ever abused. Releasing and security issues which are the riskier bits both require different steps from being a collaborator (e.g. release team, tsc) that have shorter inactivity deadlines and removing people doesn't buy us too much as a result.
Before we do this, I want to make sure it doesn't alienate people with periods of inactivity - can we run a query to check what active collaborators had a period of inactivity and returned from such a period? (Not sure how hard it is to check since a bunch of people mostly review)
MoLow commentedon Apr 1, 2024
+1 on changing this.
maybe we can make re-nomination easier. for example, requiring more than a single collaborator to block it
based on https://github.com/nodejs/node/blob/main/tools/find-inactive-collaborators.mjs
if we change to 12 months of inactivity:
if we change to months of inactivity:
Note Ian Sutherland has already passed the 18 months inactivity period: nodejs/node#52300
mcollina commentedon Apr 1, 2024
I don't think reducing the inactivity period will reduce the risk of a rogue collaborators.
We should document how we are doing this (code reviews, release reviews, minimum 2 weeks before a commit goes to a LTS release, a tight group of releasers).
UlisesGascon commentedon Apr 8, 2024
Strongly Agree
While
writeaccess grants certain privileges, there are other control measures in place that limit the capabilities for hostile operations.Firstly, there are two CI systems (https://ci.nodejs.org/ and https://ci-release.nodejs.org/) with different Project-based Matrix Authorization Strategies.
In the
ci, collaborators are limited to the following:Reference
While in the
ci-release, collaborators are not allowed at all, as it is limited to Jenkins administrators (sub-group) and releasers.On the other hand, even if a malicious collaborator is capable of landing commits abusing
writeaccess, there are certain ways to detect it, like the OSSF Scorecard already in place that the Security WG reviews every two weeks (example). But I strongly believe that before that, any TC or collaborator will detect that "unexpected change" in themainbranch or some alerts in Slack will bring our attention.Moreover, even if this change goes unnoticed, the commit won't be released automatically to the Node.js users. As with any release in Node.js, we are required to follow these 20 steps. As part of these steps, the releasers will first cherry-pick the commits based on certain criteria and then elaborate a PR that anyone can review (see). These PRs tend to be open for days and are quite well-reviewed and commented by the collaborators.
My two cents, as @mcollina said, the key here is to document and review these protections and processes that we have already in place to prevent bad things (accidental stuff, human errors, malicious actors...) 😊
MoLow commentedon Apr 8, 2024
the benefit of this suggestion might not be huge, but if it is going to affect ±20 people there is not a big downside either
richardlau commentedon Apr 8, 2024
One of the hopes of the commit queue was to perhaps reduce the need to grant so many people write access to the repository.
mhdawson commentedon Apr 8, 2024
@UlisesGascon thanks for providing the outline of some of the things that we do that reduce the risk of a rogue collaborator.
If we do make a change I think 6 months is too short but would be ok with 1 year for inactivity.
anonrig commentedon Apr 8, 2024
@mhdawson Why do you think a year is too short? Can you elaborate?
anonrig commentedon Apr 8, 2024
@UlisesGascon Having write access (meaning executing/running CI jobs) gives users to run any arbitrary code on the proposed infrastructure. We also talked about
non-collaboratorsbeing/not being on the release team for example due to similar concerns. So, I don't quite understand howwrite accesscan be preventable withother control measures.mhdawson commentedon Apr 8, 2024
@anonrig I can easily see people taking a break (for example to care for a new child etc.) who will come back getting removed by the 6 month check. A 12 month check makes this a lot less likely in my opinion.
legendecas commentedon Apr 24, 2024
If as @mcollina mentioned that this measure doesn't address the security issues mentioned in the motivation, what's the remainder motivation of the change?
benjamingr commentedon Apr 24, 2024
Reducing the number of collaborators as a mean to better communicate to the public the number of people actively maintaining the project, I guess?
aduh95 commentedon Apr 24, 2024
I went ahead a run an analysis on Node.js codebase. Using the 8232 commits (that's 20% of all the commits that have landed on
main) that landed at least one year ago, counting contributions for commit authors, co-author, and reviewer, here are the results:{ "oneTimeContributors": 517, "sampleSize": 324, "25-percentile": "3 weeks", "median": "11 weeks", "75-percentile": "6 months", "85-percentile": "9.5 months", "90-percentile": "12.9 months", "99-percentile": "22.5 months", "max": "28.9 months" }N.B.: this includes all returning contributors, not just collaborators. The vast majority of contributors contribute only once to the project.
For 90% of contributors, 56 weeks (which is just a bit more than 12 months) is their longest period on inactivity before coming back to the project.
For 75% of contributors, 26 weeks (which is about 6 months) is their longest period on inactivity before coming back to the project
50% of contributors who have at least contributions and are inactive for more than 11 weeks won't come back.
Sorry if the presentation of results is not ideal. Someone who knows R, please make a graph 🙈
Code
Results if I run the analysis on the last 20 000 commits that have landed on
main{ "oneTimeContributors": 1423, "sampleSize": 690, "25-percentile": "2 weeks", "median": "12 weeks", "75-percentile": "8.7 months", "85-percentile": "14.9 months", "90-percentile": "18.3 months", "99-percentile": "41.7 months", "max": "72.5 months" }benjamingr commentedon Apr 24, 2024
This (25% of collaborators inactive for 26 weeks returning, and 10% after 56 weeks) aligns with my intuition and strengthens my concern this will alienate a significant amount of contributions/reviews in the project.
aduh95 commentedon Apr 24, 2024
Note that this is contributors, not collaborators (which may or may not be a close enough proxy, not sure). Filtering collaborators would be bit harder, but certainly possible if someone is motivated to adapt the script.
aduh95 commentedon Apr 25, 2024
I've re-run the analysis, with different parameters:
main(half commits of the lifetime of the project).The results are more or less consistent with what I've found earlier, except for the 99th percentile but I think that can be explained simply by the fact that I looked at more commits.
Well it took probably too long to came to the same conclusion, but at least I feel more confident those figures corresponds to the reality. Hopefully I haven't introduced any bias in the way I'm selecting the data.
Code
Percentiles of number of contributions per contributors for the last 20k commits
GeoffreyBooth commentedon Apr 30, 2024
So based on this, had the inactive duration been 12 or 9 or 6 months over the past few years, how many currently active collaborators would have been moved to emeritus?