Sign inSign up

satriller/epochgate

By satriller

Updated 2 months ago

Reverse proxy gatekeeper for npm - blocks young packages to prevent supply-chain attacks

Image
Networking
Security
0

213

satriller/epochgate repository overview

EpochGate

A reverse proxy gatekeeper for Nexus npm repositories that enforces a minimum package age policy. Packages younger than a configurable threshold are blocked, preventing supply-chain attacks via freshly published malicious packages.

Quick Start

docker run -d \
  -p 8080:8080 \
  -e NEXUS_URL=http://nexus:8081/repository/npm-proxy/ \
  -e MIN_AGE_DAYS=7 \
  satriller/epochgate

Configuration

VariableDefaultDescription
LISTEN_PORT:8080Address and port to listen on
NEXUS_URLhttp://localhost:8081/repository/npm-proxy/Nexus npm proxy repository URL
NPM_REGISTRYhttps://registry.npmjs.org/Upstream npm registry for metadata
MIN_AGE_DAYS7Minimum package age in days before allowing

How It Works

npm client → EpochGate → Nexus Registry → Upstream npm
                  ↓
          Checks package age
          via registry.npmjs.org
  1. Client requests a package through EpochGate
  2. EpochGate checks the package's last modified timestamp from the npm registry
  3. If the package is younger than MIN_AGE_DAYS, the request is blocked with 403 Forbidden
  4. If the package passes, it is proxied to your Nexus repository
  5. Results are cached in-memory for fast repeated requests

Tag summary

Content type

Image

Digest

sha256:b23da1e84

Size

2.9 MB

Last updated

2 months ago

docker pull satriller/epochgate