|
1 | 1 | # 🔒 Security Policy |
2 | 2 |
|
3 | | -## Supported Versions |
4 | | - |
5 | | -| Version | Supported | |
6 | | -|---------|--------------------| |
7 | | -| 0.2.x | ✅ Active support | |
8 | | -| 0.1.x | ❌ End of life | |
9 | | - |
10 | | -Security updates are provided for the **latest stable release** on the `main` branch only. |
11 | | -Users are encouraged to upgrade to the latest version to receive all security fixes. |
12 | | - |
13 | | ---- |
| 3 | +## Scope |
14 | 4 |
|
15 | | -## 🛡️ Security Best Practices |
| 5 | +QPyth is an open-source quantum software toolkit. Some repository features use DNA-inspired or sequence-themed representations for computational exploration. These features are not biological simulation tools and are not intended for laboratory, medical, diagnostic, therapeutic, or bioengineering use. |
16 | 6 |
|
17 | | -### What We Do |
18 | | - |
19 | | -- **Dependency scanning**: Automated checks for vulnerable dependencies |
20 | | -- **Code review**: All PRs reviewed for security issues |
21 | | -- **Input validation**: Sanitization of user-provided values |
22 | | -- **Secure defaults**: Safe configurations out of the box |
| 7 | +## Supported Versions |
23 | 8 |
|
24 | | -### Security Testing |
| 9 | +Security updates are provided for the latest stable release and the `main` branch. |
25 | 10 |
|
26 | | -```bash |
27 | | -# Check for known vulnerabilities |
28 | | -pip-audit -r <(pip freeze) |
| 11 | +| Version | Supported | |
| 12 | +|---------|-----------| |
| 13 | +| Latest stable release | ✅ | |
| 14 | +| `main` branch | ✅ | |
| 15 | +| Older releases | ❌ | |
29 | 16 |
|
30 | | -# Type checking for type-related issues |
31 | | -mypy quantumpytho/ |
32 | | - |
33 | | -# Static analysis |
34 | | -ruff check . |
35 | | -``` |
| 17 | +Users should upgrade to the latest release to receive security fixes and dependency updates. |
36 | 18 |
|
37 | 19 | --- |
38 | 20 |
|
39 | | -## 📬 Reporting a Vulnerability |
| 21 | +## Security Boundaries |
40 | 22 |
|
41 | | -### Responsible Disclosure |
| 23 | +QPyth should be treated as developer and research software, not as a safety-certified system. In particular: |
42 | 24 |
|
43 | | -We take security seriously and appreciate your help in keeping QPyth safe. |
| 25 | +- outputs are not guaranteed to be biologically valid, clinically meaningful, or safe for real-world use |
| 26 | +- DNA-related features must not be used for synthesis, pathogen engineering, wet-lab experimentation, or operational biological decision-making |
| 27 | +- optional integrations and external services may introduce network, API, credential, or third-party dependency risk |
44 | 28 |
|
45 | | -**If you find a security issue:** |
| 29 | +--- |
46 | 30 |
|
47 | | -1. **Do not** create a public GitHub issue |
48 | | -2. Use GitHub Security Advisories: |
49 | | - - Go to the repository **Security** tab |
50 | | - - Click **Report a vulnerability** |
51 | | -3. Alternatively, open a private issue with "SECURITY" in the title |
| 31 | +## What We Review |
52 | 32 |
|
53 | | -### What to Include |
| 33 | +We aim to reduce risk through: |
54 | 34 |
|
55 | | -- Description of the vulnerability |
56 | | -- Steps to reproduce |
57 | | -- Potential impact |
58 | | -- Suggested fix (if any) |
| 35 | +- dependency monitoring |
| 36 | +- static analysis and linting |
| 37 | +- code review |
| 38 | +- input validation for user-facing interfaces |
| 39 | +- secure handling of optional integrations where applicable |
59 | 40 |
|
60 | | -### Response Timeline |
| 41 | +Repository CI currently runs: |
61 | 42 |
|
62 | | -| Stage | Expected Time | |
63 | | -|-------|---------------| |
64 | | -| Acknowledgment | 48 hours | |
65 | | -| Triage | 7 days | |
66 | | -| Fix | Priority-based | |
67 | | -| Public disclosure | Coordinated | |
| 43 | +```bash |
| 44 | +ruff check . |
| 45 | +ruff format --check . |
| 46 | +pytest -v --tb=short |
| 47 | +pytest --cov=quantumpytho --cov-report=xml |
| 48 | +``` |
68 | 49 |
|
69 | 50 | --- |
70 | 51 |
|
71 | | -## 🔐 Security Features |
| 52 | +## Reporting a Vulnerability |
72 | 53 |
|
73 | | -### Dependency Security |
| 54 | +Please do not open a public issue for suspected vulnerabilities. |
74 | 55 |
|
75 | | -```toml |
76 | | -# pyproject.toml |
77 | | -dependencies = [ |
78 | | - "qiskit>=1.1.0", # Version-pinned major releases |
79 | | - "qiskit-aer>=0.15.0", # Latest stable with security fixes |
80 | | - "numpy>=2.0.0", # Modern, maintained version |
81 | | -] |
82 | | -``` |
83 | | - |
84 | | -### Input Validation |
| 56 | +Instead: |
85 | 57 |
|
86 | | -All user inputs are validated: |
| 58 | +1. Use GitHub Security Advisories or private vulnerability reporting if it is enabled for the repository. |
| 59 | +2. If private reporting is unavailable, contact the maintainers privately and include `SECURITY` in the subject line. |
87 | 60 |
|
88 | | -```python |
89 | | -def read_float(prompt: str, min_val: float, max_val: float) -> float: |
90 | | - """Validates user input against bounds.""" |
91 | | - # Raises ValueError if out of range |
92 | | -``` |
| 61 | +Please include: |
93 | 62 |
|
94 | | -### Secure Defaults |
| 63 | +- affected component |
| 64 | +- reproduction steps |
| 65 | +- impact assessment |
| 66 | +- suggested mitigation, if available |
95 | 67 |
|
96 | | -- QuantumSimulator (Aer) as default - no external connections |
97 | | -- Local execution only - no remote API calls |
98 | | -- Minimal permissions - no filesystem/network access |
| 68 | +We ask reporters to avoid public disclosure until the issue has been reviewed and a fix or mitigation is available. |
99 | 69 |
|
100 | 70 | --- |
101 | 71 |
|
102 | | -## 📚 Security Resources |
| 72 | +## Domain-Specific Responsible Use |
| 73 | + |
| 74 | +If you identify a risk involving: |
| 75 | + |
| 76 | +- misuse of DNA-related functionality |
| 77 | +- unsafe interpretation of sequence-like assets |
| 78 | +- misleading biological claims |
| 79 | +- dual-use or biosecurity concerns |
103 | 80 |
|
104 | | -- [Qiskit Security](https://qiskit.org/security) |
105 | | -- [PyPI Security](https://pypi.org/security/) |
106 | | -- [OWASP Quantum Computing](https://owasp.org/www-project-quantum-computing/) |
| 81 | +please report it as a security concern even if it is not a traditional software exploit. |
107 | 82 |
|
108 | 83 | --- |
109 | 84 |
|
110 | | -## 🙏 Thank You |
| 85 | +## Disclaimer |
111 | 86 |
|
112 | | -Your security reporting helps protect the entire quantum computing community. |
| 87 | +QPyth is provided for research, education, and software experimentation. It is not intended for clinical, medical, diagnostic, therapeutic, biosurveillance, synthesis, or wet-lab decision support. |
0 commit comments