Benjamin-Loison / gitea

Git with a cup of tea, painless self-hosted git service
https://gitea.io
MIT License
0 stars 0 forks source link

Push to a remote repository force push mandatorily #82

Open Benjamin-Loison opened 3 months ago

Benjamin-Loison commented 3 months ago

warning

❗❗ This will force push to the remote repository. This will overwrite any changes in the remote repository! ❗❗

Source: https://docs.gitea.com/1.21/usage/repo-mirror#pushing-to-a-remote-repository

As the attacker could modify the repository files:

Enable integrated CI/CD pipelines with Forgejo Actions

is not a workaround.

For making a backup that an attacker having access to the initial repository could not disrupt.

Giving the ability to the hackable pusher to push also to a backup, make the hacked pusher able to destroy the backup except if no force push is allowed. This raises an interesting question if the synchronization is perfect, then force pushing is an issue. Can just disable force pushing for these repositories or if really want to then have to make an action that the pushing machine cannot do.

on https://codeberg.org/USER/REPOSITORY/settings/branches/edit are enough.

on https://codeberg.org/user/settings/applications are enough.

Authorization Password is enough.

For force pushing, also to backup repository, thanks to force pushing mirror behavior, just have to rename temporarily the branch to a not existing one at https://codeberg.org/USER/REPOSITORY/settings/branches/edit?rule_name=DEFAULT_BRANCH.

Related to Benjamin_Loison/nginx/issues/2.

Benjamin-Loison commented 3 months ago

Related to Robust_image_source_identification_on_modern_smartphones_backup.

Benjamin-Loison commented 3 months ago

Related to Benjamin_Loison/git/issues/69.