Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
bc0b2f6
feat: add SSH proxy server support
dcoric Sep 12, 2025
2bcb475
refactor: convert SSH files from JavaScript to TypeScript
dcoric Sep 12, 2025
0b38aee
feat: update SSH server to enhance client handling and logging
dcoric Sep 15, 2025
af69d45
Merge branch 'main' into denis-coric/ssh
dcoric Sep 15, 2025
8df000a
fix: enhance SSH server tests and client handling
dcoric Sep 15, 2025
719103a
feat: add findUserBySSHKey function to user database operations
dcoric Sep 15, 2025
2fd1703
refactor: enhance SSH server keepalive functionality and error handling
dcoric Sep 17, 2025
18b52ab
feat: implement SSH key retention feature for Git Proxy
dcoric Sep 17, 2025
91b58eb
feat: add SSH configuration and enhance server command handling
dcoric Sep 19, 2025
b2e7557
chore: update .gitignore to exclude Claude directory
dcoric Sep 19, 2025
7e3553c
fix: ensure SSH enabled configuration is a boolean and improve error …
dcoric Sep 19, 2025
2d56a76
Merge remote-tracking branch 'finos/main' into denis-coric/ssh-flow
dcoric Sep 25, 2025
61e6a0b
fix: fixes lint and refreshed package-lock.json
dcoric Sep 25, 2025
27b190b
Merge remote-tracking branch 'finos/main' into denis-coric/ssh-flow
dcoric Oct 3, 2025
d39e32e
fix: implement SSH pack data capture for security scanning
dcoric Oct 3, 2025
6192ee9
fix: adds test SSH keys to .gitignore
dcoric Oct 6, 2025
1f94f95
test: enhance SSHServer tests for git-receive-pack handling
dcoric Oct 6, 2025
3150f5d
feat: enhance configuration for SSH and git operations
dcoric Oct 7, 2025
2cc7553
feat: add comprehensive performance tests for HTTP/HTTPS and SSH prot…
dcoric Oct 9, 2025
107bac1
Merge branch 'main' into denis-coric/ssh-flow
dcoric Oct 9, 2025
8698ad1
Merge remote-tracking branch 'finos/main' into denis-coric/ssh-flow
dcoric Oct 13, 2025
cd47fb8
refactor: rename variables in performance tests for clarity
dcoric Oct 13, 2025
b54952d
Merge branch 'denis-coric/ssh-flow' of https://github.com/G-Research/…
jescalada Nov 8, 2025
b8ba792
test: fix flaky ssh performance test
jescalada Nov 8, 2025
f238201
chore: fix config/env import
jescalada Nov 9, 2025
bf920f8
test: remove unused create-user CLI tests
jescalada Nov 9, 2025
42b2b6e
chore: add constants for file size and replace throughout app
jescalada Nov 9, 2025
95f220c
feat: improve public key validation in /:username/ssh-keys
jescalada Nov 11, 2025
5d2930b
chore: add missing constants to ssh tests
jescalada Nov 11, 2025
e9af0aa
chore: remove redundant public key check
jescalada Nov 11, 2025
1ccae5f
fix: add validation for private key file before SSH server init
jescalada Nov 11, 2025
7a6b7a7
chore: improve 401 error messages and normalize GitProxy spelling
jescalada Nov 12, 2025
3962e7d
refactor: simplify captureSSHKey action, improve error handling
jescalada Nov 13, 2025
f9e5e9d
feat: enforce SSH key uniqueness to prevent duplicate keys across users
fabiovincenzi Nov 13, 2025
d5920a2
fix: ensure proper cleanup of SSH key buffers in captureSSHKey
fabiovincenzi Nov 13, 2025
9518fcb
Merge branches 'denis-coric/ssh-flow' and 'denis-coric/ssh-flow' of h…
jescalada Nov 14, 2025
980c896
chore: adjust failing test asserts
jescalada Nov 14, 2025
2fe2548
chore: simplify SSHKeyManager
jescalada Nov 14, 2025
f1b4ddb
refactor: simplify pullRemote and replace sync fs functions with fs.p…
jescalada Nov 14, 2025
631e635
chore: simplify error handling and fix failing tests
jescalada Nov 14, 2025
367ef88
feat: add csrf-token endpoint and CLI utils
jescalada Nov 14, 2025
9302c5d
fix: cli CSRF protection and session cookie management
jescalada Nov 14, 2025
39c0ee7
test: fix failing CLI tests and improve getCliPostRequestConfig/logou…
jescalada Nov 17, 2025
51a4a35
refactor(ssh): add PktLineParser and base function to eliminate code …
fabiovincenzi Nov 20, 2025
f6fb9eb
feat(ssh): implement server-side SSH agent forwarding with LazyAgent …
fabiovincenzi Nov 20, 2025
61b3595
feat(ssh): add SSH helper functions for connection setup and validation
fabiovincenzi Nov 20, 2025
3e0e5c0
refactor(ssh): simplify server.ts and pullRemote using helper functions
fabiovincenzi Nov 20, 2025
4a2b273
docs: add SSH proxy architecture documentation
fabiovincenzi Nov 20, 2025
0f3d3b8
fix(ssh): correct ClientWithUser to extend ssh2.Connection instead of…
fabiovincenzi Nov 20, 2025
39be87e
feat: add dependencies for SSH key management
fabiovincenzi Oct 24, 2025
dbef641
feat(db): add PublicKeyRecord type for SSH key management
fabiovincenzi Nov 6, 2025
9545ac2
feat(db): implement SSH key management for File database
fabiovincenzi Nov 6, 2025
24d499c
feat(db): implement SSH key management for MongoDB
fabiovincenzi Nov 6, 2025
df603ef
feat(db): update database wrapper with correct SSH key types
fabiovincenzi Nov 6, 2025
7e5d6d9
feat(api): add SSH key management endpoints
fabiovincenzi Nov 6, 2025
59aef6e
feat(ui): add SSH service for API calls
fabiovincenzi Nov 6, 2025
ebfff2d
feat(ui): add SSH key management UI and clone tabs
fabiovincenzi Nov 6, 2025
0570c4c
feat(cli): update SSH key deletion to use fingerprint
fabiovincenzi Nov 6, 2025
e5da79c
chore: add SSH key fingerprint API and UI updates
fabiovincenzi Nov 20, 2025
ab0bdbe
refactor(ssh): remove explicit SSH algorithm configuration
fabiovincenzi Nov 26, 2025
b72d222
fix(ssh): use existing packet line parser
fabiovincenzi Nov 26, 2025
55d06ab
feat(ssh): improve agent forwarding error message and make it configu…
fabiovincenzi Nov 26, 2025
f6281d6
fix(ssh): use startsWith instead of includes for git-receive-pack det…
fabiovincenzi Nov 26, 2025
5e3e13e
feat(ssh): add SSH host key verification to prevent MitM attacks
fabiovincenzi Nov 26, 2025
cb99e2c
feat(api): add SSH config endpoint for UI
fabiovincenzi Dec 3, 2025
345d333
refactor(proxy): extract HTTPS clone logic using Strategy pattern
fabiovincenzi Dec 3, 2025
992fdae
feat(ssh): implement SSH agent forwarding for repository cloning
fabiovincenzi Dec 3, 2025
7e652d0
refactor(ssh): extract common SSH command execution logic
fabiovincenzi Dec 3, 2025
8936225
fix(ui): correct SSH URL generation in Code button
fabiovincenzi Dec 3, 2025
ae8ef8a
chore: merge upstream main from finos/git-proxy
fabiovincenzi Dec 3, 2025
10b949d
feat(ui): restore SSH key management in UserProfile
fabiovincenzi Dec 3, 2025
a128cdd
feat(ui): include SSH agent forwarding flag in clone command
fabiovincenzi Dec 3, 2025
0b53906
refactor(ssh): remove proxyUrl dependency by parsing hostname from pa…
fabiovincenzi Dec 3, 2025
863f0ab
chore: add debug logs
jescalada Dec 15, 2025
042fe47
refactor(ssh): remove SSH Key Retention system
fabiovincenzi Dec 16, 2025
8a7f914
docs(ssh): remove SSH Key Retention documentation
fabiovincenzi Dec 16, 2025
4eb234b
fix(config): remove obsolete ssh.clone.serviceToken
fabiovincenzi Dec 16, 2025
092f994
docs(config): improve SSH schema descriptions
fabiovincenzi Dec 16, 2025
095d2a2
docs(readme): clarify SSH agent forwarding
fabiovincenzi Dec 16, 2025
649625e
refactor(ssh): remove TODO in server initialization
fabiovincenzi Dec 16, 2025
c7f1f75
improve(ssh): enhance agent forwarding error message
fabiovincenzi Dec 16, 2025
222ba86
feat(ssh): add auto-generated host key management
fabiovincenzi Dec 16, 2025
77aeeba
improve(ssh): add detailed GitHub auth error messages
fabiovincenzi Dec 16, 2025
7b0ba90
fix(deps): add missing ssh2 dependency
fabiovincenzi Dec 16, 2025
c07d5cd
test(ssh): update tests for agent forwarding
fabiovincenzi Dec 16, 2025
c10047e
fix(deps): correct exports conditions order for Vite 7
fabiovincenzi Dec 16, 2025
a656040
docs: remove duplicate SSH.md documentation
fabiovincenzi Dec 16, 2025
5114b93
docs: optimize and improve SSH_ARCHITECTURE.md
fabiovincenzi Dec 16, 2025
9fff6b7
docs: fix obsolete SSH information in ARCHITECTURE.md
fabiovincenzi Dec 16, 2025
7bf20b6
fix(ssh): include ssh-agent startup in error message
fabiovincenzi Dec 16, 2025
a4df01c
Merge upstream/main: integrate latest changes and fix singleBranch
fabiovincenzi Dec 16, 2025
7062809
docs: fix processor chain count in README (17 -> 16)
fabiovincenzi Dec 16, 2025
2df3916
fix(config): remove personal test repositories from config
fabiovincenzi Dec 16, 2025
db4044a
refactor(config): remove obsolete getProxyUrl and getSSHProxyUrl func…
fabiovincenzi Dec 16, 2025
06f5052
refactor(ssh): remove unnecessary type cast for findUserBySSHKey
fabiovincenzi Dec 17, 2025
731ed35
refactor(routes): remove duplicate JavaScript route files
fabiovincenzi Dec 17, 2025
1b73bb3
security: remove SSH private keys from repository
fabiovincenzi Dec 17, 2025
bfed68a
build: add @types/ssh2 to fix TypeScript compilation errors
fabiovincenzi Dec 17, 2025
7662e6a
security: fix CodeQL command injection and URL sanitization issues
fabiovincenzi Dec 17, 2025
4230bc5
refactor(test): convert remaining test files from JavaScript to TypeS…
fabiovincenzi Dec 18, 2025
0ff683e
fix(ssh): comprehensive security enhancements and validation improvem…
fabiovincenzi Dec 18, 2025
e3e60da
Update src/proxy/ssh/AgentForwarding.ts
fabiovincenzi Dec 18, 2025
3ad0105
fix(ssh): remove password auth and add error for missing SSH identities
fabiovincenzi Dec 18, 2025
4cf238e
chore: merge changes
fabiovincenzi Dec 18, 2025
0d2e4e1
docs(ssh): emphasize .git requirement in repository URLs
fabiovincenzi Dec 18, 2025
07f15ef
Update src/proxy/ssh/server.ts
fabiovincenzi Dec 18, 2025
62c93e2
Merge branch 'ssh-agent-on-pr987' of https://github.com/fabiovincenzi…
fabiovincenzi Dec 18, 2025
5ccd921
fix(ssh): use default dual-stack binding for IPv4/IPv6 support
fabiovincenzi Dec 18, 2025
67c1016
fix(ssh): use default dual-stack binding for IPv4/IPv6 support
fabiovincenzi Dec 18, 2025
c1d92b5
Merge branch 'ssh-agent-on-pr987' of https://github.com/fabiovincenzi…
fabiovincenzi Dec 18, 2025
a648e84
test: fix User constructor calls and SSH agent forwarding mock
fabiovincenzi Dec 18, 2025
acc66d0
fix: correct SSH fingerprint verification and refactor pullRemote tests
fabiovincenzi Dec 19, 2025
bb17668
test: increase memory leak threshold for flaky performance test
fabiovincenzi Dec 19, 2025
5fed1de
refactor(cli): make ssh-key testable - export functions and add main(…
fabiovincenzi Dec 29, 2025
7fd6c48
test(api): add SSH key management endpoints tests
fabiovincenzi Dec 29, 2025
272a1c7
test(db): add SSH key database operations tests
fabiovincenzi Dec 29, 2025
0dfcc75
test(ssh): expand sshHelpers coverage
fabiovincenzi Dec 29, 2025
d9606ae
test(cli): add ssh-key CLI tests
fabiovincenzi Dec 29, 2025
aa42962
test: add gitprotocol tests
fabiovincenzi Dec 29, 2025
5223dc5
test: add tests for ssh agent implementation
fabiovincenzi Dec 29, 2025
27314f8
refactor(ssh): extract SSH helpers and expand pullRemote tests
fabiovincenzi Dec 29, 2025
29647a0
test(ssh): add host key verification tests
fabiovincenzi Dec 29, 2025
239f7a2
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi Dec 29, 2025
3fe3545
refactor: remove import meta
fabiovincenzi Dec 29, 2025
ed4c2a6
Merge branch 'ssh-agent-on-pr987' of https://github.com/fabiovincenzi…
fabiovincenzi Dec 29, 2025
5de929d
test: add test for server.ts
fabiovincenzi Dec 29, 2025
c2cd33e
ci: allow LicenseRef-scancode-dco-1.1 license in dependency review
fabiovincenzi Dec 29, 2025
8bb5282
docs: reorganize SSH documentation for better user experience
fabiovincenzi Jan 5, 2026
b2973db
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi Jan 5, 2026
0b0a020
fix(ui): migrate ssh service from deprecated apiBase to apiConfig
fabiovincenzi Jan 5, 2026
ae77132
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi Jan 14, 2026
74d2bc9
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi Jan 16, 2026
daf5646
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi Jan 20, 2026
74c109e
refactor: make Proxy.stop() await all server shutdowns in parallel
fabiovincenzi Feb 4, 2026
aee9788
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi Feb 4, 2026
ad24af3
fix(ssh): use authenticated user identity from transport layer in par…
fabiovincenzi Feb 25, 2026
a56700f
Merge remote-tracking branch 'upstream/main' into ssh-agent-on-pr987
fabiovincenzi Feb 25, 2026
be7759a
fix(pullRemote): restore concurrent request check and directory clean…
fabiovincenzi Feb 25, 2026
c4f36b7
fix(ssh): add proper TypeScript types to SSH key route params
fabiovincenzi Feb 25, 2026
79b6f7c
fix(ssh): use path.join in test assertions for cross-platform path co…
fabiovincenzi Feb 25, 2026
363e3e1
chore: merge upstream main
fabiovincenzi Mar 2, 2026
f3b9e4e
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi Mar 4, 2026
2ee4f68
chore: merge upstream main
fabiovincenzi Mar 11, 2026
c3bd14e
Merge branch 'ssh-agent-on-pr987' of https://github.com/fabiovincenzi…
fabiovincenzi Mar 11, 2026
5e2d0a9
fix: do not overwrite publicKeys on updateUser
fabiovincenzi Mar 11, 2026
53a3f3a
Merge remote-tracking branch 'upstream/main' into ssh-agent-on-pr987
fabiovincenzi Apr 22, 2026
6056c34
fix(security): validate req.body is a Buffer before parsing pkt-lines
fabiovincenzi Apr 22, 2026
fac846d
fix(security): add typeof/isArray guards to satisfy CodeQL type-confu…
fabiovincenzi Apr 22, 2026
2452a1e
fix(security): prevent shell injection in ssh-keyscan host verification
fabiovincenzi Apr 22, 2026
ccf8b63
refactor(ssh): centralize ssh2 internal API access with version guards
fabiovincenzi Apr 22, 2026
d9fffe3
chore: run format
fabiovincenzi Apr 22, 2026
b6610d3
fix(ssh): gate verbose SSH debug logging behind ssh.debug config flag
fabiovincenzi Apr 24, 2026
c2d645a
docs(ssh): remove redundant admin UI prereq from SSH setup guide
fabiovincenzi Apr 24, 2026
bfd580a
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi May 4, 2026
b6d7141
fix(tests): mock db module to prevent process.exit in auth route tests
fabiovincenzi May 6, 2026
863fb2e
Merge branch 'ssh-agent-on-pr987' of https://github.com/fabiovincenzi…
fabiovincenzi May 6, 2026
666209c
Merge upstream/main into ssh-agent-on-pr987
fabiovincenzi May 18, 2026
da03c8b
fix: increase memory threshold in performance test
fabiovincenzi May 18, 2026
05ae725
fix: use subarray instead of deprecated slice and remove unused param
fabiovincenzi May 18, 2026
cccd778
fix: lazy-load ssh2 in users route to avoid native module crash on Wi…
fabiovincenzi May 18, 2026
71b1e86
style: fix prettier formatting in users route
fabiovincenzi May 18, 2026
581469c
docs: fix broken ssh links and add mermaid dependency
fabiovincenzi May 18, 2026
6c887e1
fix: use Node.js crypto for SSH test key generation instead of ssh-ke…
fabiovincenzi May 19, 2026
9a2298c
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi May 20, 2026
eee8ed8
Merge remote-tracking branch 'upstream/main' into ssh-agent-on-pr987
fabiovincenzi May 27, 2026
222994f
Merge branch 'main' into ssh-agent-on-pr987
fabiovincenzi May 27, 2026
fcdbec6
ci: add contents:read permission for private repo checkout
fabiovincenzi May 29, 2026
d04bd6e
Revert "ci: add contents:read permission for private repo checkout"
fabiovincenzi May 29, 2026
abc6218
fix: race condition bug on concurrent SSH connections
jescalada May 29, 2026
aecbbb3
fix(test): mock execFileSync in pullRemote test to fix Windows CI
fabiovincenzi May 29, 2026
f22cc43
Merge branch 'ssh-agent-on-pr987' of https://github.com/fabiovincenzi…
fabiovincenzi May 29, 2026
7430c9b
fix: no-op push handling in SSH
jescalada May 30, 2026
cdf3401
Merge branch 'ssh-agent-on-pr987' of https://github.com/fabiovincenzi…
jescalada May 30, 2026
767bbc2
chore: improve error message for unreferenced commits
jescalada Jun 4, 2026
add4487
Merge branch 'main' into ssh-agent-on-pr987
jescalada Jun 4, 2026
cb9c53f
fix: update checkHiddenCommit test error messages
jescalada Jun 4, 2026
0531110
docs: remove root ARCHITECTURE.md in favor of website/docs/architectu…
fabiovincenzi Jun 5, 2026
cf762a7
chore: remove .nvmrc
fabiovincenzi Jun 5, 2026
525b75c
fix(config): restore QuickType validation
fabiovincenzi Jun 7, 2026
5d592a2
docs: replace GitHub references with upstream
fabiovincenzi Jun 7, 2026
e988806
docs: replace GitHub references with upstream
fabiovincenzi Jun 7, 2026
61e90df
refactor: remove dead sshUser field from Action
fabiovincenzi Jun 7, 2026
52ec262
Merge branch 'ssh-agent-on-pr987' of https://github.com/fabiovincenzi…
fabiovincenzi Jun 7, 2026
7121a0c
refactor: move known host fingerprints from hardcoded constants to pr…
fabiovincenzi Jun 8, 2026
5a4b142
docs: integrate SSH setup guide into user manual and sidebar
fabiovincenzi Jun 8, 2026
f018369
Merge upstream/main into ssh-agent-on-pr987
fabiovincenzi Jun 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
with:
comment-summary-in-pr: always
fail-on-severity: high
allow-licenses: MIT, MIT-0, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, OFL-1.1, Zlib, BlueOak-1.0.0, Ubuntu-font-1.0, Artistic-2.0, Python-2.0, EPL-2.0
allow-licenses: MIT, MIT-0, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, OFL-1.1, Zlib, BlueOak-1.0.0, LicenseRef-scancode-dco-1.1, Ubuntu-font-1.0, Artistic-2.0, Python-2.0, EPL-2.0
fail-on-scopes: development, runtime
allow-dependencies-licenses: 'pkg:npm/caniuse-lite, pkg:npm/path-is-inside, pkg:npm/unicode-match-property-value-ecmascript, pkg:npm/unicode-property-aliases-ecmascript, pkg:npm/uri-js'
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,14 @@ website/.docusaurus
# Jetbrains IDE
.idea

# Test SSH keys (generated during tests)
test/keys/
test/.ssh/

# VS COde IDE
.vscode/settings.json

# Generated from testing
/test/fixtures/test-package/package-lock.json
.ssh/

51 changes: 49 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

## What is GitProxy

GitProxy is an application that stands between developers and a Git remote endpoint (e.g., `github.com`). It applies rules and workflows (configurable as `plugins`) to all outgoing `git push` operations to ensure they are compliant.
GitProxy is an application that stands between developers and a Git remote endpoint (e.g., `github.com`). It applies rules and workflows (configurable as `plugins`) to all outgoing `git push` operations to ensure they are compliant. GitProxy supports both **HTTP/HTTPS** and **SSH** protocols with identical security scanning and validation.

The main goal of GitProxy is to marry the defacto standard Open Source developer experience (git-based workflow of branching out, submitting changes and merging back) with security and legal requirements that firms have to comply with, when operating in highly regulated industries like financial services.

Expand Down Expand Up @@ -68,8 +68,9 @@ $ npx -- @finos/git-proxy

Clone a repository, set the remote to the GitProxy URL and push your changes:

### Using HTTPS

```bash
# Only HTTPS cloning is supported at the moment, see https://github.com/finos/git-proxy/issues/27.
$ git clone https://github.com/octocat/Hello-World.git && cd Hello-World
# The below command is using the GitHub official CLI to fork the repo that is cloned.
# You can also fork on the GitHub UI. For usage details on the CLI, see https://github.com/cli/cli
Expand All @@ -81,8 +82,54 @@ $ git remote add proxy http://localhost:8000/yourGithubUser/Hello-World.git
$ git push proxy $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
```

### Using SSH

```bash
$ git clone https://github.com/octocat/Hello-World.git && cd Hello-World
$ gh repo fork
✓ Created fork yourGithubUser/Hello-World
...
# Configure Git remote for SSH proxy
$ git remote add proxy ssh://git@localhost:2222/github.com/yourGithubUser/Hello-World.git
# Enable SSH agent forwarding (required)
$ git config core.sshCommand "ssh -A"
# Push through the proxy
$ git push proxy $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
```

📖 **Full SSH setup guide**: [docs/SSH_SETUP.md](docs/SSH_SETUP.md)

---

Using the default configuration, GitProxy intercepts the push and _blocks_ it. To enable code pushing to your fork via GitProxy, add your repository URL into the GitProxy config file (`proxy.config.json`). For more information, refer to [our documentation](https://git-proxy.finos.org).

## Protocol Support

GitProxy supports both **HTTP/HTTPS** and **SSH** protocols with identical security features:

### HTTP/HTTPS Support

- ✅ Basic authentication and JWT tokens
- ✅ Pack data extraction via middleware
- ✅ Full security scanning and validation
- ✅ Manual and auto-approval workflows

### SSH Support

- ✅ SSH key-based authentication
- ✅ SSH agent forwarding (uses client's SSH keys securely)
- ✅ Pack data capture from SSH streams
- ✅ Same 16-processor security chain as HTTPS
- ✅ Complete feature parity with HTTPS

Both protocols provide the same level of security scanning, including:

- Secret detection (gitleaks)
- Commit message and author validation
- Hidden commit detection
- Pre-receive hooks
- Comprehensive audit logging

## Documentation

For detailed step-by-step instructions for how to install, deploy & configure GitProxy and
Expand Down
66 changes: 63 additions & 3 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"properties": {
"proxyUrl": {
"type": "string",
"description": "Deprecated: Used in early versions of git proxy to configure the remote host that traffic is proxied to. In later versions, the repository URL is used to determine the domain proxied, allowing multiple hosts to be proxied by one instance.",
"description": "Deprecated: Used in early versions of GitProxy to configure the remote host that traffic is proxied to. In later versions, the repository URL is used to determine the domain proxied, allowing multiple hosts to be proxied by one instance.",
"deprecated": true
},
"cookieSecret": { "type": "string" },
Expand Down Expand Up @@ -240,7 +240,7 @@
"required": []
},
"domains": {
"description": "Provide custom URLs for the git proxy interfaces in case it cannot determine its own URL",
"description": "Provide custom URLs for the GitProxy interfaces in case it cannot determine its own URL",
"type": "object",
"properties": {
"proxy": {
Expand Down Expand Up @@ -311,6 +311,17 @@
"$ref": "#/definitions/authorisedRepo"
}
},
"limits": {
"description": "Configuration for various limits",
"type": "object",
"properties": {
"maxPackSizeBytes": {
"type": "number",
"description": "Maximum size of a pack file in bytes (default 1GB)"
}
},
"additionalProperties": false
},
Comment thread
fabiovincenzi marked this conversation as resolved.
"sink": {
"description": "List of database sources. The first source in the configuration with enabled=true will be used.",
"type": "array",
Expand Down Expand Up @@ -388,6 +399,55 @@
}
}
},
"ssh": {
"description": "SSH proxy server configuration. The proxy uses SSH agent forwarding to authenticate with remote Git servers (GitHub, GitLab, etc.) using the client's SSH keys. The proxy's own host key is auto-generated and only used to identify the proxy to connecting clients.",
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable SSH proxy server. When enabled, clients can connect via SSH and the proxy will forward their SSH agent to authenticate with remote Git servers."
},
"port": {
"type": "number",
"description": "Port for SSH proxy server to listen on. Clients connect to this port instead of directly to GitHub/GitLab.",
"default": 2222
},
"agentForwardingErrorMessage": {
"type": "string",
"description": "Custom error message shown when SSH agent forwarding is not enabled or no keys are loaded in the client's SSH agent. If not specified, a default message with git config commands will be shown. This allows organizations to customize instructions based on their security policies."
},
"debug": {
"type": "boolean",
"description": "Enable verbose SSH protocol debug logging (both for the local SSH server and for outbound connections to remote Git servers). Emits one log line per SSH packet, so leave disabled in production.",
"default": false
},
"hostKey": {
"type": "object",
"description": "Custom SSH host key paths. If not specified, a host key is auto-generated at .ssh/proxy_host_key.",
"properties": {
"privateKeyPath": {
"type": "string",
"description": "Path to the private key file (e.g. /etc/git-proxy/host_key)"
},
"publicKeyPath": {
"type": "string",
"description": "Path to the public key file (e.g. /etc/git-proxy/host_key.pub)"
}
},
"required": ["privateKeyPath", "publicKeyPath"],
"additionalProperties": false
},
"knownHosts": {
"type": "object",
"description": "SSH host key fingerprints for verifying remote Git servers, merged with built-in defaults for github.com and gitlab.com.",
"additionalProperties": {
"type": "string"
}
}
},
"required": ["enabled"],
"additionalProperties": false
},
"upstreamProxy": {
"description": "Configuration for routing outbound requests to upstream Git hosts via an HTTP(S) proxy.",
"type": "object",
Expand Down Expand Up @@ -494,7 +554,7 @@
},
"userGroup": {
"type": "string",
"description": "Group that indicates that a user should be able to login to the Git Proxy UI and can work as a reviewer"
"description": "Group that indicates that a user should be able to login to the GitProxy UI and can work as a reviewer"
},
"domain": { "type": "string", "description": "Active Directory domain" },
"adConfig": {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/login.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Login page', () => {
cy.visit('/login');
});

it('should have git proxy logo', () => {
it('should have GitProxy logo', () => {
cy.get('[data-test="git-proxy-logo"]').should('exist');
});

Expand Down
78 changes: 76 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
"react-html-parser": "^2.0.2",
"react-router-dom": "6.30.3",
"simple-git": "^3.30.0",
"ssh2": "~1.17.0",
"uuid": "^13.0.0",
"validator": "^13.15.26",
"yargs": "^17.7.2"
Expand All @@ -173,6 +174,7 @@
"@types/passport-local": "^1.0.38",
"@types/react-dom": "^17.0.26",
"@types/react-html-parser": "^2.0.7",
"@types/ssh2": "^1.15.5",
"@types/supertest": "^6.0.3",
"@types/validator": "^13.15.10",
"@types/yargs": "^17.0.35",
Expand Down
Loading
Loading