You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ uv run pre-commit install # enable the gitleaks secret-scan hook
12
12
## Running tests and hooks
13
13
14
14
```bash
15
-
uv run pytest # run the test suite (coverage gate: ≥95%)
15
+
uv run pytest # run the test suite (coverage gate: 100%)
16
16
uv run pre-commit run --all-files # run the gitleaks hook manually
17
17
uv run ruff check src/ tests/ # lint
18
18
uv run ruff format --check src/ tests/ # check formatting
@@ -71,20 +71,20 @@ Don't hand-bump these versions — let Renovate's PRs flow through.
71
71
72
72
Releases publish to PyPI via [Trusted Publishing](https://docs.pypi.org/trusted-publishers/) — there is no stored API token. The publish workflow is [`.github/workflows/release.yml`](.github/workflows/release.yml).
73
73
74
-
**One-time setup (already done for an existing project, required once per index):**
74
+
**How it's wired:**
75
75
76
-
-On PyPI and TestPyPI, register a pending publisher: owner `tanem`, repository `mt5-pnl-exporter`, workflow `release.yml`, environment `pypi` (PyPI) / `testpypi` (TestPyPI).
77
-
-On GitHub, create the `pypi`and `testpypi`repository Environments.
76
+
-The repo has two GitHub Environments, `pypi` and `testpypi`. The `pypi` Environment requires a reviewer (`tanem`), so a real publish pauses for manual approval before the immutable upload. "Prevent self-review" is off, so the solo maintainer approves their own release.
77
+
-Both indices have a pending publisher registered — owner `tanem`, repository `mt5-pnl-exporter`, workflow `release.yml`, environment `pypi`(PyPI) / `testpypi`(TestPyPI). Each index needs this registered once before its first publish.
78
78
79
-
**Rehearse to TestPyPI**(validates the OIDC handshake and the rendered page without burning a real version):
79
+
**Rehearse to TestPyPI**— validates the OIDC handshake and the rendered page without burning a real version:
80
80
81
-
1. Actions tab → `release` workflow → Run workflow (`workflow_dispatch`). This builds and uploads to TestPyPI.
81
+
1. Actions tab → `release` workflow → Run workflow (`workflow_dispatch`). Builds and uploads to TestPyPI.
82
82
83
83
**Publish a real release:**
84
84
85
85
1. Tag the commit, e.g. `git tag v1.0.0`.
86
86
2. Draft a GitHub Release against that tag with release notes (the notes are the changelog).
87
-
3. Publish the Release. The `release: published` event runs `release.yml`, which builds and uploads to PyPI.
87
+
3. Publish the Release. The `release: published` event runs `release.yml` and the publish job pauses on the `pypi` Environment. Approve it in the Actions tab; the job then builds and uploads to PyPI.
88
88
89
89
A PyPI version is immutable once uploaded — the version number cannot be reused. The TestPyPI rehearsal de-risks the first upload.
Copy file name to clipboardExpand all lines: SECURITY.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Scope
4
4
5
-
This tool handles **read-only MT5 investor passwords** — credentials that can view account data but cannot place or modify trades — and a **snapshot encryption passphrase** used to age-encrypt the on-disk snapshot. Both live only on the Windows host where `poll` runs, in its OS keychain via `keyring` (Windows Credential Manager). Neither is written to disk, logs, or the snapshot file.
5
+
This tool handles **read-only MT5 investor passwords** — credentials that can view account data but cannot place or modify trades — and a **snapshot encryption passphrase** used to age-encrypt the on-disk snapshot. Both live only on the Windows host where `export` runs, in its OS keychain via `keyring` (Windows Credential Manager). Neither is written to disk, logs, or the snapshot file.
6
6
7
7
Vulnerabilities in scope:
8
8
@@ -22,6 +22,7 @@ Out of scope:
22
22
-**GitHub Actions are pinned to commit SHAs** (not mutable tags), so a compromised or retagged action cannot inject code into CI. [Renovate](https://docs.renovatebot.com/) keeps the pins current via `helpers:pinGitHubActionDigests`.
23
23
-**`lockFileMaintenance`** periodically refreshes `uv.lock` so transitive dependency security patches are picked up rather than pinned indefinitely.
24
24
- Dependency update PRs (Renovate) must pass the full `tests` workflow before merging; see [`renovate.json`](renovate.json) and [`CONTRIBUTING.md`](CONTRIBUTING.md).
25
+
-**Releases publish via PyPI [Trusted Publishing](https://docs.pypi.org/trusted-publishers/)** (OIDC), so no long-lived PyPI API token is stored in the repo or CI; the `pypi` deployment environment also gates a real publish on manual approval. See [`CONTRIBUTING.md`](CONTRIBUTING.md)'s Releasing section.
0 commit comments