whatyouship 0.1.0b1__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.
- whatyouship-0.1.0b1/LICENSE +21 -0
- whatyouship-0.1.0b1/PKG-INFO +271 -0
- whatyouship-0.1.0b1/README.md +246 -0
- whatyouship-0.1.0b1/pyproject.toml +49 -0
- whatyouship-0.1.0b1/src/whatyouship/__init__.py +6 -0
- whatyouship-0.1.0b1/src/whatyouship/binary/__init__.py +4 -0
- whatyouship-0.1.0b1/src/whatyouship/binary/pe.py +224 -0
- whatyouship-0.1.0b1/src/whatyouship/cli.py +194 -0
- whatyouship-0.1.0b1/src/whatyouship/compare.py +206 -0
- whatyouship-0.1.0b1/src/whatyouship/config.py +268 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/__init__.py +43 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/directory.py +46 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/extracted_tree_cache.py +129 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/extraction_cache.py +117 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/inno.py +59 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/inno_cache.py +104 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/inno_detection.py +199 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/msi.py +128 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/msi_cache.py +132 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/msi_scope.py +301 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/msi_signature.py +26 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/nsis.py +57 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/nsis_cache.py +70 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/nsis_detection.py +52 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/windows_authenticode.py +165 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/zip.py +39 -0
- whatyouship-0.1.0b1/src/whatyouship/inspectors/zip_cache.py +147 -0
- whatyouship-0.1.0b1/src/whatyouship/lint.py +94 -0
- whatyouship-0.1.0b1/src/whatyouship/model.py +140 -0
- whatyouship-0.1.0b1/src/whatyouship/paths.py +32 -0
- whatyouship-0.1.0b1/src/whatyouship/renderers/__init__.py +31 -0
- whatyouship-0.1.0b1/src/whatyouship/renderers/csv.py +82 -0
- whatyouship-0.1.0b1/src/whatyouship/renderers/json.py +135 -0
- whatyouship-0.1.0b1/src/whatyouship/renderers/text.py +156 -0
- whatyouship-0.1.0b1/src/whatyouship/report.py +53 -0
- whatyouship-0.1.0b1/src/whatyouship/rules/__init__.py +4 -0
- whatyouship-0.1.0b1/src/whatyouship/rules/build_artifacts.py +49 -0
- whatyouship-0.1.0b1/src/whatyouship/rules/inconsistent_installation_scope.py +41 -0
- whatyouship-0.1.0b1/src/whatyouship/rules/invalid_artifact_signature.py +39 -0
- whatyouship-0.1.0b1/src/whatyouship/rules/unsigned_artifact.py +39 -0
- whatyouship-0.1.0b1/src/whatyouship/rules/unsigned_binary.py +43 -0
- whatyouship-0.1.0b1/src/whatyouship/rules/untrusted_artifact_signature.py +39 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nikolay Larin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: whatyouship
|
|
3
|
+
Version: 0.1.0b1
|
|
4
|
+
Summary: Know what you ship. Know what you install.
|
|
5
|
+
Keywords: release,artifacts,installer,linting,binary-analysis
|
|
6
|
+
Author-email: Nikolay Larin <nikolay.larin@gmail.com>
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
16
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
17
|
+
Classifier: Topic :: System :: Software Distribution
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: pymsi==0.0.0rc1
|
|
20
|
+
Requires-Dist: lief>=1.0,<2
|
|
21
|
+
Project-URL: Issues, https://github.com/nikolay-larin-b/whatyouship/issues
|
|
22
|
+
Project-URL: Repository, https://github.com/nikolay-larin-b/whatyouship
|
|
23
|
+
Import-Name: whatyouship
|
|
24
|
+
|
|
25
|
+
# WhatYouShip
|
|
26
|
+
|
|
27
|
+
**Know what you ship. Know what you install.**
|
|
28
|
+
|
|
29
|
+
WhatYouShip is an open-source release artifact linter. It analyzes the software package that users actually receive — not the source tree or build configuration.
|
|
30
|
+
|
|
31
|
+
It can inspect, lint, and compare directory, MSI, NSIS installer, Inno Setup
|
|
32
|
+
installer, and ZIP releases.
|
|
33
|
+
|
|
34
|
+
## Quick start
|
|
35
|
+
|
|
36
|
+
Inspect a release:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
whatyouship inspect release.msi
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Lint it:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
whatyouship lint release.msi
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Compare two releases:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
whatyouship compare previous.msi release.msi
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Use the previous release as a baseline so that existing findings do not hide new regressions:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
whatyouship lint release.msi --baseline previous.msi
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Save a report:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
whatyouship lint release.msi --baseline previous.msi -o lint.json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Use WhatYouShip as a CI release gate:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
whatyouship lint release.msi --baseline previous.msi --fail-on error
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
For available commands and options:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
whatyouship --help
|
|
76
|
+
whatyouship inspect --help
|
|
77
|
+
whatyouship lint --help
|
|
78
|
+
whatyouship compare --help
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## What it looks for
|
|
82
|
+
|
|
83
|
+
WhatYouShip analyzes the final release rather than assumptions made by the build system.
|
|
84
|
+
|
|
85
|
+
Current checks and comparisons include:
|
|
86
|
+
|
|
87
|
+
* suspicious build artifacts accidentally included in a release;
|
|
88
|
+
* unsigned Windows executables and libraries;
|
|
89
|
+
* untrusted signers and invalid artifact signatures where platform verification is available;
|
|
90
|
+
* inconsistent MSI installation scope;
|
|
91
|
+
* added, removed, and changed files between releases;
|
|
92
|
+
* binary architecture changes;
|
|
93
|
+
* executable/library kind changes;
|
|
94
|
+
* file and product version changes;
|
|
95
|
+
* signature and signer changes between releases.
|
|
96
|
+
|
|
97
|
+
For recognized Windows binaries, WhatYouShip also extracts architecture, binary kind, version metadata, and signature information.
|
|
98
|
+
|
|
99
|
+
## Inspect, lint, compare
|
|
100
|
+
|
|
101
|
+
### `inspect`
|
|
102
|
+
|
|
103
|
+
Shows what is actually present in a release artifact.
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
whatyouship inspect release.zip
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
For recognized binaries, the report includes metadata such as architecture, executable or library kind, versions, and signature information.
|
|
110
|
+
|
|
111
|
+
### `lint`
|
|
112
|
+
|
|
113
|
+
Runs release rules and reports findings.
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
whatyouship lint release.msi
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
A product-specific TOML configuration can change rule settings:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
whatyouship lint release.msi --config examples/whatyouship.toml
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
See [`examples/whatyouship.toml`](examples/whatyouship.toml) for supported rule settings.
|
|
126
|
+
|
|
127
|
+
### Baseline linting
|
|
128
|
+
|
|
129
|
+
A previous release can be used as the baseline:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
whatyouship lint release.msi --baseline previous.msi
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Findings are classified as:
|
|
136
|
+
|
|
137
|
+
* **new** — present only in the new release;
|
|
138
|
+
* **existing** — present in both releases;
|
|
139
|
+
* **resolved** — present only in the baseline.
|
|
140
|
+
|
|
141
|
+
This makes it possible to concentrate on regressions without losing track of known issues.
|
|
142
|
+
|
|
143
|
+
### `compare`
|
|
144
|
+
|
|
145
|
+
Compares the actual contents of two releases:
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
whatyouship compare previous.msi release.msi
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
In addition to added, removed, changed, and unchanged files, WhatYouShip reports semantic binary changes such as version, architecture, and signature changes.
|
|
152
|
+
|
|
153
|
+
## Supported artifacts
|
|
154
|
+
|
|
155
|
+
| Artifact | Inspect | Lint | Compare |
|
|
156
|
+
| -------------- | ------- | ---- | ------- |
|
|
157
|
+
| Directory | Yes | Yes | Yes |
|
|
158
|
+
| MSI | Yes | Yes | Yes |
|
|
159
|
+
| NSIS EXE | Yes | Yes | Yes |
|
|
160
|
+
| Inno Setup EXE | Yes | Yes | Yes |
|
|
161
|
+
| ZIP | Yes | Yes | Yes |
|
|
162
|
+
|
|
163
|
+
MSI extraction and static MSI analysis are platform-independent.
|
|
164
|
+
|
|
165
|
+
On Windows, the signature of the MSI package itself is verified using the system Authenticode API. Signature status distinguishes unsigned, valid and trusted, signed but untrusted, and cryptographically invalid artifacts. Package signature verification is currently unsupported on Linux and macOS.
|
|
166
|
+
|
|
167
|
+
ZIP releases use the same file and binary analysis as ordinary directories.
|
|
168
|
+
|
|
169
|
+
NSIS installers require `7z` or `7zz` from 7-Zip to be available in `PATH`.
|
|
170
|
+
WhatYouShip inspects the extracted payload; extracted paths are not an exact
|
|
171
|
+
simulation of runtime installation paths. On Windows, the outer installer's
|
|
172
|
+
Authenticode signature is checked separately from signatures of binaries in its
|
|
173
|
+
payload.
|
|
174
|
+
|
|
175
|
+
Inno Setup installers require `innoextract` to be available in `PATH`. Their
|
|
176
|
+
extracted layout is a payload representation, not an exact simulation of
|
|
177
|
+
runtime installation paths. On Windows, the outer installer's Authenticode
|
|
178
|
+
signature is checked separately from signatures of binaries in its payload.
|
|
179
|
+
|
|
180
|
+
## MSI installation scope
|
|
181
|
+
|
|
182
|
+
WhatYouShip statically analyzes MSI installation scope and distinguishes:
|
|
183
|
+
|
|
184
|
+
* `per-user`;
|
|
185
|
+
* `per-machine`;
|
|
186
|
+
* `dual-purpose`;
|
|
187
|
+
* `ambiguous`.
|
|
188
|
+
|
|
189
|
+
The `inconsistent-installation-scope` rule reports concrete conflicts between the declared installation context and component resources.
|
|
190
|
+
|
|
191
|
+
WhatYouShip also reports installation-scope changes when comparing MSI releases.
|
|
192
|
+
|
|
193
|
+
Because this is static analysis, runtime conditions and installer choices cannot always be resolved in advance.
|
|
194
|
+
|
|
195
|
+
## Reports
|
|
196
|
+
|
|
197
|
+
Use `-o` or `--output` to write a report to a file. The extension selects the format.
|
|
198
|
+
|
|
199
|
+
```text
|
|
200
|
+
whatyouship inspect release.zip -o inspect.json
|
|
201
|
+
whatyouship lint release.zip -o lint.csv
|
|
202
|
+
whatyouship compare previous.zip release.zip -o compare.txt
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Supported formats:
|
|
206
|
+
|
|
207
|
+
| Format | Inspect | Lint | Compare |
|
|
208
|
+
| ------- | ------- | ---- | ------- |
|
|
209
|
+
| `.txt` | Yes | Yes | Yes |
|
|
210
|
+
| `.json` | Yes | Yes | Yes |
|
|
211
|
+
| `.csv` | Yes | Yes | No |
|
|
212
|
+
|
|
213
|
+
Without `--output`, commands print text to stdout.
|
|
214
|
+
|
|
215
|
+
JSON reports contain structured data and include `schema_version`, `tool_version`, and the report type.
|
|
216
|
+
|
|
217
|
+
## CI and exit codes
|
|
218
|
+
|
|
219
|
+
`lint` can be used directly as a release gate.
|
|
220
|
+
|
|
221
|
+
```text
|
|
222
|
+
whatyouship lint release.msi --fail-on error
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Available thresholds:
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
--fail-on error
|
|
229
|
+
--fail-on warning
|
|
230
|
+
--fail-on never
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
The default is `--fail-on error`.
|
|
234
|
+
|
|
235
|
+
Exit codes:
|
|
236
|
+
|
|
237
|
+
* `0` — the release passes the selected threshold;
|
|
238
|
+
* `1` — lint findings reach the selected threshold;
|
|
239
|
+
* `2` — WhatYouShip cannot complete the operation because of an input, configuration, or tool error.
|
|
240
|
+
|
|
241
|
+
With `--baseline`, only **new** findings affect the lint exit code.
|
|
242
|
+
|
|
243
|
+
For example:
|
|
244
|
+
|
|
245
|
+
```text
|
|
246
|
+
whatyouship lint release.msi --baseline previous.msi --fail-on error -o lint.json
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## Cache
|
|
250
|
+
|
|
251
|
+
WhatYouShip keeps its user data under:
|
|
252
|
+
|
|
253
|
+
```text
|
|
254
|
+
~/.whatyouship/
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Extracted artifacts are cached by SHA-256:
|
|
258
|
+
|
|
259
|
+
```text
|
|
260
|
+
~/.whatyouship/cache/msi/v1/
|
|
261
|
+
~/.whatyouship/cache/nsis/v1/
|
|
262
|
+
~/.whatyouship/cache/inno/v1/
|
|
263
|
+
~/.whatyouship/cache/zip/v1/
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
The cache avoids repeated extraction of the same artifact. Binary metadata and lint analysis are performed again on each run.
|
|
267
|
+
|
|
268
|
+
The cache hash identifies artifact content; it is not a signature or authenticity check.
|
|
269
|
+
|
|
270
|
+
On Windows, `~` refers to the user's profile directory.
|
|
271
|
+
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# WhatYouShip
|
|
2
|
+
|
|
3
|
+
**Know what you ship. Know what you install.**
|
|
4
|
+
|
|
5
|
+
WhatYouShip is an open-source release artifact linter. It analyzes the software package that users actually receive — not the source tree or build configuration.
|
|
6
|
+
|
|
7
|
+
It can inspect, lint, and compare directory, MSI, NSIS installer, Inno Setup
|
|
8
|
+
installer, and ZIP releases.
|
|
9
|
+
|
|
10
|
+
## Quick start
|
|
11
|
+
|
|
12
|
+
Inspect a release:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
whatyouship inspect release.msi
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Lint it:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
whatyouship lint release.msi
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Compare two releases:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
whatyouship compare previous.msi release.msi
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Use the previous release as a baseline so that existing findings do not hide new regressions:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
whatyouship lint release.msi --baseline previous.msi
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Save a report:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
whatyouship lint release.msi --baseline previous.msi -o lint.json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Use WhatYouShip as a CI release gate:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
whatyouship lint release.msi --baseline previous.msi --fail-on error
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For available commands and options:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
whatyouship --help
|
|
52
|
+
whatyouship inspect --help
|
|
53
|
+
whatyouship lint --help
|
|
54
|
+
whatyouship compare --help
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## What it looks for
|
|
58
|
+
|
|
59
|
+
WhatYouShip analyzes the final release rather than assumptions made by the build system.
|
|
60
|
+
|
|
61
|
+
Current checks and comparisons include:
|
|
62
|
+
|
|
63
|
+
* suspicious build artifacts accidentally included in a release;
|
|
64
|
+
* unsigned Windows executables and libraries;
|
|
65
|
+
* untrusted signers and invalid artifact signatures where platform verification is available;
|
|
66
|
+
* inconsistent MSI installation scope;
|
|
67
|
+
* added, removed, and changed files between releases;
|
|
68
|
+
* binary architecture changes;
|
|
69
|
+
* executable/library kind changes;
|
|
70
|
+
* file and product version changes;
|
|
71
|
+
* signature and signer changes between releases.
|
|
72
|
+
|
|
73
|
+
For recognized Windows binaries, WhatYouShip also extracts architecture, binary kind, version metadata, and signature information.
|
|
74
|
+
|
|
75
|
+
## Inspect, lint, compare
|
|
76
|
+
|
|
77
|
+
### `inspect`
|
|
78
|
+
|
|
79
|
+
Shows what is actually present in a release artifact.
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
whatyouship inspect release.zip
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For recognized binaries, the report includes metadata such as architecture, executable or library kind, versions, and signature information.
|
|
86
|
+
|
|
87
|
+
### `lint`
|
|
88
|
+
|
|
89
|
+
Runs release rules and reports findings.
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
whatyouship lint release.msi
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
A product-specific TOML configuration can change rule settings:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
whatyouship lint release.msi --config examples/whatyouship.toml
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
See [`examples/whatyouship.toml`](examples/whatyouship.toml) for supported rule settings.
|
|
102
|
+
|
|
103
|
+
### Baseline linting
|
|
104
|
+
|
|
105
|
+
A previous release can be used as the baseline:
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
whatyouship lint release.msi --baseline previous.msi
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Findings are classified as:
|
|
112
|
+
|
|
113
|
+
* **new** — present only in the new release;
|
|
114
|
+
* **existing** — present in both releases;
|
|
115
|
+
* **resolved** — present only in the baseline.
|
|
116
|
+
|
|
117
|
+
This makes it possible to concentrate on regressions without losing track of known issues.
|
|
118
|
+
|
|
119
|
+
### `compare`
|
|
120
|
+
|
|
121
|
+
Compares the actual contents of two releases:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
whatyouship compare previous.msi release.msi
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
In addition to added, removed, changed, and unchanged files, WhatYouShip reports semantic binary changes such as version, architecture, and signature changes.
|
|
128
|
+
|
|
129
|
+
## Supported artifacts
|
|
130
|
+
|
|
131
|
+
| Artifact | Inspect | Lint | Compare |
|
|
132
|
+
| -------------- | ------- | ---- | ------- |
|
|
133
|
+
| Directory | Yes | Yes | Yes |
|
|
134
|
+
| MSI | Yes | Yes | Yes |
|
|
135
|
+
| NSIS EXE | Yes | Yes | Yes |
|
|
136
|
+
| Inno Setup EXE | Yes | Yes | Yes |
|
|
137
|
+
| ZIP | Yes | Yes | Yes |
|
|
138
|
+
|
|
139
|
+
MSI extraction and static MSI analysis are platform-independent.
|
|
140
|
+
|
|
141
|
+
On Windows, the signature of the MSI package itself is verified using the system Authenticode API. Signature status distinguishes unsigned, valid and trusted, signed but untrusted, and cryptographically invalid artifacts. Package signature verification is currently unsupported on Linux and macOS.
|
|
142
|
+
|
|
143
|
+
ZIP releases use the same file and binary analysis as ordinary directories.
|
|
144
|
+
|
|
145
|
+
NSIS installers require `7z` or `7zz` from 7-Zip to be available in `PATH`.
|
|
146
|
+
WhatYouShip inspects the extracted payload; extracted paths are not an exact
|
|
147
|
+
simulation of runtime installation paths. On Windows, the outer installer's
|
|
148
|
+
Authenticode signature is checked separately from signatures of binaries in its
|
|
149
|
+
payload.
|
|
150
|
+
|
|
151
|
+
Inno Setup installers require `innoextract` to be available in `PATH`. Their
|
|
152
|
+
extracted layout is a payload representation, not an exact simulation of
|
|
153
|
+
runtime installation paths. On Windows, the outer installer's Authenticode
|
|
154
|
+
signature is checked separately from signatures of binaries in its payload.
|
|
155
|
+
|
|
156
|
+
## MSI installation scope
|
|
157
|
+
|
|
158
|
+
WhatYouShip statically analyzes MSI installation scope and distinguishes:
|
|
159
|
+
|
|
160
|
+
* `per-user`;
|
|
161
|
+
* `per-machine`;
|
|
162
|
+
* `dual-purpose`;
|
|
163
|
+
* `ambiguous`.
|
|
164
|
+
|
|
165
|
+
The `inconsistent-installation-scope` rule reports concrete conflicts between the declared installation context and component resources.
|
|
166
|
+
|
|
167
|
+
WhatYouShip also reports installation-scope changes when comparing MSI releases.
|
|
168
|
+
|
|
169
|
+
Because this is static analysis, runtime conditions and installer choices cannot always be resolved in advance.
|
|
170
|
+
|
|
171
|
+
## Reports
|
|
172
|
+
|
|
173
|
+
Use `-o` or `--output` to write a report to a file. The extension selects the format.
|
|
174
|
+
|
|
175
|
+
```text
|
|
176
|
+
whatyouship inspect release.zip -o inspect.json
|
|
177
|
+
whatyouship lint release.zip -o lint.csv
|
|
178
|
+
whatyouship compare previous.zip release.zip -o compare.txt
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Supported formats:
|
|
182
|
+
|
|
183
|
+
| Format | Inspect | Lint | Compare |
|
|
184
|
+
| ------- | ------- | ---- | ------- |
|
|
185
|
+
| `.txt` | Yes | Yes | Yes |
|
|
186
|
+
| `.json` | Yes | Yes | Yes |
|
|
187
|
+
| `.csv` | Yes | Yes | No |
|
|
188
|
+
|
|
189
|
+
Without `--output`, commands print text to stdout.
|
|
190
|
+
|
|
191
|
+
JSON reports contain structured data and include `schema_version`, `tool_version`, and the report type.
|
|
192
|
+
|
|
193
|
+
## CI and exit codes
|
|
194
|
+
|
|
195
|
+
`lint` can be used directly as a release gate.
|
|
196
|
+
|
|
197
|
+
```text
|
|
198
|
+
whatyouship lint release.msi --fail-on error
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Available thresholds:
|
|
202
|
+
|
|
203
|
+
```text
|
|
204
|
+
--fail-on error
|
|
205
|
+
--fail-on warning
|
|
206
|
+
--fail-on never
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The default is `--fail-on error`.
|
|
210
|
+
|
|
211
|
+
Exit codes:
|
|
212
|
+
|
|
213
|
+
* `0` — the release passes the selected threshold;
|
|
214
|
+
* `1` — lint findings reach the selected threshold;
|
|
215
|
+
* `2` — WhatYouShip cannot complete the operation because of an input, configuration, or tool error.
|
|
216
|
+
|
|
217
|
+
With `--baseline`, only **new** findings affect the lint exit code.
|
|
218
|
+
|
|
219
|
+
For example:
|
|
220
|
+
|
|
221
|
+
```text
|
|
222
|
+
whatyouship lint release.msi --baseline previous.msi --fail-on error -o lint.json
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Cache
|
|
226
|
+
|
|
227
|
+
WhatYouShip keeps its user data under:
|
|
228
|
+
|
|
229
|
+
```text
|
|
230
|
+
~/.whatyouship/
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Extracted artifacts are cached by SHA-256:
|
|
234
|
+
|
|
235
|
+
```text
|
|
236
|
+
~/.whatyouship/cache/msi/v1/
|
|
237
|
+
~/.whatyouship/cache/nsis/v1/
|
|
238
|
+
~/.whatyouship/cache/inno/v1/
|
|
239
|
+
~/.whatyouship/cache/zip/v1/
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
The cache avoids repeated extraction of the same artifact. Binary metadata and lint analysis are performed again on each run.
|
|
243
|
+
|
|
244
|
+
The cache hash identifies artifact content; it is not a signature or authenticity check.
|
|
245
|
+
|
|
246
|
+
On Windows, `~` refers to the user's profile directory.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["flit_core>=3.12,<5"]
|
|
3
|
+
build-backend = "flit_core.buildapi"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "whatyouship"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Know what you ship. Know what you install."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Nikolay Larin", email = "nikolay.larin@gmail.com" },
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
keywords = [
|
|
18
|
+
"release",
|
|
19
|
+
"artifacts",
|
|
20
|
+
"installer",
|
|
21
|
+
"linting",
|
|
22
|
+
"binary-analysis",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Development Status :: 4 - Beta",
|
|
27
|
+
"Environment :: Console",
|
|
28
|
+
"Intended Audience :: Developers",
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
31
|
+
"Topic :: Software Development :: Build Tools",
|
|
32
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
33
|
+
"Topic :: System :: Software Distribution",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
dependencies = [
|
|
37
|
+
"pymsi==0.0.0rc1",
|
|
38
|
+
"lief>=1.0,<2",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Repository = "https://github.com/nikolay-larin-b/whatyouship"
|
|
43
|
+
Issues = "https://github.com/nikolay-larin-b/whatyouship/issues"
|
|
44
|
+
|
|
45
|
+
[project.scripts]
|
|
46
|
+
whatyouship = "whatyouship.cli:main"
|
|
47
|
+
|
|
48
|
+
[tool.flit.module]
|
|
49
|
+
name = "whatyouship"
|