Feature Request: add "forward only" option for GitRepository with signed commits
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
調査の方向性
実装ファイルやテストは指定されていません。まず、GitRepository のリコンシリエーションと、source-controller における現在の commit checkout および署名検証のフローを追跡します。保存された検証済み commit をどのように追跡するか、force push 後にどのように祖先関係を確認するかを定義し、受け入れられる子 commit、拒否されるリセット、無効な署名のカバレッジを追加します。
索引モデルが issue の本文から書いたものです。
説明
I'm wondering if it is possible to implement a GitRepository option to only accept new signed commits which are a child of the current validated signed commit.
Current situation:
At the moment it is possible to reset the GIT history to an older singed commit by force pushing and the source controller accepts the commit. This permits user, which have write permission to the GIT repository to change the deployment to an older state even though their public key is not in the list of permitted signers.
example GIT log:
commit 5b468b41996fcb4146bb8fe9e88aa6735c799fc9
Author: Example User <[email protected]>
Date: Mon Mar 23 22:53:01 2026 +0100
second signed commit
commit f99de69ed074fd3b59570786d515ed4ba56aef12
Author: Example User <[email protected]>
Date: Mon Mar 23 22:52:15 2026 +0100
first signed commit
commit 721a520671afc30070c0767baff4f44a4fe72fab
Author: Example User <[email protected]>
Date: Mon Mar 23 22:51:42 2026 +0100
initial commit
If the source controller has currently checked out and verified commit 5b468b41996fcb4146bb8fe9e88aa6735c799fc9 it is possible for user a user with write access to the repo but without the users key in the list of trusted keys to do following:
git reset --hard f99de69ed074fd3b59570786d515ed4ba56aef12
git push -f
The source-controller would checkout and verify commit f99de69ed074fd3b59570786d515ed4ba56aef12 even though the change was performed by a user that should not be permitted to perform changes within this GitRepository resource.
Technically: if the same repo would contain a kustomization with the secret of permitted signers. A user with write access to the repo and who was previously in the list of permitted singers could revert to a version where the user was in the list. The secret would be revert to the old state and the user could push a complete different configuration with a now valid signed commit.
Possible solution:
Adding a config option which permit for "forward-only" changes. It should not be possible to reset the history to an older GIT commit id. Only signed revert commits or regular commits which are child of the current parent are accepted.
example GIT log:
commit 683408a1ae2425940ea5cc7b3d9120fdf1dd274f
Author: Example User <[email protected]>
Date: Mon Mar 23 22:54:20 2026 +0100
another signed commit
commit dfd2c8d0ab2ff2ebc27601fd0bc7beb11c392d2b
Author: Example User <[email protected]>
Date: Mon Mar 23 22:53:49 2026 +0100
an example unsigned commit
commit 5b468b41996fcb4146bb8fe9e88aa6735c799fc9 (HEAD -> main)
Author: Example User <[email protected]>
Date: Mon Mar 23 22:53:01 2026 +0100
second signed commit
commit f99de69ed074fd3b59570786d515ed4ba56aef12
Author: Example User <[email protected]>
Date: Mon Mar 23 22:52:15 2026 +0100
first signed commit
commit 721a520671afc30070c0767baff4f44a4fe72fab
Author: Example User <[email protected]>
Date: Mon Mar 23 22:51:42 2026 +0100
initial commit
Situation:
- forward-only is enabled
- currently checked out commit id is
5b468b41996fcb4146bb8fe9e88aa6735c799fc9
Now the source-controller would:
- not accept a reset of HEAD to commit
f99de69ed074fd3b59570786d515ed4ba56aef12as this commit would not be a child of the current checked out commit. - not accept commit
dfd2c8d0ab2ff2ebc27601fd0bc7beb11c392d2bas it's an unsigned or invalid signed commit - would accept commit
683408a1ae2425940ea5cc7b3d9120fdf1dd274fas it is a child commit of5b468b41996fcb4146bb8fe9e88aa6735c799fc9and has a valid signature.
This permits only user which are in the list of permitted signers to push commits which are accepted by the source-controller.
This would require to backtrack the git history to a matching current git commit id if new commits are pushed. Not sure how much performance or memory this would cost, but this would improve supply chain security quite a lot, from my point of view.
- 主要言語
- Go
- スター
- 283
- フォーク
- 258
- 平均マージ
- 1日 17時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fluxcd/source-controller のほかの issue
-
Improve documentation on debugging the controller locally再び着手できるかも @Bryandero98 が 27 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンarea/docs good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
fluxcd/source-controller#666 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area/oci enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
fluxcd/source-controller#2180 ·
メンテナーはふだん 1 日以内に返信
-
`OCIRepository`/cosign verification: support TSA-only trusted roots (no transparency log) for private Sigstore instances like GitHub Artifact Attestations対応中かも @stealthybox が 140 日前に担当しました。 オープンarea/oci area/security enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
fluxcd/source-controller#2167 · コメント 4 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
fluxcd/source-controller#2150 ·
メンテナーはふだん 1 日以内に返信
-
GitRepository `.spec.ref.commit` + `.spec.ref.branch` does not shallow clone, contrary to the docsオープン
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
fluxcd/source-controller#2146 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
fluxcd/source-controller の issue をすべて見る
似ている issue
-
Action Required: Fix Renovate Configuration対応中かも @thompson-tomo が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
open-telemetry/opentelemetry-collector#16170 ·
メンテナーはふだん 1 日以内に返信
-
automation awf compiler specifications
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
puppe1990/amarra-cais#342 ·
メンテナーはふだん 1 日以内に返信
-
replay: a run cancelled during environment setup is logged as an ERROR (Instrument drops the cancellation)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信