# Security Policy

rtx is a convenient tool to manage developer tools, however its model is also open to potential risks. The following
are major areas of rtx and the security considerations currently being made and what needs to be made in the future.

Please open a ticket or send me an email if you have thoughts on how rtx can be made more secure.

## Core CLI Security

Development of the "core CLI" is done on jdx/rtx which only a single developer (me, @jdx) has access to.
Other contributors may only submit contributions via public Pull Requests. Reducing the number
of developers with access down to 1 minimizes the chance of keys being leaked.

This does create a [bus factor](https://en.wikipedia.org/wiki/Bus_factor) problem. If I suddenly died one day
or otherwise wasn't able to continue development at all there are some successors listed in my GitHub account
that can take over my account if need be.

The dependencies in the core CLI are a security vector. I've tried to be judicious about what dependencies make it into
the project. I only select dependencies with broad usage across the Rust community where possible.
I'm open to PRs or suggestions on reducing dependency count even at the cost of functionality because it will make
rtx more secure.

## rtx.pub

rtx.pub is the asset host for rtx. It's used to host precompiled rtx CLI binaries, and hosts a "[VERSION](https://rtx.pub/VERSION)"
which rtx uses to occasionally check for a new version being released. Currently this is hosted with a mix
of 3 different vendors for CDN, assets, and domain registration. This will be brought down to a single vendor
to reduce the surface area for security reasons.

## rtx plugins

Plugins are by far the biggest source of potential problems and where the most work still needs to be made.

There are 3 types of plugins:

* [core](https://github.com/jdx/rtx/issues/236) - plugins that are hardcoded into the CLI. 
  These are official plugins for the most common languages written in Rust.
* community - plugins in the [rtx-plugins](https://github.com/rtx-plugins) GitHub Org. For now these will
only have @jdx as the sole contributor, however this may change in the future for particular plugins with
dedicated owners/collaborators. If you'd like your plugin to be moved here, ask me about it.
* external - plugins owned by other parties, these include plugins in the shorthand registry. These are no more
secure than installing any random tool from the internet.

Just because a plugin is inside of the shorthand registry (so you can run `rtx install foo@`, does not mean
I vouch for it. I have no idea who almost anyone that builds those plugins are. If it's coming from the rtx-plugins
GitHub org, you can have more trust in it. (See the owners with `rtx plugins ls-remote --urls`).

Over time we should be able to move more plugins into being fully maintained by rtx. I plan to add an
`RTX_PARANOID=1` env var that, when set, will make changes to make rtx behave as securely as possible
(e.g.: only using core plugins, only allowing plugins that use GPG verification of assets).

## Supported Versions

The only supported version is the most recent one.

## Reporting a Vulnerability

Send an email to security@<RTX_DOMAIN_IN_README>.pub

If you want, you may encrypt the message with GPG:

<details>
  <summary>@jdx's public key</summary>
  
  ```
-----BEGIN PGP PUBLIC KEY BLOCK-----


1wxfuzN2+ao=
=/CHf
-----END PGP PUBLIC KEY BLOCK-----
  ```
</details>
