|
4 | 4 | [](https://pypi.org/project/mpak-scanner/) |
5 | 5 | [](https://pypi.org/project/mpak-scanner/) |
6 | 6 | [](https://github.com/NimbleBrainInc/mpak/blob/main/apps/scanner/LICENSE) |
| 7 | +[](https://mpak.dev) |
7 | 8 |
|
8 | 9 | Security scanner for [MCP](https://modelcontextprotocol.io/) bundles (.mcpb). Reference implementation of the [mpak Trust Framework (MTF)](https://mpaktrust.org), an open security standard for MCP server packaging. |
9 | 10 |
|
@@ -121,6 +122,60 @@ The scanner ships with test fixtures for validation: |
121 | 122 |
|
122 | 123 | See [tests/fixtures/README.md](tests/fixtures/README.md) for details. |
123 | 124 |
|
| 125 | +## Releasing |
| 126 | + |
| 127 | +Releases are automated via GitHub Actions. Pushing a tag triggers the full pipeline: verify, publish to PyPI (via [trusted publishing](https://docs.pypi.org/trusted-publishers/)), and build + push Docker image to GHCR. |
| 128 | + |
| 129 | +**Version is defined in one place:** `pyproject.toml`. The runtime version (`mpak_scanner.__version__`, `SCANNER_VERSION`) is derived automatically via `importlib.metadata`. |
| 130 | + |
| 131 | +### Steps |
| 132 | + |
| 133 | +1. **Bump version** in `pyproject.toml`: |
| 134 | + ```bash |
| 135 | + # Edit pyproject.toml version field, or use hatch: |
| 136 | + hatch version patch # 0.2.4 → 0.2.5 |
| 137 | + hatch version minor # 0.2.4 → 0.3.0 |
| 138 | + ``` |
| 139 | + |
| 140 | +2. **Run verification:** |
| 141 | + ```bash |
| 142 | + uv run ruff check src/ tests/ && uv run ruff format --check src/ tests/ && uv run ty check src/ && uv run pytest |
| 143 | + ``` |
| 144 | + |
| 145 | +3. **Commit and push:** |
| 146 | + ```bash |
| 147 | + git commit -am "scanner: bump to X.Y.Z" |
| 148 | + git push |
| 149 | + ``` |
| 150 | + |
| 151 | +4. **Tag and push** (this triggers the publish): |
| 152 | + ```bash |
| 153 | + git tag scanner-vX.Y.Z |
| 154 | + git push origin scanner-vX.Y.Z |
| 155 | + ``` |
| 156 | + |
| 157 | +CI will: |
| 158 | +- Run lint, format, type check, and unit tests |
| 159 | +- Verify the tag matches `pyproject.toml` |
| 160 | +- Build and publish to [PyPI](https://pypi.org/project/mpak-scanner/) |
| 161 | +- Build and push Docker image to `ghcr.io/nimblebraininc/mpak-scanner:{version}` and `:latest` |
| 162 | + |
| 163 | +See [`scanner-publish.yml`](../../.github/workflows/scanner-publish.yml). |
| 164 | + |
| 165 | +### Docker Image |
| 166 | + |
| 167 | +The Docker image includes all external security tools (Syft, Grype, TruffleHog, ESLint, Bandit, GuardDog) and installs `mpak-scanner` from PyPI. |
| 168 | + |
| 169 | +```bash |
| 170 | +# Pull from GHCR |
| 171 | +docker pull ghcr.io/nimblebraininc/mpak-scanner:latest |
| 172 | + |
| 173 | +# Run a scan |
| 174 | +docker run --rm -v /path/to/bundle.mcpb:/bundle.mcpb ghcr.io/nimblebraininc/mpak-scanner scan /bundle.mcpb |
| 175 | +``` |
| 176 | + |
| 177 | +For production deployment to ECR/K8s, see `deployments/mpak/`. |
| 178 | + |
124 | 179 | ## Related Projects |
125 | 180 |
|
126 | 181 | - [mpak registry](https://mpak.dev) - Search, download, and publish MCP bundles |
|
0 commit comments