devaudit-cli 0.3.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.
- devaudit_cli-0.3.0/LICENSE +21 -0
- devaudit_cli-0.3.0/PKG-INFO +347 -0
- devaudit_cli-0.3.0/README.md +327 -0
- devaudit_cli-0.3.0/pyproject.toml +43 -0
- devaudit_cli-0.3.0/setup.cfg +4 -0
- devaudit_cli-0.3.0/src/dev_audit/__init__.py +0 -0
- devaudit_cli-0.3.0/src/dev_audit/__main__.py +4 -0
- devaudit_cli-0.3.0/src/dev_audit/audit.py +51 -0
- devaudit_cli-0.3.0/src/dev_audit/cli.py +110 -0
- devaudit_cli-0.3.0/src/dev_audit/collectors/__init__.py +0 -0
- devaudit_cli-0.3.0/src/dev_audit/collectors/devtools.py +113 -0
- devaudit_cli-0.3.0/src/dev_audit/collectors/network.py +172 -0
- devaudit_cli-0.3.0/src/dev_audit/collectors/resources.py +154 -0
- devaudit_cli-0.3.0/src/dev_audit/collectors/system.py +72 -0
- devaudit_cli-0.3.0/src/dev_audit/command.py +51 -0
- devaudit_cli-0.3.0/src/dev_audit/output.py +273 -0
- devaudit_cli-0.3.0/src/dev_audit/status.py +30 -0
- devaudit_cli-0.3.0/src/devaudit_cli.egg-info/PKG-INFO +347 -0
- devaudit_cli-0.3.0/src/devaudit_cli.egg-info/SOURCES.txt +29 -0
- devaudit_cli-0.3.0/src/devaudit_cli.egg-info/dependency_links.txt +1 -0
- devaudit_cli-0.3.0/src/devaudit_cli.egg-info/entry_points.txt +2 -0
- devaudit_cli-0.3.0/src/devaudit_cli.egg-info/top_level.txt +1 -0
- devaudit_cli-0.3.0/tests/test_audit.py +112 -0
- devaudit_cli-0.3.0/tests/test_cli.py +209 -0
- devaudit_cli-0.3.0/tests/test_command.py +20 -0
- devaudit_cli-0.3.0/tests/test_devtools.py +154 -0
- devaudit_cli-0.3.0/tests/test_network.py +67 -0
- devaudit_cli-0.3.0/tests/test_output.py +72 -0
- devaudit_cli-0.3.0/tests/test_resources.py +52 -0
- devaudit_cli-0.3.0/tests/test_status.py +58 -0
- devaudit_cli-0.3.0/tests/test_system.py +35 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Brenda Bonareri
|
|
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,347 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devaudit-cli
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Linux system inspection and developer environment audit tool
|
|
5
|
+
Author-email: Brenda Bonareri <bonarerijb24@gmail.com>
|
|
6
|
+
Keywords: linux,audit,cli,diagnostics,system-monitoring
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# dev-audit
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+

|
|
26
|
+

|
|
27
|
+

|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
## Project Status
|
|
31
|
+
|
|
32
|
+
**Current Release:** v0.3.0
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* Linux system inspection
|
|
37
|
+
* Resource monitoring
|
|
38
|
+
* Network auditing
|
|
39
|
+
* Developer tool validation
|
|
40
|
+
* Audit findings engine
|
|
41
|
+
* JSON output support
|
|
42
|
+
* Verbose output support
|
|
43
|
+
* Exit code support for automation
|
|
44
|
+
* GitHub Actions CI/CD
|
|
45
|
+
|
|
46
|
+
### Quality Metrics
|
|
47
|
+
|
|
48
|
+
* 44 passing tests
|
|
49
|
+
* 50% code coverage
|
|
50
|
+
* Automated CI validation
|
|
51
|
+
* Semantic versioning
|
|
52
|
+
* Tagged releases
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
A Linux system inspection and diagnostic CLI built for Ubuntu environments.
|
|
56
|
+
|
|
57
|
+
`dev-audit` collects system information, resource metrics, network configuration, and developer environment details, then evaluates the results against audit rules to identify potential issues.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
### System Audit
|
|
64
|
+
|
|
65
|
+
* Operating system information
|
|
66
|
+
* Kernel version
|
|
67
|
+
* Hostname
|
|
68
|
+
* Architecture
|
|
69
|
+
* User and shell
|
|
70
|
+
* System uptime
|
|
71
|
+
|
|
72
|
+
### Resource Audit
|
|
73
|
+
|
|
74
|
+
* CPU core count
|
|
75
|
+
* Load averages
|
|
76
|
+
* Memory utilization
|
|
77
|
+
* Swap utilization
|
|
78
|
+
* Root filesystem usage
|
|
79
|
+
|
|
80
|
+
### Network Audit
|
|
81
|
+
|
|
82
|
+
* Network interfaces
|
|
83
|
+
* Default route
|
|
84
|
+
* DNS configuration
|
|
85
|
+
* Listening TCP and UDP ports
|
|
86
|
+
|
|
87
|
+
### Developer Environment Audit
|
|
88
|
+
|
|
89
|
+
* Python
|
|
90
|
+
* pip
|
|
91
|
+
* Git
|
|
92
|
+
* Docker
|
|
93
|
+
* Docker Compose
|
|
94
|
+
* Node.js
|
|
95
|
+
* npm
|
|
96
|
+
|
|
97
|
+
### Audit Engine
|
|
98
|
+
|
|
99
|
+
Detects:
|
|
100
|
+
|
|
101
|
+
* Exposed SSH services
|
|
102
|
+
* HTTP services listening on all interfaces
|
|
103
|
+
* Inconsistent development tool installations
|
|
104
|
+
* WSL-specific tool resolution issues
|
|
105
|
+
|
|
106
|
+
### Output Modes
|
|
107
|
+
|
|
108
|
+
* Human-readable terminal output
|
|
109
|
+
* JSON output
|
|
110
|
+
* Verbose diagnostics
|
|
111
|
+
|
|
112
|
+
### Exit Codes
|
|
113
|
+
|
|
114
|
+
| Exit Code | Meaning |
|
|
115
|
+
| --------- | ----------------- |
|
|
116
|
+
| 0 | Healthy audit |
|
|
117
|
+
| 1 | Findings detected |
|
|
118
|
+
| 2 | Collector failure |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Architecture
|
|
123
|
+
|
|
124
|
+
dev-audit follows a modular collector-based architecture.
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
CLI
|
|
128
|
+
│
|
|
129
|
+
├── System Collector
|
|
130
|
+
│ ├── OS Information
|
|
131
|
+
│ ├── Kernel Information
|
|
132
|
+
│ └── Uptime
|
|
133
|
+
│
|
|
134
|
+
├── Resource Collector
|
|
135
|
+
│ ├── CPU Usage
|
|
136
|
+
│ ├── Memory Usage
|
|
137
|
+
│ ├── Swap Usage
|
|
138
|
+
│ └── Disk Usage
|
|
139
|
+
│
|
|
140
|
+
├── Network Collector
|
|
141
|
+
│ ├── Interfaces
|
|
142
|
+
│ ├── DNS Servers
|
|
143
|
+
│ ├── Default Route
|
|
144
|
+
│ └── Listening Ports
|
|
145
|
+
│
|
|
146
|
+
├── DevTools Collector
|
|
147
|
+
│ ├── Python
|
|
148
|
+
│ ├── pip
|
|
149
|
+
│ ├── Git
|
|
150
|
+
│ ├── Docker
|
|
151
|
+
│ ├── Docker Compose
|
|
152
|
+
│ ├── Node.js
|
|
153
|
+
│ └── npm
|
|
154
|
+
│
|
|
155
|
+
└── Audit Engine
|
|
156
|
+
├── Resource Checks
|
|
157
|
+
├── Network Checks
|
|
158
|
+
└── Environment Checks
|
|
159
|
+
|
|
160
|
+
Output Layer
|
|
161
|
+
├── Human Readable Output
|
|
162
|
+
├── JSON Output
|
|
163
|
+
└── Exit Codes
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Design Goals
|
|
167
|
+
|
|
168
|
+
* Modular collector architecture
|
|
169
|
+
* Linux-first implementation
|
|
170
|
+
* Machine-readable JSON output
|
|
171
|
+
* Human-readable terminal output
|
|
172
|
+
* CI/CD validated
|
|
173
|
+
* Test-driven development
|
|
174
|
+
* Suitable for automation and scripting
|
|
175
|
+
|
|
176
|
+
## Example Output
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
$ dev-audit
|
|
180
|
+
|
|
181
|
+
System Information
|
|
182
|
+
────────────────────────
|
|
183
|
+
Hostname : ubuntu-server
|
|
184
|
+
OS : Ubuntu 24.04 LTS
|
|
185
|
+
Kernel : 6.8.0
|
|
186
|
+
Architecture : x86_64
|
|
187
|
+
User : ubuntu
|
|
188
|
+
|
|
189
|
+
Resource Usage
|
|
190
|
+
────────────────────────
|
|
191
|
+
CPU Cores : 8
|
|
192
|
+
Load Average : 0.10 0.12 0.08
|
|
193
|
+
|
|
194
|
+
Memory
|
|
195
|
+
──────
|
|
196
|
+
Total : 16.0 GiB
|
|
197
|
+
Used : 4.2 GiB
|
|
198
|
+
Available : 11.8 GiB
|
|
199
|
+
|
|
200
|
+
Audit Findings
|
|
201
|
+
──────────────
|
|
202
|
+
⚠ SSH is listening on all interfaces.
|
|
203
|
+
⚠ HTTP service exposed on all IPv4 interfaces.
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### JSON Output
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
$ dev-audit --json
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"system": {
|
|
215
|
+
"hostname": "ubuntu-server",
|
|
216
|
+
"kernel": "6.8.0"
|
|
217
|
+
},
|
|
218
|
+
"findings": [
|
|
219
|
+
"SSH is listening on all interfaces."
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Use Cases
|
|
225
|
+
|
|
226
|
+
`dev-audit` can be used to:
|
|
227
|
+
|
|
228
|
+
* Quickly inspect Linux development environments
|
|
229
|
+
* Validate workstation setup before software development
|
|
230
|
+
* Audit servers for exposed services and configuration issues
|
|
231
|
+
* Generate machine-readable JSON reports for automation
|
|
232
|
+
* Troubleshoot networking and developer tool installations
|
|
233
|
+
* Perform lightweight health checks on Ubuntu systems
|
|
234
|
+
|
|
235
|
+
## Installation
|
|
236
|
+
|
|
237
|
+
### Clone Repository
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
git clone https://github.com/Bonbonjb/dev-audit.git
|
|
241
|
+
cd dev-audit
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Create Virtual Environment
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
python3 -m venv .venv
|
|
248
|
+
source .venv/bin/activate
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Install Package
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
pip install -e .
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Usage
|
|
260
|
+
|
|
261
|
+
### Full Audit
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
dev-audit
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Run Individual Sections
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
dev-audit system
|
|
271
|
+
dev-audit resources
|
|
272
|
+
dev-audit network
|
|
273
|
+
dev-audit devtools
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### JSON Output
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
dev-audit --json
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Verbose Output
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
dev-audit --verbose
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Example Audit Findings
|
|
291
|
+
|
|
292
|
+
```text
|
|
293
|
+
⚠ SSH is listening on all interfaces.
|
|
294
|
+
⚠ HTTP service exposed on all IPv4 interfaces.
|
|
295
|
+
⚠ npm detected but Node.js executable not found.
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Running Tests
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
pytest
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Current test suite:
|
|
307
|
+
|
|
308
|
+
```text
|
|
309
|
+
44 passing tests
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Project Structure
|
|
315
|
+
|
|
316
|
+
```text
|
|
317
|
+
src/dev_audit/
|
|
318
|
+
├── audit.py
|
|
319
|
+
├── cli.py
|
|
320
|
+
├── command.py
|
|
321
|
+
├── output.py
|
|
322
|
+
├── status.py
|
|
323
|
+
└── collectors/
|
|
324
|
+
├── system.py
|
|
325
|
+
├── resources.py
|
|
326
|
+
├── network.py
|
|
327
|
+
└── devtools.py
|
|
328
|
+
|
|
329
|
+
tests/
|
|
330
|
+
├── test_audit.py
|
|
331
|
+
├── test_command.py
|
|
332
|
+
├── test_network.py
|
|
333
|
+
├── test_output.py
|
|
334
|
+
├── test_resources.py
|
|
335
|
+
├── test_status.py
|
|
336
|
+
└── test_system.py
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Roadmap
|
|
342
|
+
|
|
343
|
+
* GitHub Actions CI
|
|
344
|
+
* Coverage reporting
|
|
345
|
+
* Additional audit rules
|
|
346
|
+
* Package publishing
|
|
347
|
+
* Extended Linux distribution support
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# dev-audit
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
## Project Status
|
|
11
|
+
|
|
12
|
+
**Current Release:** v0.3.0
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Linux system inspection
|
|
17
|
+
* Resource monitoring
|
|
18
|
+
* Network auditing
|
|
19
|
+
* Developer tool validation
|
|
20
|
+
* Audit findings engine
|
|
21
|
+
* JSON output support
|
|
22
|
+
* Verbose output support
|
|
23
|
+
* Exit code support for automation
|
|
24
|
+
* GitHub Actions CI/CD
|
|
25
|
+
|
|
26
|
+
### Quality Metrics
|
|
27
|
+
|
|
28
|
+
* 44 passing tests
|
|
29
|
+
* 50% code coverage
|
|
30
|
+
* Automated CI validation
|
|
31
|
+
* Semantic versioning
|
|
32
|
+
* Tagged releases
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
A Linux system inspection and diagnostic CLI built for Ubuntu environments.
|
|
36
|
+
|
|
37
|
+
`dev-audit` collects system information, resource metrics, network configuration, and developer environment details, then evaluates the results against audit rules to identify potential issues.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
### System Audit
|
|
44
|
+
|
|
45
|
+
* Operating system information
|
|
46
|
+
* Kernel version
|
|
47
|
+
* Hostname
|
|
48
|
+
* Architecture
|
|
49
|
+
* User and shell
|
|
50
|
+
* System uptime
|
|
51
|
+
|
|
52
|
+
### Resource Audit
|
|
53
|
+
|
|
54
|
+
* CPU core count
|
|
55
|
+
* Load averages
|
|
56
|
+
* Memory utilization
|
|
57
|
+
* Swap utilization
|
|
58
|
+
* Root filesystem usage
|
|
59
|
+
|
|
60
|
+
### Network Audit
|
|
61
|
+
|
|
62
|
+
* Network interfaces
|
|
63
|
+
* Default route
|
|
64
|
+
* DNS configuration
|
|
65
|
+
* Listening TCP and UDP ports
|
|
66
|
+
|
|
67
|
+
### Developer Environment Audit
|
|
68
|
+
|
|
69
|
+
* Python
|
|
70
|
+
* pip
|
|
71
|
+
* Git
|
|
72
|
+
* Docker
|
|
73
|
+
* Docker Compose
|
|
74
|
+
* Node.js
|
|
75
|
+
* npm
|
|
76
|
+
|
|
77
|
+
### Audit Engine
|
|
78
|
+
|
|
79
|
+
Detects:
|
|
80
|
+
|
|
81
|
+
* Exposed SSH services
|
|
82
|
+
* HTTP services listening on all interfaces
|
|
83
|
+
* Inconsistent development tool installations
|
|
84
|
+
* WSL-specific tool resolution issues
|
|
85
|
+
|
|
86
|
+
### Output Modes
|
|
87
|
+
|
|
88
|
+
* Human-readable terminal output
|
|
89
|
+
* JSON output
|
|
90
|
+
* Verbose diagnostics
|
|
91
|
+
|
|
92
|
+
### Exit Codes
|
|
93
|
+
|
|
94
|
+
| Exit Code | Meaning |
|
|
95
|
+
| --------- | ----------------- |
|
|
96
|
+
| 0 | Healthy audit |
|
|
97
|
+
| 1 | Findings detected |
|
|
98
|
+
| 2 | Collector failure |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Architecture
|
|
103
|
+
|
|
104
|
+
dev-audit follows a modular collector-based architecture.
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
CLI
|
|
108
|
+
│
|
|
109
|
+
├── System Collector
|
|
110
|
+
│ ├── OS Information
|
|
111
|
+
│ ├── Kernel Information
|
|
112
|
+
│ └── Uptime
|
|
113
|
+
│
|
|
114
|
+
├── Resource Collector
|
|
115
|
+
│ ├── CPU Usage
|
|
116
|
+
│ ├── Memory Usage
|
|
117
|
+
│ ├── Swap Usage
|
|
118
|
+
│ └── Disk Usage
|
|
119
|
+
│
|
|
120
|
+
├── Network Collector
|
|
121
|
+
│ ├── Interfaces
|
|
122
|
+
│ ├── DNS Servers
|
|
123
|
+
│ ├── Default Route
|
|
124
|
+
│ └── Listening Ports
|
|
125
|
+
│
|
|
126
|
+
├── DevTools Collector
|
|
127
|
+
│ ├── Python
|
|
128
|
+
│ ├── pip
|
|
129
|
+
│ ├── Git
|
|
130
|
+
│ ├── Docker
|
|
131
|
+
│ ├── Docker Compose
|
|
132
|
+
│ ├── Node.js
|
|
133
|
+
│ └── npm
|
|
134
|
+
│
|
|
135
|
+
└── Audit Engine
|
|
136
|
+
├── Resource Checks
|
|
137
|
+
├── Network Checks
|
|
138
|
+
└── Environment Checks
|
|
139
|
+
|
|
140
|
+
Output Layer
|
|
141
|
+
├── Human Readable Output
|
|
142
|
+
├── JSON Output
|
|
143
|
+
└── Exit Codes
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Design Goals
|
|
147
|
+
|
|
148
|
+
* Modular collector architecture
|
|
149
|
+
* Linux-first implementation
|
|
150
|
+
* Machine-readable JSON output
|
|
151
|
+
* Human-readable terminal output
|
|
152
|
+
* CI/CD validated
|
|
153
|
+
* Test-driven development
|
|
154
|
+
* Suitable for automation and scripting
|
|
155
|
+
|
|
156
|
+
## Example Output
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
$ dev-audit
|
|
160
|
+
|
|
161
|
+
System Information
|
|
162
|
+
────────────────────────
|
|
163
|
+
Hostname : ubuntu-server
|
|
164
|
+
OS : Ubuntu 24.04 LTS
|
|
165
|
+
Kernel : 6.8.0
|
|
166
|
+
Architecture : x86_64
|
|
167
|
+
User : ubuntu
|
|
168
|
+
|
|
169
|
+
Resource Usage
|
|
170
|
+
────────────────────────
|
|
171
|
+
CPU Cores : 8
|
|
172
|
+
Load Average : 0.10 0.12 0.08
|
|
173
|
+
|
|
174
|
+
Memory
|
|
175
|
+
──────
|
|
176
|
+
Total : 16.0 GiB
|
|
177
|
+
Used : 4.2 GiB
|
|
178
|
+
Available : 11.8 GiB
|
|
179
|
+
|
|
180
|
+
Audit Findings
|
|
181
|
+
──────────────
|
|
182
|
+
⚠ SSH is listening on all interfaces.
|
|
183
|
+
⚠ HTTP service exposed on all IPv4 interfaces.
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### JSON Output
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
$ dev-audit --json
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"system": {
|
|
195
|
+
"hostname": "ubuntu-server",
|
|
196
|
+
"kernel": "6.8.0"
|
|
197
|
+
},
|
|
198
|
+
"findings": [
|
|
199
|
+
"SSH is listening on all interfaces."
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Use Cases
|
|
205
|
+
|
|
206
|
+
`dev-audit` can be used to:
|
|
207
|
+
|
|
208
|
+
* Quickly inspect Linux development environments
|
|
209
|
+
* Validate workstation setup before software development
|
|
210
|
+
* Audit servers for exposed services and configuration issues
|
|
211
|
+
* Generate machine-readable JSON reports for automation
|
|
212
|
+
* Troubleshoot networking and developer tool installations
|
|
213
|
+
* Perform lightweight health checks on Ubuntu systems
|
|
214
|
+
|
|
215
|
+
## Installation
|
|
216
|
+
|
|
217
|
+
### Clone Repository
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
git clone https://github.com/Bonbonjb/dev-audit.git
|
|
221
|
+
cd dev-audit
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Create Virtual Environment
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
python3 -m venv .venv
|
|
228
|
+
source .venv/bin/activate
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Install Package
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
pip install -e .
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Usage
|
|
240
|
+
|
|
241
|
+
### Full Audit
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
dev-audit
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Run Individual Sections
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
dev-audit system
|
|
251
|
+
dev-audit resources
|
|
252
|
+
dev-audit network
|
|
253
|
+
dev-audit devtools
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### JSON Output
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
dev-audit --json
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Verbose Output
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
dev-audit --verbose
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Example Audit Findings
|
|
271
|
+
|
|
272
|
+
```text
|
|
273
|
+
⚠ SSH is listening on all interfaces.
|
|
274
|
+
⚠ HTTP service exposed on all IPv4 interfaces.
|
|
275
|
+
⚠ npm detected but Node.js executable not found.
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Running Tests
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
pytest
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Current test suite:
|
|
287
|
+
|
|
288
|
+
```text
|
|
289
|
+
44 passing tests
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Project Structure
|
|
295
|
+
|
|
296
|
+
```text
|
|
297
|
+
src/dev_audit/
|
|
298
|
+
├── audit.py
|
|
299
|
+
├── cli.py
|
|
300
|
+
├── command.py
|
|
301
|
+
├── output.py
|
|
302
|
+
├── status.py
|
|
303
|
+
└── collectors/
|
|
304
|
+
├── system.py
|
|
305
|
+
├── resources.py
|
|
306
|
+
├── network.py
|
|
307
|
+
└── devtools.py
|
|
308
|
+
|
|
309
|
+
tests/
|
|
310
|
+
├── test_audit.py
|
|
311
|
+
├── test_command.py
|
|
312
|
+
├── test_network.py
|
|
313
|
+
├── test_output.py
|
|
314
|
+
├── test_resources.py
|
|
315
|
+
├── test_status.py
|
|
316
|
+
└── test_system.py
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Roadmap
|
|
322
|
+
|
|
323
|
+
* GitHub Actions CI
|
|
324
|
+
* Coverage reporting
|
|
325
|
+
* Additional audit rules
|
|
326
|
+
* Package publishing
|
|
327
|
+
* Extended Linux distribution support
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "devaudit-cli"
|
|
7
|
+
version = "0.3.0"
|
|
8
|
+
description = "Linux system inspection and developer environment audit tool"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Brenda Bonareri", email = "bonarerijb24@gmail.com" }
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
keywords = [
|
|
17
|
+
"linux",
|
|
18
|
+
"audit",
|
|
19
|
+
"cli",
|
|
20
|
+
"diagnostics",
|
|
21
|
+
"system-monitoring"
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Development Status :: 3 - Alpha",
|
|
26
|
+
"Environment :: Console",
|
|
27
|
+
"Intended Audience :: Developers",
|
|
28
|
+
"License :: OSI Approved :: MIT License",
|
|
29
|
+
"Operating System :: POSIX :: Linux",
|
|
30
|
+
"Programming Language :: Python :: 3",
|
|
31
|
+
"Programming Language :: Python :: 3.10",
|
|
32
|
+
"Programming Language :: Python :: 3.11",
|
|
33
|
+
"Programming Language :: Python :: 3.12",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
dev-audit = "dev_audit.cli:main"
|
|
38
|
+
|
|
39
|
+
[tool.setuptools]
|
|
40
|
+
package-dir = {"" = "src"}
|
|
41
|
+
|
|
42
|
+
[tool.setuptools.packages.find]
|
|
43
|
+
where = ["src"]
|