Skip to content

Commit

Permalink
Document the credential proxy
Browse files Browse the repository at this point in the history
Add a section to the Readme documenting the credential proxy.

This provides three benefits:
1. Users are reassured that GitHub keeps their secrets safe.
2. Security researchers who manage to hack `dependabot-core` aren't surprised when we tell them that doesn't mean they hacked the entire Dependabot Service at GitHub.
3. Clarifies why adding support for private registries to `dependabot-core` isn't enough for those registries to be supported by the Dependabot service that GitHub runs. We still have to plumb those auth schemes into the proxy.

Perhaps down the road we may be able to open source the proxy so others can benefit from the increased security, but that's a much larger conversation that we're not quite ready to have.
  • Loading branch information
jeffwidman committed Mar 30, 2023
1 parent d2e1968 commit 2315c72
Showing 1 changed file with 33 additions and 0 deletions.
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

0 comments on commit 2315c72

Please sign in to comment.