device-check-app 0.1.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.
- device_check_app-0.1.0/LICENSE +202 -0
- device_check_app-0.1.0/PKG-INFO +233 -0
- device_check_app-0.1.0/README.md +203 -0
- device_check_app-0.1.0/device_check/__init__.py +2 -0
- device_check_app-0.1.0/device_check/__main__.py +160 -0
- device_check_app-0.1.0/device_check/actions.py +241 -0
- device_check_app-0.1.0/device_check/app.py +111 -0
- device_check_app-0.1.0/device_check/audit.py +63 -0
- device_check_app-0.1.0/device_check/catalog.py +72 -0
- device_check_app-0.1.0/device_check/config.py +102 -0
- device_check_app-0.1.0/device_check/engine.py +204 -0
- device_check_app-0.1.0/device_check/models.py +107 -0
- device_check_app-0.1.0/device_check/notify.py +6 -0
- device_check_app-0.1.0/device_check/platforms.py +109 -0
- device_check_app-0.1.0/device_check/runner.py +43 -0
- device_check_app-0.1.0/device_check/service.py +255 -0
- device_check_app-0.1.0/device_check/sources/__init__.py +0 -0
- device_check_app-0.1.0/device_check/sources/apps.py +146 -0
- device_check_app-0.1.0/device_check/sources/apt.py +130 -0
- device_check_app-0.1.0/device_check/sources/base.py +62 -0
- device_check_app-0.1.0/device_check/sources/homebrew.py +107 -0
- device_check_app-0.1.0/device_check/sources/macos.py +62 -0
- device_check_app-0.1.0/device_check/sources/npm.py +59 -0
- device_check_app-0.1.0/device_check/sources/pip.py +68 -0
- device_check_app-0.1.0/device_check/sources/snap.py +77 -0
- device_check_app-0.1.0/device_check/sources/windows_update.py +50 -0
- device_check_app-0.1.0/device_check/sources/winget.py +103 -0
- device_check_app-0.1.0/device_check/static/index.html +278 -0
- device_check_app-0.1.0/device_check/versions.py +50 -0
- device_check_app-0.1.0/device_check/vulns.py +29 -0
- device_check_app-0.1.0/device_check_app.egg-info/PKG-INFO +233 -0
- device_check_app-0.1.0/device_check_app.egg-info/SOURCES.txt +38 -0
- device_check_app-0.1.0/device_check_app.egg-info/dependency_links.txt +1 -0
- device_check_app-0.1.0/device_check_app.egg-info/entry_points.txt +2 -0
- device_check_app-0.1.0/device_check_app.egg-info/requires.txt +7 -0
- device_check_app-0.1.0/device_check_app.egg-info/top_level.txt +1 -0
- device_check_app-0.1.0/pyproject.toml +54 -0
- device_check_app-0.1.0/setup.cfg +4 -0
- device_check_app-0.1.0/tests/test_device_check.py +356 -0
- device_check_app-0.1.0/tests/test_platforms.py +330 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: device-check-app
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Finds outdated and vulnerable software on macOS, Windows and Ubuntu, suggests what to fix first, and upgrades or uninstalls it only after you approve.
|
|
5
|
+
Author: pkshettypy
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/pkshettypy/it-command-center
|
|
8
|
+
Project-URL: Issues, https://github.com/pkshettypy/it-command-center/issues
|
|
9
|
+
Keywords: patch management,software updates,vulnerabilities,homebrew,winget,apt,security
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Web Environment
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: System Administrators
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Topic :: Security
|
|
19
|
+
Classifier: Topic :: System :: Software Distribution
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: fastapi>=0.110
|
|
24
|
+
Requires-Dist: uvicorn>=0.29
|
|
25
|
+
Requires-Dist: pydantic>=2.6
|
|
26
|
+
Requires-Dist: httpx>=0.27
|
|
27
|
+
Provides-Extra: test
|
|
28
|
+
Requires-Dist: pytest>=8.0; extra == "test"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# Device Check
|
|
32
|
+
|
|
33
|
+
Open it and it scans the computer it runs on (**macOS, Windows or Ubuntu**), with nothing to upload or configure. It finds every app and package that's out of date or has a known security issue, spots what you probably don't need any more, suggests what to do first, sends a desktop alert, and upgrades or uninstalls things once you approve.
|
|
34
|
+
|
|
35
|
+
It answers one question for whoever looks after a laptop: what's installed, how far behind is it, and what should I fix first?
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
Requires Python 3.10+. The easiest way is [pipx](https://pipx.pypa.io), which installs it in its own environment:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pipx install device-check-app
|
|
45
|
+
device-check
|
|
46
|
+
# your browser opens http://127.0.0.1:8710 and the scan starts on its own
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Until the first release is on PyPI, install it straight from GitHub instead: `pipx install git+https://github.com/pkshettypy/it-command-center`.
|
|
50
|
+
|
|
51
|
+
On Ubuntu, install pipx with `sudo apt install pipx`. On Windows, use `py -m pip install --user pipx` then `py -m pipx install device-check-app`.
|
|
52
|
+
|
|
53
|
+
## Run it from source
|
|
54
|
+
|
|
55
|
+
**macOS or Ubuntu**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git clone git@github.com:pkshettypy/it-command-center.git
|
|
59
|
+
cd it-command-center
|
|
60
|
+
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
|
|
61
|
+
.venv/bin/python -m device_check
|
|
62
|
+
# your browser opens http://127.0.0.1:8710 and the scan starts on its own
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
On Ubuntu, if `python3 -m venv` fails, install it first with `sudo apt install python3-venv`.
|
|
66
|
+
|
|
67
|
+
**Windows** (PowerShell)
|
|
68
|
+
|
|
69
|
+
```powershell
|
|
70
|
+
git clone https://github.com/pkshettypy/it-command-center.git
|
|
71
|
+
cd it-command-center
|
|
72
|
+
py -m venv .venv; .venv\Scripts\pip install -r requirements.txt
|
|
73
|
+
.venv\Scripts\python -m device_check
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Other commands. With pipx, use `device-check` in place of `python -m device_check`:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
device-check scan # scan once in the terminal, no dashboard
|
|
80
|
+
device-check install-agent # scan at login and at 9:30 every day, alert if anything needs updating
|
|
81
|
+
device-check remove-agent # stop the scheduled scan
|
|
82
|
+
device-check --version
|
|
83
|
+
.venv/bin/python -m pytest -q # tests, from source (simulated machines, nothing on your computer is touched)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Every push to GitHub also runs the tests and a real, read-only scan on fresh Ubuntu, Windows and macOS machines (`.github/workflows/tests.yml`).
|
|
87
|
+
|
|
88
|
+
## What it scans
|
|
89
|
+
|
|
90
|
+
| | macOS | Windows | Ubuntu |
|
|
91
|
+
|---|---|---|---|
|
|
92
|
+
| **System updates** | Software Update (`softwareupdate -l`) | Windows Update (Windows' own update API) | apt updates, with security updates marked |
|
|
93
|
+
| **Apps** | `/Applications` (each app's `Info.plist`, compared with Homebrew's public app catalog), App Store (with `mas`) | winget: everything in Apps & features | apt packages you installed, Snap |
|
|
94
|
+
| **Developer tools** | Homebrew, pip, npm | pip, npm | pip, npm, Homebrew if installed |
|
|
95
|
+
| **Known security issues** | Python and npm packages, via [OSV.dev](https://osv.dev) | same | same, plus Ubuntu's own security updates |
|
|
96
|
+
| **Alerts** | Notification Center | Windows notification | Desktop notification (`notify-send`) |
|
|
97
|
+
| **Daily scan** (`install-agent`) | launchd | Task Scheduler | systemd user timer |
|
|
98
|
+
|
|
99
|
+
A missing tool (no npm, say) is shown as skipped, not as an error.
|
|
100
|
+
|
|
101
|
+
### How each one is updated
|
|
102
|
+
|
|
103
|
+
| Where | Upgrade | Undo |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| macOS updates | Opens System Settings > Software Update; you press Update | Nothing changes until you do |
|
|
106
|
+
| Windows Update | Opens Settings > Windows Update; you press Install | Nothing changes until you do |
|
|
107
|
+
| Mac apps | Opens the app so its own updater runs, or the App Store's Updates page | — |
|
|
108
|
+
| winget (Windows apps) | `winget upgrade --id … --silent`. If the installer needs admin rights, Windows asks | Not offered: many apps can't go back |
|
|
109
|
+
| apt (Ubuntu) | `sudo apt-get install --only-upgrade` | Not offered: apt can't go back |
|
|
110
|
+
| Snap | `sudo snap refresh` | `snap revert` puts back the previous version |
|
|
111
|
+
| Homebrew | `brew upgrade` | Not offered: Homebrew can't go back |
|
|
112
|
+
| Python / Node.js | `pip install name==version` / `npm install -g name@version` | Reinstalls the old version |
|
|
113
|
+
|
|
114
|
+
**Ubuntu and passwords.** apt and Snap changes need admin rights, and Device Check never asks for your password. It runs them with `sudo -n`, which works straight away if your sudo needs no password, and otherwise stops at once and offers **Run in Terminal**. There's also **Run all Ubuntu updates in Terminal**, which opens a terminal with `sudo apt-get update && sudo apt-get upgrade` ready to go. Ubuntu's Software Updater works too.
|
|
115
|
+
|
|
116
|
+
## Uninstalling what you don't need
|
|
117
|
+
|
|
118
|
+
Every item in **Everything installed** has an **Uninstall** button when it's safe to remove. Like upgrades, it shows exactly what will happen and runs only after you approve.
|
|
119
|
+
|
|
120
|
+
| Where | How it's removed | Undo | Never removed |
|
|
121
|
+
|---|---|---|---|
|
|
122
|
+
| Mac apps | Moved to the Trash by Finder (it asks for your password if the app was installed for all users) | Moves it back from the Trash | Apple's built-in apps, like Safari |
|
|
123
|
+
| Windows apps | The app's own uninstaller, through `winget uninstall` | Reinstalls the same version with winget | Runtimes and Windows parts (Visual C++, .NET, WebView2, Edge, winget itself), and anything winget can't identify exactly |
|
|
124
|
+
| apt | `sudo apt-get remove` (settings files stay) | Reinstalls it | Essential and required packages, the kernel, sudo, systemd and the desktop; packages installed only for others; and anything whose removal would take other packages with it (checked with apt's dry run first) |
|
|
125
|
+
| Snap | `sudo snap remove` (Snap keeps a data snapshot for 31 days) | Reinstalls it | Base and platform snaps other snaps are built on |
|
|
126
|
+
| Homebrew | `brew uninstall` | Reinstalls the newest version | Packages other Homebrew packages need |
|
|
127
|
+
| Python | `pip uninstall` | Reinstalls the same version | Packages other packages need, and pip, setuptools and wheel |
|
|
128
|
+
| Node.js | `npm uninstall -g` | Reinstalls the same version | npm itself |
|
|
129
|
+
|
|
130
|
+
**Probably not needed** (a filter in Everything installed, and a suggestion at the top):
|
|
131
|
+
|
|
132
|
+
- Mac apps you haven't opened in 3 months or more (macOS records when each app was last opened), and
|
|
133
|
+
- packages that were only installed for something else and that nothing uses any more (Homebrew's `brew leaves --installed-as-dependency`, apt's `autoremove` list).
|
|
134
|
+
|
|
135
|
+
It's only a hint. You decide what goes.
|
|
136
|
+
|
|
137
|
+
## How findings are ranked
|
|
138
|
+
|
|
139
|
+
| Finding | Severity |
|
|
140
|
+
|---|---|
|
|
141
|
+
| macOS or Windows update available | High (Windows Defender definition updates: Medium) |
|
|
142
|
+
| Ubuntu security update | High |
|
|
143
|
+
| Package with a published vulnerability | High |
|
|
144
|
+
| Major version behind (e.g. 22 → 24) | Medium. Upgrade one at a time and test |
|
|
145
|
+
| Minor or patch version behind | Low. Safe to batch |
|
|
146
|
+
| Newer app version in the catalog | Low |
|
|
147
|
+
|
|
148
|
+
The suggestions at the top put these in order. **Upgrade all low-risk** runs every patch and minor upgrade, plus any upgrade that fixes a security issue. It shows you the full list before anything runs. apt and Snap aren't in the batch, because each change needs your password; use **Run all … updates in Terminal** for those.
|
|
149
|
+
|
|
150
|
+
## Safety design
|
|
151
|
+
|
|
152
|
+
- **A person approves every change.** Scanning only reads. Upgrades and removals run only after you press **Approve**, or confirm the low-risk batch list.
|
|
153
|
+
- **You see the exact command first**, and whether it can be undone.
|
|
154
|
+
- **One change at a time**, in the background, so the page stays usable.
|
|
155
|
+
- **Fresh check before acting.** Right before a change it re-reads the installed version. If it changed since the scan, nothing runs.
|
|
156
|
+
- **Undo where it's real** (see the tables above). Where a change can't be undone, the page says so before you approve.
|
|
157
|
+
- **Never asks for your password.** When a change needs admin rights it stops and offers **Run in Terminal**: Terminal on macOS, your desktop's terminal on Ubuntu, or an administrator PowerShell on Windows (Windows asks for permission first). You enter your password there, never in the page.
|
|
158
|
+
- **Counts dependencies correctly.** Upgrading one package often upgrades others it depends on. When it reaches those, they're already new, so they're marked done ("upgraded along with another package") and nothing runs twice.
|
|
159
|
+
- **When in doubt, it doesn't remove.** If it can't tell whether other software depends on something, the Uninstall button doesn't appear.
|
|
160
|
+
- **Pinned and protected items are never touched.** Homebrew pins are respected. Add your own names to `DEVICE_CHECK_PROTECTED`.
|
|
161
|
+
- **No shell.** Commands are run as argument lists, and package names or IDs with unusual characters are refused. Text for notifications and terminals is passed as arguments or environment variables, never pasted into scripts.
|
|
162
|
+
- **Other websites can't use it.** The dashboard only listens on 127.0.0.1, only answers to `localhost` names, and every API call needs a secret token created at launch.
|
|
163
|
+
- **Tamper-evident log.** Every scan, approval and result is chained by hash. The Activity log tab shows whether the chain is intact.
|
|
164
|
+
- **What leaves the machine:** package names and versions go to OSV.dev for the security check, and on macOS the public Homebrew app catalog is downloaded. Nothing else. Turn either off below.
|
|
165
|
+
- **No tracking.** The app sends no usage data, analytics or crash reports anywhere.
|
|
166
|
+
|
|
167
|
+
## Settings (all optional)
|
|
168
|
+
|
|
169
|
+
| Variable | Default | What it does |
|
|
170
|
+
|---|---|---|
|
|
171
|
+
| `DEVICE_CHECK_PORT` | `8710` | Dashboard port |
|
|
172
|
+
| `DEVICE_CHECK_PROTECTED` | empty | Comma list of names never to change, e.g. `python@3.12,postgresql@16` |
|
|
173
|
+
| `DEVICE_CHECK_RESCAN_HOURS` | `6` | Rescan while the dashboard is open. `0` turns it off |
|
|
174
|
+
| `DEVICE_CHECK_NOTIFY` | `1` | Desktop alert when a scan finds something new |
|
|
175
|
+
| `DEVICE_CHECK_BREW_UPDATE` | `1` | Run `brew update` before checking |
|
|
176
|
+
| `DEVICE_CHECK_VULN_LOOKUP` | `1` | Ask OSV.dev about known security issues |
|
|
177
|
+
| `DEVICE_CHECK_APP_CATALOG` | `1` | Download Homebrew's public app catalog (macOS) |
|
|
178
|
+
| `DEVICE_CHECK_PIP` | first of `pip3`, `pip` | Which pip to check |
|
|
179
|
+
| `DEVICE_CHECK_OPEN_BROWSER` | `1` | Open the dashboard when it starts |
|
|
180
|
+
| `DEVICE_CHECK_DATA_DIR` | your user data folder | State, log and catalog cache. Defaults to `~/Library/Application Support/Device Check` (macOS), `%LOCALAPPDATA%\Device Check` (Windows) or `~/.local/share/device-check` (Linux). A source checkout that already has a `./data` folder keeps using it |
|
|
181
|
+
| `DEVICE_CHECK_PILOT_URL` | empty (link hidden) | Where the "Join the team pilot" link goes. Must start with `https://` |
|
|
182
|
+
|
|
183
|
+
## Known limits
|
|
184
|
+
|
|
185
|
+
- **Windows and Ubuntu support is new.** It's built to the documented output of winget, Windows Update, apt and Snap, tested against simulated machines (`tests/test_platforms.py`), and scanned read-only on fresh GitHub-hosted Ubuntu and Windows machines on every push. It hasn't yet been used on someone's everyday Windows or Ubuntu computer, and upgrades and removals there haven't been tried for real. macOS runs on a real Mac.
|
|
186
|
+
- Ubuntu means Ubuntu and other apt-based systems (Debian, Mint, Pop!_OS). Fedora (dnf), Arch (pacman) and Flatpak aren't covered yet.
|
|
187
|
+
- apt reads its own update list, which Ubuntu refreshes daily. **Run all Ubuntu updates in Terminal** runs `apt-get update` first.
|
|
188
|
+
- winget shortens long IDs with "…" in its output. Those apps are listed, but never upgraded or removed from here.
|
|
189
|
+
- Windows Update can take a minute or two to search.
|
|
190
|
+
- One machine, one person. There's no central view of a whole company's laptops yet.
|
|
191
|
+
- Mac app versions are compared with Homebrew's catalog, which is very good but not perfect. About 1 in 30 apps isn't in it, and odd version formats can be misread.
|
|
192
|
+
- Only one Python is checked (the pip on your PATH). Virtual environments and other Pythons aren't.
|
|
193
|
+
- On macOS, npm global installs in `/usr/local` need admin rights when Node.js came from the nodejs.org installer. To avoid this, install Node.js with Homebrew or nvm, which keep global packages in folders you own.
|
|
194
|
+
- Removing a Mac app through Finder needs a one-time macOS permission (Privacy & Security > Automation). macOS asks the first time.
|
|
195
|
+
- "Not opened in 3 months" is macOS only for now, and relies on macOS's own record (Spotlight).
|
|
196
|
+
- OSV.dev covers Python and npm. Homebrew, winget and Mac app vulnerabilities aren't checked yet.
|
|
197
|
+
|
|
198
|
+
## Project layout
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
device_check/
|
|
202
|
+
sources/ one file per place software lives
|
|
203
|
+
macos.py apps.py macOS updates, /Applications
|
|
204
|
+
windows_update.py winget.py Windows Update, Windows apps
|
|
205
|
+
apt.py snap.py Ubuntu
|
|
206
|
+
homebrew.py pip.py npm.py all systems
|
|
207
|
+
platforms.py what differs per OS: names, opening things, terminals, notifications
|
|
208
|
+
catalog.py Homebrew public app catalog, cached
|
|
209
|
+
vulns.py OSV.dev security lookup
|
|
210
|
+
versions.py tolerant version comparison
|
|
211
|
+
engine.py findings, severity and suggestions
|
|
212
|
+
actions.py prepare / approve / run / undo, with the safety rules
|
|
213
|
+
audit.py hash-chained activity log
|
|
214
|
+
service.py state, background scans, alerts
|
|
215
|
+
app.py dashboard and JSON API, with the localhost and token guard
|
|
216
|
+
tests/ 45 tests against simulated Mac, Ubuntu and Windows machines
|
|
217
|
+
docs/ dashboard screenshot
|
|
218
|
+
.github/ tests and real scans on every push; publishing to PyPI on each release
|
|
219
|
+
pyproject.toml packaging (installs the `device-check` command)
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Next steps
|
|
223
|
+
|
|
224
|
+
1. Try it on a real Windows 11 laptop and a real Ubuntu 24.04 machine, and fix what comes up.
|
|
225
|
+
2. A small agent on each laptop that reports to one central dashboard, so IT sees every machine.
|
|
226
|
+
3. Fedora (dnf), Flatpak, and the Microsoft Store.
|
|
227
|
+
4. Policies: "Chrome must be within 2 versions", "no unsupported OS", with alerts to Slack or Teams.
|
|
228
|
+
5. Check more of what's installed for known vulnerabilities (Homebrew, winget, apps), and flag software that's no longer supported.
|
|
229
|
+
6. Shadow AI: flag AI apps, browser extensions and command-line tools nobody approved.
|
|
230
|
+
|
|
231
|
+
## Licence
|
|
232
|
+
|
|
233
|
+
Apache License 2.0. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Device Check
|
|
2
|
+
|
|
3
|
+
Open it and it scans the computer it runs on (**macOS, Windows or Ubuntu**), with nothing to upload or configure. It finds every app and package that's out of date or has a known security issue, spots what you probably don't need any more, suggests what to do first, sends a desktop alert, and upgrades or uninstalls things once you approve.
|
|
4
|
+
|
|
5
|
+
It answers one question for whoever looks after a laptop: what's installed, how far behind is it, and what should I fix first?
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Requires Python 3.10+. The easiest way is [pipx](https://pipx.pypa.io), which installs it in its own environment:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pipx install device-check-app
|
|
15
|
+
device-check
|
|
16
|
+
# your browser opens http://127.0.0.1:8710 and the scan starts on its own
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Until the first release is on PyPI, install it straight from GitHub instead: `pipx install git+https://github.com/pkshettypy/it-command-center`.
|
|
20
|
+
|
|
21
|
+
On Ubuntu, install pipx with `sudo apt install pipx`. On Windows, use `py -m pip install --user pipx` then `py -m pipx install device-check-app`.
|
|
22
|
+
|
|
23
|
+
## Run it from source
|
|
24
|
+
|
|
25
|
+
**macOS or Ubuntu**
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone git@github.com:pkshettypy/it-command-center.git
|
|
29
|
+
cd it-command-center
|
|
30
|
+
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
|
|
31
|
+
.venv/bin/python -m device_check
|
|
32
|
+
# your browser opens http://127.0.0.1:8710 and the scan starts on its own
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
On Ubuntu, if `python3 -m venv` fails, install it first with `sudo apt install python3-venv`.
|
|
36
|
+
|
|
37
|
+
**Windows** (PowerShell)
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
git clone https://github.com/pkshettypy/it-command-center.git
|
|
41
|
+
cd it-command-center
|
|
42
|
+
py -m venv .venv; .venv\Scripts\pip install -r requirements.txt
|
|
43
|
+
.venv\Scripts\python -m device_check
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Other commands. With pipx, use `device-check` in place of `python -m device_check`:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
device-check scan # scan once in the terminal, no dashboard
|
|
50
|
+
device-check install-agent # scan at login and at 9:30 every day, alert if anything needs updating
|
|
51
|
+
device-check remove-agent # stop the scheduled scan
|
|
52
|
+
device-check --version
|
|
53
|
+
.venv/bin/python -m pytest -q # tests, from source (simulated machines, nothing on your computer is touched)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Every push to GitHub also runs the tests and a real, read-only scan on fresh Ubuntu, Windows and macOS machines (`.github/workflows/tests.yml`).
|
|
57
|
+
|
|
58
|
+
## What it scans
|
|
59
|
+
|
|
60
|
+
| | macOS | Windows | Ubuntu |
|
|
61
|
+
|---|---|---|---|
|
|
62
|
+
| **System updates** | Software Update (`softwareupdate -l`) | Windows Update (Windows' own update API) | apt updates, with security updates marked |
|
|
63
|
+
| **Apps** | `/Applications` (each app's `Info.plist`, compared with Homebrew's public app catalog), App Store (with `mas`) | winget: everything in Apps & features | apt packages you installed, Snap |
|
|
64
|
+
| **Developer tools** | Homebrew, pip, npm | pip, npm | pip, npm, Homebrew if installed |
|
|
65
|
+
| **Known security issues** | Python and npm packages, via [OSV.dev](https://osv.dev) | same | same, plus Ubuntu's own security updates |
|
|
66
|
+
| **Alerts** | Notification Center | Windows notification | Desktop notification (`notify-send`) |
|
|
67
|
+
| **Daily scan** (`install-agent`) | launchd | Task Scheduler | systemd user timer |
|
|
68
|
+
|
|
69
|
+
A missing tool (no npm, say) is shown as skipped, not as an error.
|
|
70
|
+
|
|
71
|
+
### How each one is updated
|
|
72
|
+
|
|
73
|
+
| Where | Upgrade | Undo |
|
|
74
|
+
|---|---|---|
|
|
75
|
+
| macOS updates | Opens System Settings > Software Update; you press Update | Nothing changes until you do |
|
|
76
|
+
| Windows Update | Opens Settings > Windows Update; you press Install | Nothing changes until you do |
|
|
77
|
+
| Mac apps | Opens the app so its own updater runs, or the App Store's Updates page | — |
|
|
78
|
+
| winget (Windows apps) | `winget upgrade --id … --silent`. If the installer needs admin rights, Windows asks | Not offered: many apps can't go back |
|
|
79
|
+
| apt (Ubuntu) | `sudo apt-get install --only-upgrade` | Not offered: apt can't go back |
|
|
80
|
+
| Snap | `sudo snap refresh` | `snap revert` puts back the previous version |
|
|
81
|
+
| Homebrew | `brew upgrade` | Not offered: Homebrew can't go back |
|
|
82
|
+
| Python / Node.js | `pip install name==version` / `npm install -g name@version` | Reinstalls the old version |
|
|
83
|
+
|
|
84
|
+
**Ubuntu and passwords.** apt and Snap changes need admin rights, and Device Check never asks for your password. It runs them with `sudo -n`, which works straight away if your sudo needs no password, and otherwise stops at once and offers **Run in Terminal**. There's also **Run all Ubuntu updates in Terminal**, which opens a terminal with `sudo apt-get update && sudo apt-get upgrade` ready to go. Ubuntu's Software Updater works too.
|
|
85
|
+
|
|
86
|
+
## Uninstalling what you don't need
|
|
87
|
+
|
|
88
|
+
Every item in **Everything installed** has an **Uninstall** button when it's safe to remove. Like upgrades, it shows exactly what will happen and runs only after you approve.
|
|
89
|
+
|
|
90
|
+
| Where | How it's removed | Undo | Never removed |
|
|
91
|
+
|---|---|---|---|
|
|
92
|
+
| Mac apps | Moved to the Trash by Finder (it asks for your password if the app was installed for all users) | Moves it back from the Trash | Apple's built-in apps, like Safari |
|
|
93
|
+
| Windows apps | The app's own uninstaller, through `winget uninstall` | Reinstalls the same version with winget | Runtimes and Windows parts (Visual C++, .NET, WebView2, Edge, winget itself), and anything winget can't identify exactly |
|
|
94
|
+
| apt | `sudo apt-get remove` (settings files stay) | Reinstalls it | Essential and required packages, the kernel, sudo, systemd and the desktop; packages installed only for others; and anything whose removal would take other packages with it (checked with apt's dry run first) |
|
|
95
|
+
| Snap | `sudo snap remove` (Snap keeps a data snapshot for 31 days) | Reinstalls it | Base and platform snaps other snaps are built on |
|
|
96
|
+
| Homebrew | `brew uninstall` | Reinstalls the newest version | Packages other Homebrew packages need |
|
|
97
|
+
| Python | `pip uninstall` | Reinstalls the same version | Packages other packages need, and pip, setuptools and wheel |
|
|
98
|
+
| Node.js | `npm uninstall -g` | Reinstalls the same version | npm itself |
|
|
99
|
+
|
|
100
|
+
**Probably not needed** (a filter in Everything installed, and a suggestion at the top):
|
|
101
|
+
|
|
102
|
+
- Mac apps you haven't opened in 3 months or more (macOS records when each app was last opened), and
|
|
103
|
+
- packages that were only installed for something else and that nothing uses any more (Homebrew's `brew leaves --installed-as-dependency`, apt's `autoremove` list).
|
|
104
|
+
|
|
105
|
+
It's only a hint. You decide what goes.
|
|
106
|
+
|
|
107
|
+
## How findings are ranked
|
|
108
|
+
|
|
109
|
+
| Finding | Severity |
|
|
110
|
+
|---|---|
|
|
111
|
+
| macOS or Windows update available | High (Windows Defender definition updates: Medium) |
|
|
112
|
+
| Ubuntu security update | High |
|
|
113
|
+
| Package with a published vulnerability | High |
|
|
114
|
+
| Major version behind (e.g. 22 → 24) | Medium. Upgrade one at a time and test |
|
|
115
|
+
| Minor or patch version behind | Low. Safe to batch |
|
|
116
|
+
| Newer app version in the catalog | Low |
|
|
117
|
+
|
|
118
|
+
The suggestions at the top put these in order. **Upgrade all low-risk** runs every patch and minor upgrade, plus any upgrade that fixes a security issue. It shows you the full list before anything runs. apt and Snap aren't in the batch, because each change needs your password; use **Run all … updates in Terminal** for those.
|
|
119
|
+
|
|
120
|
+
## Safety design
|
|
121
|
+
|
|
122
|
+
- **A person approves every change.** Scanning only reads. Upgrades and removals run only after you press **Approve**, or confirm the low-risk batch list.
|
|
123
|
+
- **You see the exact command first**, and whether it can be undone.
|
|
124
|
+
- **One change at a time**, in the background, so the page stays usable.
|
|
125
|
+
- **Fresh check before acting.** Right before a change it re-reads the installed version. If it changed since the scan, nothing runs.
|
|
126
|
+
- **Undo where it's real** (see the tables above). Where a change can't be undone, the page says so before you approve.
|
|
127
|
+
- **Never asks for your password.** When a change needs admin rights it stops and offers **Run in Terminal**: Terminal on macOS, your desktop's terminal on Ubuntu, or an administrator PowerShell on Windows (Windows asks for permission first). You enter your password there, never in the page.
|
|
128
|
+
- **Counts dependencies correctly.** Upgrading one package often upgrades others it depends on. When it reaches those, they're already new, so they're marked done ("upgraded along with another package") and nothing runs twice.
|
|
129
|
+
- **When in doubt, it doesn't remove.** If it can't tell whether other software depends on something, the Uninstall button doesn't appear.
|
|
130
|
+
- **Pinned and protected items are never touched.** Homebrew pins are respected. Add your own names to `DEVICE_CHECK_PROTECTED`.
|
|
131
|
+
- **No shell.** Commands are run as argument lists, and package names or IDs with unusual characters are refused. Text for notifications and terminals is passed as arguments or environment variables, never pasted into scripts.
|
|
132
|
+
- **Other websites can't use it.** The dashboard only listens on 127.0.0.1, only answers to `localhost` names, and every API call needs a secret token created at launch.
|
|
133
|
+
- **Tamper-evident log.** Every scan, approval and result is chained by hash. The Activity log tab shows whether the chain is intact.
|
|
134
|
+
- **What leaves the machine:** package names and versions go to OSV.dev for the security check, and on macOS the public Homebrew app catalog is downloaded. Nothing else. Turn either off below.
|
|
135
|
+
- **No tracking.** The app sends no usage data, analytics or crash reports anywhere.
|
|
136
|
+
|
|
137
|
+
## Settings (all optional)
|
|
138
|
+
|
|
139
|
+
| Variable | Default | What it does |
|
|
140
|
+
|---|---|---|
|
|
141
|
+
| `DEVICE_CHECK_PORT` | `8710` | Dashboard port |
|
|
142
|
+
| `DEVICE_CHECK_PROTECTED` | empty | Comma list of names never to change, e.g. `python@3.12,postgresql@16` |
|
|
143
|
+
| `DEVICE_CHECK_RESCAN_HOURS` | `6` | Rescan while the dashboard is open. `0` turns it off |
|
|
144
|
+
| `DEVICE_CHECK_NOTIFY` | `1` | Desktop alert when a scan finds something new |
|
|
145
|
+
| `DEVICE_CHECK_BREW_UPDATE` | `1` | Run `brew update` before checking |
|
|
146
|
+
| `DEVICE_CHECK_VULN_LOOKUP` | `1` | Ask OSV.dev about known security issues |
|
|
147
|
+
| `DEVICE_CHECK_APP_CATALOG` | `1` | Download Homebrew's public app catalog (macOS) |
|
|
148
|
+
| `DEVICE_CHECK_PIP` | first of `pip3`, `pip` | Which pip to check |
|
|
149
|
+
| `DEVICE_CHECK_OPEN_BROWSER` | `1` | Open the dashboard when it starts |
|
|
150
|
+
| `DEVICE_CHECK_DATA_DIR` | your user data folder | State, log and catalog cache. Defaults to `~/Library/Application Support/Device Check` (macOS), `%LOCALAPPDATA%\Device Check` (Windows) or `~/.local/share/device-check` (Linux). A source checkout that already has a `./data` folder keeps using it |
|
|
151
|
+
| `DEVICE_CHECK_PILOT_URL` | empty (link hidden) | Where the "Join the team pilot" link goes. Must start with `https://` |
|
|
152
|
+
|
|
153
|
+
## Known limits
|
|
154
|
+
|
|
155
|
+
- **Windows and Ubuntu support is new.** It's built to the documented output of winget, Windows Update, apt and Snap, tested against simulated machines (`tests/test_platforms.py`), and scanned read-only on fresh GitHub-hosted Ubuntu and Windows machines on every push. It hasn't yet been used on someone's everyday Windows or Ubuntu computer, and upgrades and removals there haven't been tried for real. macOS runs on a real Mac.
|
|
156
|
+
- Ubuntu means Ubuntu and other apt-based systems (Debian, Mint, Pop!_OS). Fedora (dnf), Arch (pacman) and Flatpak aren't covered yet.
|
|
157
|
+
- apt reads its own update list, which Ubuntu refreshes daily. **Run all Ubuntu updates in Terminal** runs `apt-get update` first.
|
|
158
|
+
- winget shortens long IDs with "…" in its output. Those apps are listed, but never upgraded or removed from here.
|
|
159
|
+
- Windows Update can take a minute or two to search.
|
|
160
|
+
- One machine, one person. There's no central view of a whole company's laptops yet.
|
|
161
|
+
- Mac app versions are compared with Homebrew's catalog, which is very good but not perfect. About 1 in 30 apps isn't in it, and odd version formats can be misread.
|
|
162
|
+
- Only one Python is checked (the pip on your PATH). Virtual environments and other Pythons aren't.
|
|
163
|
+
- On macOS, npm global installs in `/usr/local` need admin rights when Node.js came from the nodejs.org installer. To avoid this, install Node.js with Homebrew or nvm, which keep global packages in folders you own.
|
|
164
|
+
- Removing a Mac app through Finder needs a one-time macOS permission (Privacy & Security > Automation). macOS asks the first time.
|
|
165
|
+
- "Not opened in 3 months" is macOS only for now, and relies on macOS's own record (Spotlight).
|
|
166
|
+
- OSV.dev covers Python and npm. Homebrew, winget and Mac app vulnerabilities aren't checked yet.
|
|
167
|
+
|
|
168
|
+
## Project layout
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
device_check/
|
|
172
|
+
sources/ one file per place software lives
|
|
173
|
+
macos.py apps.py macOS updates, /Applications
|
|
174
|
+
windows_update.py winget.py Windows Update, Windows apps
|
|
175
|
+
apt.py snap.py Ubuntu
|
|
176
|
+
homebrew.py pip.py npm.py all systems
|
|
177
|
+
platforms.py what differs per OS: names, opening things, terminals, notifications
|
|
178
|
+
catalog.py Homebrew public app catalog, cached
|
|
179
|
+
vulns.py OSV.dev security lookup
|
|
180
|
+
versions.py tolerant version comparison
|
|
181
|
+
engine.py findings, severity and suggestions
|
|
182
|
+
actions.py prepare / approve / run / undo, with the safety rules
|
|
183
|
+
audit.py hash-chained activity log
|
|
184
|
+
service.py state, background scans, alerts
|
|
185
|
+
app.py dashboard and JSON API, with the localhost and token guard
|
|
186
|
+
tests/ 45 tests against simulated Mac, Ubuntu and Windows machines
|
|
187
|
+
docs/ dashboard screenshot
|
|
188
|
+
.github/ tests and real scans on every push; publishing to PyPI on each release
|
|
189
|
+
pyproject.toml packaging (installs the `device-check` command)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Next steps
|
|
193
|
+
|
|
194
|
+
1. Try it on a real Windows 11 laptop and a real Ubuntu 24.04 machine, and fix what comes up.
|
|
195
|
+
2. A small agent on each laptop that reports to one central dashboard, so IT sees every machine.
|
|
196
|
+
3. Fedora (dnf), Flatpak, and the Microsoft Store.
|
|
197
|
+
4. Policies: "Chrome must be within 2 versions", "no unsupported OS", with alerts to Slack or Teams.
|
|
198
|
+
5. Check more of what's installed for known vulnerabilities (Homebrew, winget, apps), and flag software that's no longer supported.
|
|
199
|
+
6. Shadow AI: flag AI apps, browser extensions and command-line tools nobody approved.
|
|
200
|
+
|
|
201
|
+
## Licence
|
|
202
|
+
|
|
203
|
+
Apache License 2.0. See [LICENSE](LICENSE).
|