Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the credential proxy #6937

Merged
merged 1 commit into from
Mar 30, 2023
Merged
Changes from all commits
Commits
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
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,39 @@ This is a "meta" gem, that simply depends on all the others. If you want to
automatically include support for all languages, you can just include this gem
and you'll get all you need.

### Private Registry Credential Management

For many ecosystems, Dependabot Core supports private registries. Sometimes this happens by passing the private registry
credentials directly to the native package managers (`npm`, `pip`, `bundler`, etc), other times it happens within the
Dependabot Core Ruby code.

```mermaid
sequenceDiagram
Private Registry Credentials->>Dependabot Core:<br />
Dependabot Core->>Native Package Managers:<br />
Native Package Managers->>Package Registries:<br />
Dependabot Core->>Package Registries:<br />
```

While simple and straightforward, this is a security risk for ecosystems that allow running untrusted code within their
manifest files. For example `setup.py` and `.gemspec` allow running native Python and Ruby code. If a package in the
dependency tree gets hacked, an attacker could push a malicious manifest that forces the native package manager to
expose the creds.

To guard against this, for the Dependabot service that Github runs, we wrap Dependabot Core with a credential proxy so
those private registry secrets are never exposed to Dependabot Core.

```mermaid
sequenceDiagram
Dependabot Core->>Credentials Proxy: All requests are unauthenticated
Credentials Proxy->>Package Registries: Creds are injected by the Proxy
Note left of Dependabot Core: The Dependabot Service<br /> that GitHub Runs
Package Registries->>Credentials Proxy: Creds are stripped by the Proxy
Credentials Proxy->>Dependabot Core: Dependabot Core never sees private registry credentials
```

This also means if Dependabot Core ever has a security vulnerability, those creds are still not at risk of being exposed.

## Profiling

You can profile a dry-run by passing the `--profile` flag when running it, or
Expand Down