Skip to content

Commit cccface

Browse files
committed
Merge branch 'main' into vitest-4-bump-and-test-fixes
2 parents 96637f7 + fc23d58 commit cccface

78 files changed

Lines changed: 10900 additions & 242 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
run: npm run test:integration
7373

7474
- name: Upload test coverage report
75-
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
75+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
7676
with:
7777
files: ./coverage/lcov.info,./coverage-cli/lcov.info
7878
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ jobs:
2121
with:
2222
comment-summary-in-pr: always
2323
fail-on-severity: high
24-
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
24+
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
2525
fail-on-scopes: development, runtime
2626
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'

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
3131

3232
- name: Set up Docker Buildx
33-
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd
33+
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5
3434
with:
3535
install: true
3636

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,14 @@ website/.docusaurus
271271
# Jetbrains IDE
272272
.idea
273273

274+
# Test SSH keys (generated during tests)
275+
test/keys/
276+
test/.ssh/
277+
274278
# VS COde IDE
275279
.vscode/settings.json
276280

277281
# Generated from testing
278282
/test/fixtures/test-package/package-lock.json
283+
.ssh/
284+

README.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
## What is GitProxy
4242

43-
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.
43+
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.
4444

4545
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.
4646

@@ -68,8 +68,9 @@ $ npx -- @finos/git-proxy
6868

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

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

85+
### Using SSH
86+
87+
```bash
88+
$ git clone https://github.com/octocat/Hello-World.git && cd Hello-World
89+
$ gh repo fork
90+
✓ Created fork yourGithubUser/Hello-World
91+
...
92+
# Configure Git remote for SSH proxy
93+
$ git remote add proxy ssh://git@localhost:2222/github.com/yourGithubUser/Hello-World.git
94+
# Enable SSH agent forwarding (required)
95+
$ git config core.sshCommand "ssh -A"
96+
# Push through the proxy
97+
$ git push proxy $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
98+
```
99+
100+
📖 **Full SSH setup guide**: [docs/SSH_SETUP.md](docs/SSH_SETUP.md)
101+
102+
---
103+
84104
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).
85105

106+
## Protocol Support
107+
108+
GitProxy supports both **HTTP/HTTPS** and **SSH** protocols with identical security features:
109+
110+
### HTTP/HTTPS Support
111+
112+
- ✅ Basic authentication and JWT tokens
113+
- ✅ Pack data extraction via middleware
114+
- ✅ Full security scanning and validation
115+
- ✅ Manual and auto-approval workflows
116+
117+
### SSH Support
118+
119+
- ✅ SSH key-based authentication
120+
- ✅ SSH agent forwarding (uses client's SSH keys securely)
121+
- ✅ Pack data capture from SSH streams
122+
- ✅ Same 16-processor security chain as HTTPS
123+
- ✅ Complete feature parity with HTTPS
124+
125+
Both protocols provide the same level of security scanning, including:
126+
127+
- Secret detection (gitleaks)
128+
- Commit message and author validation
129+
- Hidden commit detection
130+
- Pre-receive hooks
131+
- Comprehensive audit logging
132+
86133
## Documentation
87134

88135
For detailed step-by-step instructions for how to install, deploy & configure GitProxy and

config.schema.json

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"properties": {
88
"proxyUrl": {
99
"type": "string",
10-
"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.",
10+
"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.",
1111
"deprecated": true
1212
},
1313
"cookieSecret": { "type": "string" },
@@ -240,7 +240,7 @@
240240
"required": []
241241
},
242242
"domains": {
243-
"description": "Provide custom URLs for the git proxy interfaces in case it cannot determine its own URL",
243+
"description": "Provide custom URLs for the GitProxy interfaces in case it cannot determine its own URL",
244244
"type": "object",
245245
"properties": {
246246
"proxy": {
@@ -311,6 +311,17 @@
311311
"$ref": "#/definitions/authorisedRepo"
312312
}
313313
},
314+
"limits": {
315+
"description": "Configuration for various limits",
316+
"type": "object",
317+
"properties": {
318+
"maxPackSizeBytes": {
319+
"type": "number",
320+
"description": "Maximum size of a pack file in bytes (default 1GB)"
321+
}
322+
},
323+
"additionalProperties": false
324+
},
314325
"sink": {
315326
"description": "List of database sources. The first source in the configuration with enabled=true will be used.",
316327
"type": "array",
@@ -388,6 +399,55 @@
388399
}
389400
}
390401
},
402+
"ssh": {
403+
"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.",
404+
"type": "object",
405+
"properties": {
406+
"enabled": {
407+
"type": "boolean",
408+
"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."
409+
},
410+
"port": {
411+
"type": "number",
412+
"description": "Port for SSH proxy server to listen on. Clients connect to this port instead of directly to GitHub/GitLab.",
413+
"default": 2222
414+
},
415+
"agentForwardingErrorMessage": {
416+
"type": "string",
417+
"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."
418+
},
419+
"debug": {
420+
"type": "boolean",
421+
"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.",
422+
"default": false
423+
},
424+
"hostKey": {
425+
"type": "object",
426+
"description": "Custom SSH host key paths. If not specified, a host key is auto-generated at .ssh/proxy_host_key.",
427+
"properties": {
428+
"privateKeyPath": {
429+
"type": "string",
430+
"description": "Path to the private key file (e.g. /etc/git-proxy/host_key)"
431+
},
432+
"publicKeyPath": {
433+
"type": "string",
434+
"description": "Path to the public key file (e.g. /etc/git-proxy/host_key.pub)"
435+
}
436+
},
437+
"required": ["privateKeyPath", "publicKeyPath"],
438+
"additionalProperties": false
439+
},
440+
"knownHosts": {
441+
"type": "object",
442+
"description": "SSH host key fingerprints for verifying remote Git servers, merged with built-in defaults for github.com and gitlab.com.",
443+
"additionalProperties": {
444+
"type": "string"
445+
}
446+
}
447+
},
448+
"required": ["enabled"],
449+
"additionalProperties": false
450+
},
391451
"upstreamProxy": {
392452
"description": "Configuration for routing outbound requests to upstream Git hosts via an HTTP(S) proxy.",
393453
"type": "object",
@@ -494,7 +554,7 @@
494554
},
495555
"userGroup": {
496556
"type": "string",
497-
"description": "Group that indicates that a user should be able to login to the Git Proxy UI and can work as a reviewer"
557+
"description": "Group that indicates that a user should be able to login to the GitProxy UI and can work as a reviewer"
498558
},
499559
"domain": { "type": "string", "description": "Active Directory domain" },
500560
"adConfig": {

cypress/e2e/login.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('Login page', () => {
1919
cy.visit('/login');
2020
});
2121

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

0 commit comments

Comments
 (0)