|
| 1 | +# Security Policy |
| 2 | + |
| 3 | +## Security Maintainer |
| 4 | + |
| 5 | +The `cmd2` project has a single named Security Maintainer: |
| 6 | + |
| 7 | +- **Todd Leonhardt** ([@tleonhardt](https://github.com/tleonhardt)) |
| 8 | + |
| 9 | +The Security Maintainer triages vulnerability reports, coordinates fixes, publishes security |
| 10 | +advisories, and requests CVE identifiers when appropriate. Within the |
| 11 | +[python-cmd2](https://github.com/python-cmd2) GitHub organization, the Security Maintainer holds the |
| 12 | +**Security manager** organization role. |
| 13 | + |
| 14 | +## Supported Versions |
| 15 | + |
| 16 | +All `cmd2` releases are tagged and published from the `main` branch, and there are no long-lived |
| 17 | +maintenance branches. Security fixes ship in a new release of the latest version. |
| 18 | + |
| 19 | +| Version | Supported | |
| 20 | +| ------------------ | ------------------ | |
| 21 | +| Latest 4.x release | :white_check_mark: | |
| 22 | +| Older releases | :x: | |
| 23 | + |
| 24 | +If you are using an older release, please upgrade to the latest version from |
| 25 | +[PyPI](https://pypi.org/project/cmd2/). |
| 26 | + |
| 27 | +## Reporting a Vulnerability |
| 28 | + |
| 29 | +**Please do not report security vulnerabilities through public GitHub issues, pull requests, or |
| 30 | +discussions.** |
| 31 | + |
| 32 | +Report vulnerabilities privately using GitHub's private vulnerability reporting: |
| 33 | + |
| 34 | +1. Go to the [Security tab](https://github.com/python-cmd2/cmd2/security) of this repository. |
| 35 | +2. Click **Report a vulnerability**, or go directly to the |
| 36 | + [new advisory form](https://github.com/python-cmd2/cmd2/security/advisories/new). |
| 37 | + |
| 38 | +Please include as much of the following as you can: |
| 39 | + |
| 40 | +- The `cmd2` version, Python version, and operating system |
| 41 | +- A description of the vulnerability and its impact |
| 42 | +- Step-by-step instructions or a minimal proof of concept to reproduce it |
| 43 | +- Any known workarounds or suggested fixes |
| 44 | + |
| 45 | +## What to Expect |
| 46 | + |
| 47 | +`cmd2` is maintained by volunteers, so these are good-faith targets rather than guarantees: |
| 48 | + |
| 49 | +- **Acknowledgement** of your report within 7 days |
| 50 | +- **Initial assessment** within 14 days, including whether the report is accepted as a vulnerability |
| 51 | + and its severity |
| 52 | +- **Status updates** as a fix progresses |
| 53 | + |
| 54 | +Once a fix is ready, we will release a patched version, publish a |
| 55 | +[GitHub Security Advisory](https://github.com/python-cmd2/cmd2/security/advisories), and request a |
| 56 | +CVE if appropriate. Reporters are credited in the advisory unless they prefer to remain anonymous. |
| 57 | +Please keep the vulnerability confidential until the advisory is published. |
| 58 | + |
| 59 | +## Scope |
| 60 | + |
| 61 | +`cmd2` is a framework for building interactive command-line applications. Several of its builtin |
| 62 | +features intentionally give the user of a `cmd2` application access to the operating system or to a |
| 63 | +Python interpreter. Behavior of these features that is working as designed is not a vulnerability in |
| 64 | +`cmd2`: |
| 65 | + |
| 66 | +- The `shell` command (and its `!` shortcut) runs operating system commands. |
| 67 | +- The `edit` command launches an external editor program. |
| 68 | +- The `run_script` command (and its `@` shortcut) runs `cmd2` command scripts. |
| 69 | +- The `run_pyscript` command, and the optional `py` and `ipy` commands, run Python code. |
| 70 | +- Output redirection (`>`, `>>`) and pipes (`|`) write to files and run shell commands. |
| 71 | + |
| 72 | +Developers who expose a `cmd2` application to untrusted users are responsible for removing or |
| 73 | +disabling the features they do not want to offer. See |
| 74 | +[Remove Builtin Commands](https://cmd2.readthedocs.io/en/latest/features/builtin_commands/#remove-builtin-commands), |
| 75 | +[Disabling Commands](https://cmd2.readthedocs.io/en/latest/features/disable_commands/), and |
| 76 | +[Disabling Redirection](https://cmd2.readthedocs.io/en/latest/features/redirection/#disabling-redirection). |
| 77 | + |
| 78 | +A flaw in how these safeguards work is in scope. Examples include a way to perform redirection when |
| 79 | +`allow_redirection` is `False`, or a way to run a command that was removed or disabled. |
0 commit comments