nextcloud / nextcloud/server

Code integrity check

Open
#9,375 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: apps management feature: install and update needs review overview technical debt
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

There are currently multiple problems with the code integrity check, which should be tackled at some point:

  1. Integrity is only checked after an update, but for everything
  2. Integrity of an app is not checked after an update from the appstore
  3. The code of the app is run (updater) before doing the integrity check.
  4. The integrity check is currently synchronous while running the update (maintenance mode on) but takes a lot of time

Things that should change:

  1. Integrity check should be run before the update (of server and app), so we only run signed code (although for the server this is somewhat unrealistic, because you replaced the files before already, so an attack case can not be covered, only a "borked" upload.
  2. Integrity check should be ran for the specific app when updating via the app store
  3. When updating via console the integrity check should be optional, to allow faster deployment across multiple instances when you use a deployment tool (chef, puppet, git, ...).

cc @MorrisJobke @rullzer

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the server and app update entry points, including App Store and console update paths, and locate the existing integrity check. Compare when checks run in each path and how maintenance mode affects them. Done means checks cover the requested update flows, console checks are optional, and the timing avoids executing updated code before validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
release, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.