Skip to content

v2.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Nov 11:45
f1c4ab7

GitProxy 2.4 includes major enhancements such as:

  • Event handlers #1519
  • Expanded plugin capabilities
    • Pull data extraction to allow supply chain scanning on git pull #1744
    • Support for timeouts and reconnection when waiting for external services to complete #1907
  • git push caching that speeds up push times by 10-30x #1246

Event Handlers

Event handlers let external code observe GitProxy's lifecycle without sitting in the request path. Whenever a push or pull reaches a meaningful point in its lifecycle - it started, completed, was blocked for review, errored, or was denied - GitProxy dispatches an event. Handlers react to those events to emit metrics, send notifications, or write to an external audit log.

See Event Handlers for more details.

New plugin features

Pull data extraction

GitProxy's plugin system was recently revamped to allow inserting plugins anywhere in the chain via Phases. Now, it's also possible to extract pull data from a git pull request and analyze the contents of the commits being pulled. Pull data extraction is an optional feature, demonstrated in this plugin sample. This can be extended to perform actual supply chain scans, CI workflow scans and more.

External service integration + Timeout and reconnection support

GitProxy can now hold a push while waiting for an external service, such as a supply chain scanner or a risk assessment tool to complete. These tools provide verdicts that can be used to approve or reject a git operation. Plugins now support timeouts (default: 5 minutes) and will resume timed-out pushes by re-fetching the verdict from the external service.

We provide a sample on how to configure an external service: A mock data loss prevention tool that runs on every git push and "spends" a few seconds or a few minutes processing the push before giving its verdict.

See How to integrate external services for more details.

git push performance improvements via caching

The bare clone of the repository can optionally be cached instead of deleted at the end of the chain, resulting in massive speed improvements (10-30x faster) when pushing to large repositories.

The repository is stored in a mirror at <cacheDir>/<host>__<project>__<repo>-<sha256>. The working copy of the repo comes from a local git clone of the mirror into the usual .remote/<hash>/folder, which is later removed by clearBareClone. Repository mirrors are shared between users, so the work on each mirror gets serialised.

To prevent bloating the storage, an LRU cache is set to evict repositories that exceed the configured maxSizeGB value or the maxRepositories number (which can be configured in proxy.config.json. Locked repositories are never evicted.

Security concerns

  • Every push authenticates against the upstream with its own credentials, so the cache never gives access to a repository the client could not clone.
  • HTTPS credentials are passed through GIT_CONFIG_* environment variables as an http.<origin>.extraHeader, never on the command line, in a URL or in the mirror's config. credential.helper is reset and GIT_TERMINAL_PROMPT=0.
  • Git runs isolated from the host's configuration (GIT_CONFIG_NOSYSTEM=1, empty HOME), so /etc/gitconfig, ~/.gitconfig and ~/.netrc never apply to a client's clone.

See the cache implementation PR, or the [Push Actions docs(https://github.com/finos/git-proxy/blob/2ec7810731cd3f5453ce0f2df0a413067e933174/src/proxy/processors/push-action/README.md) for more details.

What's Changed

🚀 Features

  • feat: implement hybrid cache architecture @fabiovincenzi (#1246)
  • feat(event-handlers): introduce event handler system for GitProxy lifecycle events @Andreybest (#1519)
  • feat: support timeouts and reconnection when waiting for external services @jescalada (#1907)
  • feat: add plugin sample that extracts and decodes pull data @jescalada (#1744)

🐛 Bug Fixes

🧰 Maintenance

  • chore: bump git-proxy to 2.4.0 @github-actions[bot] (#1918)
  • chore(deps): bump the npm-non-major group across 1 directory with 14 updates @dependabot[bot] (#1916)
  • chore(deps-dev): bump asciinema-player from 3.18.0 to 3.18.1 in /website in the website-non-major group across 1 directory @dependabot[bot] (#1908)
  • ci: publish git-proxy-cli to npm @jescalada (#1654)
  • chore(deps-dev): bump the website-non-major group across 1 directory with 3 updates @dependabot[bot] (#1901)
  • perf: cache repository activity summaries @dcoric (#1801)
  • feat: add plugin sample that extracts and decodes pull data @jescalada (#1744)
  • chore: bump various dev dependencies and fix conflicts @jescalada (#1897)
  • chore(deps-dev): bump the vite group across 1 directory with 2 updates @dependabot[bot] (#1881)
  • chore(deps): bump the github-actions group across 1 directory with 8 updates @dependabot[bot] (#1889)
  • chore(deps): bump the npm-non-major group across 1 directory with 14 updates @dependabot[bot] (#1890)
  • chore(deps-dev): bump follow-redirects from 1.16.1 to 1.16.3 in /website in the website-security group across 1 directory @dependabot[bot] (#1888)
  • perf: reduce duplicate push audit storage @dcoric (#1795)
  • test: extend Cypress coverage for dashboard pages @dcoric (#1513)
  • chore: update website demo for OSFF @jescalada (#1877)
  • chore(deps-dev): bump the website-react group across 1 directory with 2 updates @dependabot[bot] (#1837)
  • chore(deps-dev): bump the website-non-major group across 1 directory with 2 updates @dependabot[bot] (#1872)
  • chore(deps): bump the github-actions group across 1 directory with 7 updates @dependabot[bot] (#1865)
  • chore(deps): bump the react group across 1 directory with 3 updates @dependabot[bot] (#1838)
  • chore: update LICENSE.spdx to SPDX-2.3 @jescalada (#1864)
  • chore(deps): bump systeminformation from 5.33.7 to 5.33.19 in the npm-security group across 1 directory @dependabot[bot] (#1873)
  • ci: drop mongo 8.0 from CI matrix @jescalada (#1876)
  • chore(deps): bump qs from 6.16.0 to 6.17.0 in /website in the website-security group across 1 directory @dependabot[bot] (#1870)
  • chore: remove experimental license inventory @jescalada (#1850)
  • ci: add merge_group to workflows @jescalada (#1863)
  • chore(deps-dev): bump @commitlint/cli from 19.8.1 to 21.2.4 @dependabot[bot] (#1845)
  • chore(deps): bump the experimental-non-major group across 2 directories with 3 updates @dependabot[bot] (#1857)
  • chore(deps): bump the experimental-security group across 2 directories with 3 updates @dependabot[bot] (#1860)
  • chore(deps): bump the website-security group across 1 directory with 4 updates @dependabot[bot] (#1861)
  • chore(deps): bump the npm-non-major group across 1 directory with 8 updates @dependabot[bot] (#1858)
  • chore(deps): bump the npm-security group across 1 directory with 4 updates @dependabot[bot] (#1862)
  • chore(deps): bump the github-actions group across 1 directory with 11 updates @dependabot[bot] (#1829)

Full Changelog: v2.3.1...v2.4.0