shipcheck-cli 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/.github/workflows/ci.yml +9 -3
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/CHANGELOG.md +13 -0
- shipcheck_cli-0.2.0/PKG-INFO +162 -0
- shipcheck_cli-0.2.0/README.md +146 -0
- shipcheck_cli-0.2.0/action.yml +39 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/pyproject.toml +1 -2
- shipcheck_cli-0.2.0/src/shipcheck/cli.py +289 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/tests/test_cli.py +44 -29
- shipcheck_cli-0.1.0/PKG-INFO +0 -118
- shipcheck_cli-0.1.0/README.md +0 -102
- shipcheck_cli-0.1.0/src/shipcheck/cli.py +0 -311
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/.github/workflows/release.yml +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/.github/workflows/tests.yml +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/.gitignore +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/.shipcheck.toml +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/CONTRIBUTING.md +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/LICENSE +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/SECURITY.md +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/src/shipcheck/__init__.py +0 -0
- {shipcheck_cli-0.1.0 → shipcheck_cli-0.2.0}/tests/test_checks.py +0 -0
|
@@ -37,8 +37,14 @@ jobs:
|
|
|
37
37
|
- name: Build package
|
|
38
38
|
run: python -m build
|
|
39
39
|
|
|
40
|
-
- name:
|
|
40
|
+
- name: Install built wheel
|
|
41
41
|
run: python -m pip install dist/*.whl --force-reinstall
|
|
42
42
|
|
|
43
|
-
- name: CLI smoke test
|
|
44
|
-
run: shipcheck . --json
|
|
43
|
+
- name: CLI JSON smoke test
|
|
44
|
+
run: shipcheck . --format json > shipcheck.json
|
|
45
|
+
|
|
46
|
+
- name: CLI SARIF smoke test
|
|
47
|
+
run: shipcheck . --format sarif > shipcheck.sarif
|
|
48
|
+
|
|
49
|
+
- name: Validate SARIF document
|
|
50
|
+
run: python -c "import json; d=json.load(open('shipcheck.sarif')); assert d['version']=='2.1.0'; assert d['runs'][0]['tool']['driver']['name']=='ShipCheck'"
|
|
@@ -4,6 +4,18 @@ All notable changes to ShipCheck are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow Semantic Versioning.
|
|
6
6
|
|
|
7
|
+
## [0.2.0] - 2026-09-09
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Native composite GitHub Action interface.
|
|
12
|
+
- SARIF 2.1.0 output for GitHub Code Scanning.
|
|
13
|
+
- Actionable diagnostics for failed and warning checks.
|
|
14
|
+
- Stable documented exit codes.
|
|
15
|
+
- `.shipcheck.toml` ignore configuration for checks and paths.
|
|
16
|
+
- Safe `--fix` automation for conservative project templates.
|
|
17
|
+
- Provider detection and validation for Render, Railway, Fly.io, Netlify, and AWS.
|
|
18
|
+
|
|
7
19
|
## [0.1.0] - 2026-09-09
|
|
8
20
|
|
|
9
21
|
### Added
|
|
@@ -19,4 +31,5 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
19
31
|
- Automated test coverage and GitHub Actions CI across Python 3.11–3.13.
|
|
20
32
|
- Python package build and CLI smoke-test validation in CI.
|
|
21
33
|
|
|
34
|
+
[0.2.0]: https://github.com/farukislamyt/ShipCheck/releases/tag/v0.2.0
|
|
22
35
|
[0.1.0]: https://github.com/farukislamyt/ShipCheck/releases/tag/v0.1.0
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: shipcheck-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Pre-deployment health checks for software projects.
|
|
5
|
+
Author: Faruk Islam
|
|
6
|
+
License: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Requires-Dist: pyyaml>=6.0
|
|
10
|
+
Requires-Dist: rich>=13.7
|
|
11
|
+
Requires-Dist: typer>=0.12
|
|
12
|
+
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
14
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# ShipCheck
|
|
18
|
+
|
|
19
|
+
> Know if your project is ready to deploy.
|
|
20
|
+
|
|
21
|
+
ShipCheck is a developer-first CLI that scans a project before deployment and highlights configuration problems, missing files, exposed secrets, dependency issues, and deployment risks.
|
|
22
|
+
|
|
23
|
+
## Status
|
|
24
|
+
|
|
25
|
+
🚀 **v0.2.0** — CI/CD integration, SARIF, diagnostics, provider expansion, and safe fixes.
|
|
26
|
+
|
|
27
|
+
## What it checks
|
|
28
|
+
|
|
29
|
+
- Git repository and working-tree status
|
|
30
|
+
- Framework detection
|
|
31
|
+
- `.gitignore` and environment configuration
|
|
32
|
+
- Secret detection
|
|
33
|
+
- Dependency manifests
|
|
34
|
+
- Deployment configuration
|
|
35
|
+
- Provider-specific configuration for Vercel, Docker, GitHub Actions, Render, Railway, Fly.io, Netlify, AWS, and Procfile-compatible targets
|
|
36
|
+
- Tests and CI/CD signals
|
|
37
|
+
- Project documentation
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
### From PyPI
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
python -m pip install shipcheck-cli
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### From source
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone https://github.com/farukislamyt/ShipCheck.git
|
|
51
|
+
cd ShipCheck
|
|
52
|
+
python -m pip install -e ".[dev]"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## CLI usage
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
shipcheck .
|
|
59
|
+
shipcheck . --gate
|
|
60
|
+
shipcheck . --gate --threshold 90
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Machine-readable output:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
shipcheck . --format json
|
|
67
|
+
shipcheck . --format sarif > shipcheck-results.sarif
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`--json` remains supported as a compatibility alias for JSON output.
|
|
71
|
+
|
|
72
|
+
### Diagnostics
|
|
73
|
+
|
|
74
|
+
Non-passing checks include actionable recommendations in terminal and JSON output. Secret findings identify only the file and credential type; secret values are never printed.
|
|
75
|
+
|
|
76
|
+
### Safe fixes
|
|
77
|
+
|
|
78
|
+
Use `--fix` for narrowly scoped local fixes that do not overwrite application code:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
shipcheck . --fix
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Currently this can create a conservative `.gitignore` and copy `.env.template` to `.env.example` when the latter is missing. Always review generated files before committing them.
|
|
85
|
+
|
|
86
|
+
## Configuration
|
|
87
|
+
|
|
88
|
+
Create `.shipcheck.toml`:
|
|
89
|
+
|
|
90
|
+
```toml
|
|
91
|
+
[shipcheck]
|
|
92
|
+
threshold = 80
|
|
93
|
+
|
|
94
|
+
[shipcheck.ignore]
|
|
95
|
+
checks = ["Tests"]
|
|
96
|
+
paths = ["examples/", "fixtures/"]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The CLI `--threshold` option takes precedence over the configuration file. Invalid configuration returns exit code `2`.
|
|
100
|
+
|
|
101
|
+
## Exit codes
|
|
102
|
+
|
|
103
|
+
| Code | Meaning |
|
|
104
|
+
|---:|---|
|
|
105
|
+
| 0 | Scan completed and the deployment gate passed or was not requested |
|
|
106
|
+
| 1 | `--gate` blocked deployment |
|
|
107
|
+
| 2 | Invalid `.shipcheck.toml` configuration |
|
|
108
|
+
| 3 | Reserved for usage-level failures |
|
|
109
|
+
|
|
110
|
+
## GitHub Action
|
|
111
|
+
|
|
112
|
+
ShipCheck can run as a native composite action:
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
name: ShipCheck
|
|
116
|
+
|
|
117
|
+
on:
|
|
118
|
+
push:
|
|
119
|
+
branches: [main]
|
|
120
|
+
pull_request:
|
|
121
|
+
|
|
122
|
+
permissions:
|
|
123
|
+
contents: read
|
|
124
|
+
security-events: write
|
|
125
|
+
|
|
126
|
+
jobs:
|
|
127
|
+
shipcheck:
|
|
128
|
+
runs-on: ubuntu-latest
|
|
129
|
+
steps:
|
|
130
|
+
- uses: actions/checkout@v4
|
|
131
|
+
- uses: farukislamyt/ShipCheck@v0.2.0
|
|
132
|
+
with:
|
|
133
|
+
threshold: "80"
|
|
134
|
+
gate: "true"
|
|
135
|
+
format: sarif
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The action installs the released `shipcheck-cli` package and uploads SARIF results to GitHub Code Scanning.
|
|
139
|
+
|
|
140
|
+
## Release process
|
|
141
|
+
|
|
142
|
+
Releases are tag-driven. The GitHub Actions release workflow validates the tag against `pyproject.toml`, builds the package, validates distributions, creates the GitHub Release, and publishes to PyPI using trusted publishing.
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
git tag v0.2.0
|
|
146
|
+
git push origin v0.2.0
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
See [CHANGELOG.md](CHANGELOG.md) for release history.
|
|
150
|
+
|
|
151
|
+
## Development
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
python -m pip install -e ".[dev]"
|
|
155
|
+
ruff check .
|
|
156
|
+
pytest -q
|
|
157
|
+
python -m build
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
MIT License.
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# ShipCheck
|
|
2
|
+
|
|
3
|
+
> Know if your project is ready to deploy.
|
|
4
|
+
|
|
5
|
+
ShipCheck is a developer-first CLI that scans a project before deployment and highlights configuration problems, missing files, exposed secrets, dependency issues, and deployment risks.
|
|
6
|
+
|
|
7
|
+
## Status
|
|
8
|
+
|
|
9
|
+
🚀 **v0.2.0** — CI/CD integration, SARIF, diagnostics, provider expansion, and safe fixes.
|
|
10
|
+
|
|
11
|
+
## What it checks
|
|
12
|
+
|
|
13
|
+
- Git repository and working-tree status
|
|
14
|
+
- Framework detection
|
|
15
|
+
- `.gitignore` and environment configuration
|
|
16
|
+
- Secret detection
|
|
17
|
+
- Dependency manifests
|
|
18
|
+
- Deployment configuration
|
|
19
|
+
- Provider-specific configuration for Vercel, Docker, GitHub Actions, Render, Railway, Fly.io, Netlify, AWS, and Procfile-compatible targets
|
|
20
|
+
- Tests and CI/CD signals
|
|
21
|
+
- Project documentation
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
### From PyPI
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
python -m pip install shipcheck-cli
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### From source
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
git clone https://github.com/farukislamyt/ShipCheck.git
|
|
35
|
+
cd ShipCheck
|
|
36
|
+
python -m pip install -e ".[dev]"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## CLI usage
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
shipcheck .
|
|
43
|
+
shipcheck . --gate
|
|
44
|
+
shipcheck . --gate --threshold 90
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Machine-readable output:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
shipcheck . --format json
|
|
51
|
+
shipcheck . --format sarif > shipcheck-results.sarif
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`--json` remains supported as a compatibility alias for JSON output.
|
|
55
|
+
|
|
56
|
+
### Diagnostics
|
|
57
|
+
|
|
58
|
+
Non-passing checks include actionable recommendations in terminal and JSON output. Secret findings identify only the file and credential type; secret values are never printed.
|
|
59
|
+
|
|
60
|
+
### Safe fixes
|
|
61
|
+
|
|
62
|
+
Use `--fix` for narrowly scoped local fixes that do not overwrite application code:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
shipcheck . --fix
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Currently this can create a conservative `.gitignore` and copy `.env.template` to `.env.example` when the latter is missing. Always review generated files before committing them.
|
|
69
|
+
|
|
70
|
+
## Configuration
|
|
71
|
+
|
|
72
|
+
Create `.shipcheck.toml`:
|
|
73
|
+
|
|
74
|
+
```toml
|
|
75
|
+
[shipcheck]
|
|
76
|
+
threshold = 80
|
|
77
|
+
|
|
78
|
+
[shipcheck.ignore]
|
|
79
|
+
checks = ["Tests"]
|
|
80
|
+
paths = ["examples/", "fixtures/"]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The CLI `--threshold` option takes precedence over the configuration file. Invalid configuration returns exit code `2`.
|
|
84
|
+
|
|
85
|
+
## Exit codes
|
|
86
|
+
|
|
87
|
+
| Code | Meaning |
|
|
88
|
+
|---:|---|
|
|
89
|
+
| 0 | Scan completed and the deployment gate passed or was not requested |
|
|
90
|
+
| 1 | `--gate` blocked deployment |
|
|
91
|
+
| 2 | Invalid `.shipcheck.toml` configuration |
|
|
92
|
+
| 3 | Reserved for usage-level failures |
|
|
93
|
+
|
|
94
|
+
## GitHub Action
|
|
95
|
+
|
|
96
|
+
ShipCheck can run as a native composite action:
|
|
97
|
+
|
|
98
|
+
```yaml
|
|
99
|
+
name: ShipCheck
|
|
100
|
+
|
|
101
|
+
on:
|
|
102
|
+
push:
|
|
103
|
+
branches: [main]
|
|
104
|
+
pull_request:
|
|
105
|
+
|
|
106
|
+
permissions:
|
|
107
|
+
contents: read
|
|
108
|
+
security-events: write
|
|
109
|
+
|
|
110
|
+
jobs:
|
|
111
|
+
shipcheck:
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
- uses: farukislamyt/ShipCheck@v0.2.0
|
|
116
|
+
with:
|
|
117
|
+
threshold: "80"
|
|
118
|
+
gate: "true"
|
|
119
|
+
format: sarif
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The action installs the released `shipcheck-cli` package and uploads SARIF results to GitHub Code Scanning.
|
|
123
|
+
|
|
124
|
+
## Release process
|
|
125
|
+
|
|
126
|
+
Releases are tag-driven. The GitHub Actions release workflow validates the tag against `pyproject.toml`, builds the package, validates distributions, creates the GitHub Release, and publishes to PyPI using trusted publishing.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
git tag v0.2.0
|
|
130
|
+
git push origin v0.2.0
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
See [CHANGELOG.md](CHANGELOG.md) for release history.
|
|
134
|
+
|
|
135
|
+
## Development
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
python -m pip install -e ".[dev]"
|
|
139
|
+
ruff check .
|
|
140
|
+
pytest -q
|
|
141
|
+
python -m build
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
MIT License.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: ShipCheck
|
|
2
|
+
description: Check whether a project is ready to deploy
|
|
3
|
+
branding:
|
|
4
|
+
icon: check-circle
|
|
5
|
+
color: green
|
|
6
|
+
inputs:
|
|
7
|
+
threshold:
|
|
8
|
+
description: Minimum readiness score required by the deployment gate
|
|
9
|
+
required: false
|
|
10
|
+
default: "80"
|
|
11
|
+
gate:
|
|
12
|
+
description: Fail the action when readiness is below threshold or a check fails
|
|
13
|
+
required: false
|
|
14
|
+
default: "true"
|
|
15
|
+
format:
|
|
16
|
+
description: Output format (text, json, sarif)
|
|
17
|
+
required: false
|
|
18
|
+
default: sarif
|
|
19
|
+
runs:
|
|
20
|
+
using: composite
|
|
21
|
+
steps:
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.11"
|
|
26
|
+
- name: Install ShipCheck
|
|
27
|
+
shell: bash
|
|
28
|
+
run: python -m pip install --disable-pip-version-check shipcheck-cli==0.2.0
|
|
29
|
+
- name: Run ShipCheck
|
|
30
|
+
shell: bash
|
|
31
|
+
run: |
|
|
32
|
+
args=(. --format "${{ inputs.format }}" --threshold "${{ inputs.threshold }}")
|
|
33
|
+
if [ "${{ inputs.gate }}" = "true" ]; then args+=(--gate); fi
|
|
34
|
+
shipcheck "${args[@]}" > shipcheck-results.json
|
|
35
|
+
- name: Upload SARIF results
|
|
36
|
+
if: ${{ inputs.format == 'sarif' && always() }}
|
|
37
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
38
|
+
with:
|
|
39
|
+
sarif_file: shipcheck-results.json
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "shipcheck-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.2.0"
|
|
8
8
|
description = "Pre-deployment health checks for software projects."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -30,7 +30,6 @@ packages = ["src/shipcheck"]
|
|
|
30
30
|
|
|
31
31
|
[tool.ruff]
|
|
32
32
|
line-length = 120
|
|
33
|
-
|
|
34
33
|
target-version = "py311"
|
|
35
34
|
|
|
36
35
|
[tool.pytest.ini_options]
|