authorisedList entries with * never match repository URLs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- git, github, nodejs, typescript
- 領域
- authorization, backend
調査の方向性
getRepoByUrl エントリポイントから開始し、authorisedList の検索と db.getRepos へのアクセスを追跡します。GitHub 組織のワイルドカードケースをプロキシ経由で再現し、ワイルドカード URL エントリと完全一致 URL エントリの両方が、.git 付きと .git なしのリポジトリ URL を含めて正しく解決されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
getRepoByUrl performs an exact URL lookup on authorisedList. Entries intended as org-level wildcards, e.g. https://github.com/example-org/*, do not match concrete repo URLs such as https://github.com/example-org/some-repo.git. There is no way to allowlist all repos under an org without enumerating every URL.
To Reproduce
Steps to reproduce the behavior:
- Run
@finos/[email protected]. - Add an authorised list entry:
{ "url": "https://github.com/example-org/*" } - Clone or pull
https://github.com/example-org/some-repothrough the proxy. - See error: repo not found on authorised list / request rejected as unauthorised.
Expected behavior
https://github.com/example-org/* should match any repo under that org, e.g. https://github.com/example-org/foo and https://github.com/example-org/foo.git. For github.com, repo URLs are always owner/repo. Exact URL entries should continue to work as today.
Screenshots
N/A
Desktop (please complete the following information):
- OS: Linux; macOS
- Browser: N/A (HTTP client /
gitCLI) - Version: Node 20+;
@finos/git-proxy2.0.0
Smartphone (please complete the following information):
- Device: N/A
- OS: N/A
- Browser: N/A
- Version: N/A
Additional context
Suggested fallback when exact lookup misses:
function wildcardToRegExp(pattern) {
const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
return new RegExp('^' + escaped.replace(/\*/g, '[^/]+') + '$');
}
const originalGetRepoByUrl = db.getRepoByUrl;
db.getRepoByUrl = async function (url) {
const exact = await originalGetRepoByUrl(url);
if (exact) return exact;
for (const repo of await db.getRepos()) {
if (repo.url?.includes('*') && wildcardToRegExp(repo.url).test(url)) {
return repo;
}
}
return null;
};
Happy to open a PR if useful.
- 主要言語
- TypeScript
- スター
- 263
- フォーク
- 185
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 39
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
finos/git-proxy のほかの issue
-
Update the Git Proxy website homepage using flyer content対応中かも @Orcus01 が今日担当しました。 オープンdocumentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
finos/git-proxy#1878 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
scanDiff ignores commitConfig.diff.block rules from the --config file対応中かも @goldensyntax が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
finos/git-proxy#1874 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
checkUserPushPermission is checking the wrong user's permission to push再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
finos/git-proxy#1400 · コメント 17 件 ·
メンテナーはふだん 1 日以内に返信
-
meeting
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
finos/git-proxy の issue をすべて見る
似ている issue
-
Navbar avatar and name stay stale after saving profile changes対応中かも @alexechoi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
marmelab/atomic-crm#416 ·
メンテナーはふだん 1 日以内に返信
-
feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
bluesky-social/social-app#12343 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lucide-icons/lucide#5165 ·
メンテナーはふだん 1 日以内に返信
-
[Feature] Preferences - Keep the theme selection popover open after selection for quick previewオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
marktext/marktext#6033 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:desktop bug has repro platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
anthropics/claude-code#107903 ·