devshield-scanner 0.2.1__tar.gz → 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.
- {devshield_scanner-0.2.1/devshield_scanner.egg-info → devshield_scanner-0.3.0}/PKG-INFO +12 -5
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/README.md +11 -4
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/devshield_linux.py +11 -5
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0/devshield_scanner.egg-info}/PKG-INFO +12 -5
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/pyproject.toml +1 -1
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/LICENSE +0 -0
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/devshield_processes.py +0 -0
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/SOURCES.txt +0 -0
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/dependency_links.txt +0 -0
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/entry_points.txt +0 -0
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/top_level.txt +0 -0
- {devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devshield-scanner
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Linux host/Docker inspection with opt-in response for detected process executables
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -14,9 +14,13 @@ Dynamic: license-file
|
|
|
14
14
|
|
|
15
15
|
# DevShield for Linux
|
|
16
16
|
|
|
17
|
-
0.
|
|
17
|
+
0.3.0 adds `--quick-scan` to inspect running process executables only, using the installed ClamAV signatures. Actionable detections are terminated and host binaries are quarantined through the existing conservative response. It requires root and can interrupt services. Runtime depends on the number and size of unique process executables and may take longer than a few seconds.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
0.2.1 fixes custom scan-limit propagation: `--max-filesize-mb`, `--max-scansize-mb`, and `--max-files` now apply to running-process snapshots as well as filesystem/container scans.
|
|
20
|
+
|
|
21
|
+
## Quick scan and process response
|
|
22
|
+
|
|
23
|
+
Quick process scan: run `sudo /opt/devshield/bin/devshield --quick-scan`. It inspects running process executables only using the local ClamAV database, then exits without scanning host folders or Docker. Actionable signature detections use the existing conservative response: preserve evidence, terminate the process, and quarantine the matching host binary. This requires root and Python/Linux pidfd support. It may take longer than a few seconds depending on process count and executable sizes. Update signatures separately with `sudo freshclam` or your distribution's database updater.
|
|
20
24
|
|
|
21
25
|
`sudo /opt/devshield/bin/devshield --remediate-running` first snapshots and scans running executables, sends SIGKILL to signature-detected processes, and attempts to move matching host executables into `/var/lib/devshield/quarantine`. It then scans host files and Docker data. Without this flag, scanning remains read-only. This is an experimental opt-in response mode and can interrupt production services. Process response currently requires root and Python/Linux pidfd support (normally Python 3.9+ and Linux 5.3+).
|
|
22
26
|
|
|
@@ -24,7 +28,7 @@ Heuristic, PUA, encrypted-content, scan-limit and EICAR test alerts never trigge
|
|
|
24
28
|
|
|
25
29
|
`--max-files 200000` raises the archive member-count limit when needed. Increasing limits raises resource use. A privileged attacker can still evade or interfere with live-host inspection. There is no guarantee of complete malware removal.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
The Python distribution is `devshield-scanner`; the command is `devshield`. Version 0.3.0 adds `devshield --quick-scan`, which scans running process executables only and uses the conservative process response for actionable ClamAV signature detections. See **INSTALL.md** for installation and upgrade instructions. `devshield --version` displays the installed CLI version.
|
|
28
32
|
|
|
29
33
|
Version 0.1.1 enables ClamAV scan-limit alerts and marks zero-data scans, missing summaries and logged warnings/errors as incomplete coverage (exit 2), even when ClamAV returns 0. Limit alerts are not proof of malware. Optional `--max-filesize-mb` and `--max-scansize-mb` override engine limits in MB. Increasing limits can increase memory, CPU and runtime; engine hard limits still apply. A positive data count alone does not prove every archive entry was inspected.
|
|
30
34
|
|
|
@@ -43,6 +47,9 @@ Copy this folder onto the server, then run:
|
|
|
43
47
|
|
|
44
48
|
```sh
|
|
45
49
|
sudo python3 devshield_linux.py
|
|
50
|
+
|
|
51
|
+
# Process-only signature scan and response
|
|
52
|
+
sudo python3 devshield_linux.py --quick-scan
|
|
46
53
|
```
|
|
47
54
|
|
|
48
55
|
Console messages identify each stage and show a heartbeat every 10 seconds during long scans. Verbose file-level progress is saved to each stage's log; inspect a log with `tail -f /path/printed/by/script.log`. JSON results are checkpointed after every completed scan and on interruption, under `/var/log/devshield/<run>/report.json`.
|
|
@@ -64,6 +71,6 @@ For each running container the script uses `docker export`, scans the resulting
|
|
|
64
71
|
|
|
65
72
|
Stopped containers, unused image layers, RAM, kernel state and rootkits are not covered. ClamAV's configured/default size, archive and recursion limits still apply, including to large container TAR exports; a successful scan can miss content past those limits. Review ClamAV summaries and warnings in every log. This is a best-effort filesystem scan, not a comprehensive compromise assessment. Live files can change during scanning. Use a trusted rescue environment for suspected root-level compromise.
|
|
66
73
|
|
|
67
|
-
Exit status: 0 = no signature detections reported and no recorded orchestration errors; 1 = detections; 2 = incomplete/error (detections may also exist; always inspect the report).
|
|
74
|
+
Exit status: 0 = no signature detections reported and no recorded orchestration errors; 1 = detections; 2 = incomplete/error (detections may also exist; always inspect the report). The default scan is read-only. `--quick-scan` and `--remediate-running` can terminate detected processes and quarantine matching host executables. Reports persist if Docker scanning fails or the scan is interrupted with Ctrl+C. A forced kill or power loss may lose the active stage, but earlier checkpoints remain.
|
|
68
75
|
|
|
69
76
|
Validation on the development Windows machine covers syntax and mocked orchestration only. A real Linux/Docker/ClamAV integration scan must be validated on your server before operational use.
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# DevShield for Linux
|
|
2
2
|
|
|
3
|
-
0.
|
|
3
|
+
0.3.0 adds `--quick-scan` to inspect running process executables only, using the installed ClamAV signatures. Actionable detections are terminated and host binaries are quarantined through the existing conservative response. It requires root and can interrupt services. Runtime depends on the number and size of unique process executables and may take longer than a few seconds.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
0.2.1 fixes custom scan-limit propagation: `--max-filesize-mb`, `--max-scansize-mb`, and `--max-files` now apply to running-process snapshots as well as filesystem/container scans.
|
|
6
|
+
|
|
7
|
+
## Quick scan and process response
|
|
8
|
+
|
|
9
|
+
Quick process scan: run `sudo /opt/devshield/bin/devshield --quick-scan`. It inspects running process executables only using the local ClamAV database, then exits without scanning host folders or Docker. Actionable signature detections use the existing conservative response: preserve evidence, terminate the process, and quarantine the matching host binary. This requires root and Python/Linux pidfd support. It may take longer than a few seconds depending on process count and executable sizes. Update signatures separately with `sudo freshclam` or your distribution's database updater.
|
|
6
10
|
|
|
7
11
|
`sudo /opt/devshield/bin/devshield --remediate-running` first snapshots and scans running executables, sends SIGKILL to signature-detected processes, and attempts to move matching host executables into `/var/lib/devshield/quarantine`. It then scans host files and Docker data. Without this flag, scanning remains read-only. This is an experimental opt-in response mode and can interrupt production services. Process response currently requires root and Python/Linux pidfd support (normally Python 3.9+ and Linux 5.3+).
|
|
8
12
|
|
|
@@ -10,7 +14,7 @@ Heuristic, PUA, encrypted-content, scan-limit and EICAR test alerts never trigge
|
|
|
10
14
|
|
|
11
15
|
`--max-files 200000` raises the archive member-count limit when needed. Increasing limits raises resource use. A privileged attacker can still evade or interfere with live-host inspection. There is no guarantee of complete malware removal.
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
The Python distribution is `devshield-scanner`; the command is `devshield`. Version 0.3.0 adds `devshield --quick-scan`, which scans running process executables only and uses the conservative process response for actionable ClamAV signature detections. See **INSTALL.md** for installation and upgrade instructions. `devshield --version` displays the installed CLI version.
|
|
14
18
|
|
|
15
19
|
Version 0.1.1 enables ClamAV scan-limit alerts and marks zero-data scans, missing summaries and logged warnings/errors as incomplete coverage (exit 2), even when ClamAV returns 0. Limit alerts are not proof of malware. Optional `--max-filesize-mb` and `--max-scansize-mb` override engine limits in MB. Increasing limits can increase memory, CPU and runtime; engine hard limits still apply. A positive data count alone does not prove every archive entry was inspected.
|
|
16
20
|
|
|
@@ -29,6 +33,9 @@ Copy this folder onto the server, then run:
|
|
|
29
33
|
|
|
30
34
|
```sh
|
|
31
35
|
sudo python3 devshield_linux.py
|
|
36
|
+
|
|
37
|
+
# Process-only signature scan and response
|
|
38
|
+
sudo python3 devshield_linux.py --quick-scan
|
|
32
39
|
```
|
|
33
40
|
|
|
34
41
|
Console messages identify each stage and show a heartbeat every 10 seconds during long scans. Verbose file-level progress is saved to each stage's log; inspect a log with `tail -f /path/printed/by/script.log`. JSON results are checkpointed after every completed scan and on interruption, under `/var/log/devshield/<run>/report.json`.
|
|
@@ -50,6 +57,6 @@ For each running container the script uses `docker export`, scans the resulting
|
|
|
50
57
|
|
|
51
58
|
Stopped containers, unused image layers, RAM, kernel state and rootkits are not covered. ClamAV's configured/default size, archive and recursion limits still apply, including to large container TAR exports; a successful scan can miss content past those limits. Review ClamAV summaries and warnings in every log. This is a best-effort filesystem scan, not a comprehensive compromise assessment. Live files can change during scanning. Use a trusted rescue environment for suspected root-level compromise.
|
|
52
59
|
|
|
53
|
-
Exit status: 0 = no signature detections reported and no recorded orchestration errors; 1 = detections; 2 = incomplete/error (detections may also exist; always inspect the report).
|
|
60
|
+
Exit status: 0 = no signature detections reported and no recorded orchestration errors; 1 = detections; 2 = incomplete/error (detections may also exist; always inspect the report). The default scan is read-only. `--quick-scan` and `--remediate-running` can terminate detected processes and quarantine matching host executables. Reports persist if Docker scanning fails or the scan is interrupted with Ctrl+C. A forced kill or power loss may lose the active stage, but earlier checkpoints remain.
|
|
54
61
|
|
|
55
62
|
Validation on the development Windows machine covers syntax and mocked orchestration only. A real Linux/Docker/ClamAV integration scan must be validated on your server before operational use.
|
|
@@ -47,7 +47,8 @@ def coverage_warnings(log_path):
|
|
|
47
47
|
|
|
48
48
|
def main():
|
|
49
49
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
50
|
-
parser.add_argument('--version', action='version', version='DevShield 0.
|
|
50
|
+
parser.add_argument('--version', action='version', version='DevShield 0.3.0')
|
|
51
|
+
parser.add_argument('--quick-scan', action='store_true', help='scan running process executables only; terminate actionable signature detections and quarantine host binaries')
|
|
51
52
|
parser.add_argument('--remediate-running', action='store_true', help='FIRST scan process executables; kill signature-detected processes and quarantine host binaries. Can interrupt services.')
|
|
52
53
|
parser.add_argument('--quarantine', default='/var/lib/devshield/quarantine', help='Root-owned 0700 quarantine directory')
|
|
53
54
|
parser.add_argument('--max-files', type=int, help='ClamAV maximum archive member count')
|
|
@@ -60,6 +61,8 @@ def main():
|
|
|
60
61
|
parser.add_argument('--temp-dir', help='Scratch filesystem with enough space for container exports')
|
|
61
62
|
parser.add_argument('--heartbeat', type=int, default=10)
|
|
62
63
|
args = parser.parse_args()
|
|
64
|
+
if args.quick_scan and args.remediate_running:
|
|
65
|
+
parser.error('Choose either --quick-scan or --remediate-running, not both.')
|
|
63
66
|
scan_options = clamav_limits(args)
|
|
64
67
|
if not sys.platform.startswith('linux'):
|
|
65
68
|
parser.error('Run this script on Linux.')
|
|
@@ -72,7 +75,8 @@ def main():
|
|
|
72
75
|
parser.error('clamscan is missing. Install ClamAV and update its databases first; see README.md.')
|
|
73
76
|
report_dir = Path(args.reports).resolve() / (dt.datetime.now(dt.timezone.utc).strftime('%Y%m%dT%H%M%SZ') + '-' + str(os.getpid()))
|
|
74
77
|
report_dir.mkdir(parents=True, mode=0o700)
|
|
75
|
-
report = {'
|
|
78
|
+
report = {'version': '0.3.0', 'mode': 'quick-process-scan' if args.quick_scan else 'full-scan',
|
|
79
|
+
'started': dt.datetime.now(dt.timezone.utc).isoformat(), 'scans': [], 'issues': [],
|
|
76
80
|
'limitations': ['Filesystem signature scan, not proof of absence of malware or rootkits.',
|
|
77
81
|
'Files can change during live scans; no atomic snapshot is taken.',
|
|
78
82
|
'Stopped containers and unused image layers are not exported.',
|
|
@@ -142,15 +146,17 @@ def main():
|
|
|
142
146
|
version = subprocess.run(['clamscan', '--version'], capture_output=True, text=True)
|
|
143
147
|
report['engine'] = version.stdout.strip()
|
|
144
148
|
save()
|
|
145
|
-
if args.remediate_running:
|
|
149
|
+
if args.quick_scan or args.remediate_running:
|
|
150
|
+
if args.quick_scan:
|
|
151
|
+
print('[Quick Scan] Scanning running process executables only; signature-confirmed responses may terminate processes.', flush=True)
|
|
146
152
|
inspect_running(run, issue, save, report, scratch.name, args.quarantine, coverage_warnings, scan_options)
|
|
147
|
-
if not args.skip_host:
|
|
153
|
+
if not args.quick_scan and not args.skip_host:
|
|
148
154
|
if not Path(args.host_root).is_dir():
|
|
149
155
|
issue('Host root is not a directory: ' + args.host_root)
|
|
150
156
|
else:
|
|
151
157
|
scan(Path(args.host_root).resolve(), 'Host filesystem',
|
|
152
158
|
['/proc', '/sys', '/dev', '/run', '/var/lib/docker', '/var/lib/containerd', report_dir.parent, scratch.name, args.quarantine])
|
|
153
|
-
if not args.skip_docker:
|
|
159
|
+
if not args.quick_scan and not args.skip_docker:
|
|
154
160
|
if not shutil.which('docker'):
|
|
155
161
|
issue('Docker CLI missing; containers and volumes were not inspected.')
|
|
156
162
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devshield-scanner
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Linux host/Docker inspection with opt-in response for detected process executables
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -14,9 +14,13 @@ Dynamic: license-file
|
|
|
14
14
|
|
|
15
15
|
# DevShield for Linux
|
|
16
16
|
|
|
17
|
-
0.
|
|
17
|
+
0.3.0 adds `--quick-scan` to inspect running process executables only, using the installed ClamAV signatures. Actionable detections are terminated and host binaries are quarantined through the existing conservative response. It requires root and can interrupt services. Runtime depends on the number and size of unique process executables and may take longer than a few seconds.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
0.2.1 fixes custom scan-limit propagation: `--max-filesize-mb`, `--max-scansize-mb`, and `--max-files` now apply to running-process snapshots as well as filesystem/container scans.
|
|
20
|
+
|
|
21
|
+
## Quick scan and process response
|
|
22
|
+
|
|
23
|
+
Quick process scan: run `sudo /opt/devshield/bin/devshield --quick-scan`. It inspects running process executables only using the local ClamAV database, then exits without scanning host folders or Docker. Actionable signature detections use the existing conservative response: preserve evidence, terminate the process, and quarantine the matching host binary. This requires root and Python/Linux pidfd support. It may take longer than a few seconds depending on process count and executable sizes. Update signatures separately with `sudo freshclam` or your distribution's database updater.
|
|
20
24
|
|
|
21
25
|
`sudo /opt/devshield/bin/devshield --remediate-running` first snapshots and scans running executables, sends SIGKILL to signature-detected processes, and attempts to move matching host executables into `/var/lib/devshield/quarantine`. It then scans host files and Docker data. Without this flag, scanning remains read-only. This is an experimental opt-in response mode and can interrupt production services. Process response currently requires root and Python/Linux pidfd support (normally Python 3.9+ and Linux 5.3+).
|
|
22
26
|
|
|
@@ -24,7 +28,7 @@ Heuristic, PUA, encrypted-content, scan-limit and EICAR test alerts never trigge
|
|
|
24
28
|
|
|
25
29
|
`--max-files 200000` raises the archive member-count limit when needed. Increasing limits raises resource use. A privileged attacker can still evade or interfere with live-host inspection. There is no guarantee of complete malware removal.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
The Python distribution is `devshield-scanner`; the command is `devshield`. Version 0.3.0 adds `devshield --quick-scan`, which scans running process executables only and uses the conservative process response for actionable ClamAV signature detections. See **INSTALL.md** for installation and upgrade instructions. `devshield --version` displays the installed CLI version.
|
|
28
32
|
|
|
29
33
|
Version 0.1.1 enables ClamAV scan-limit alerts and marks zero-data scans, missing summaries and logged warnings/errors as incomplete coverage (exit 2), even when ClamAV returns 0. Limit alerts are not proof of malware. Optional `--max-filesize-mb` and `--max-scansize-mb` override engine limits in MB. Increasing limits can increase memory, CPU and runtime; engine hard limits still apply. A positive data count alone does not prove every archive entry was inspected.
|
|
30
34
|
|
|
@@ -43,6 +47,9 @@ Copy this folder onto the server, then run:
|
|
|
43
47
|
|
|
44
48
|
```sh
|
|
45
49
|
sudo python3 devshield_linux.py
|
|
50
|
+
|
|
51
|
+
# Process-only signature scan and response
|
|
52
|
+
sudo python3 devshield_linux.py --quick-scan
|
|
46
53
|
```
|
|
47
54
|
|
|
48
55
|
Console messages identify each stage and show a heartbeat every 10 seconds during long scans. Verbose file-level progress is saved to each stage's log; inspect a log with `tail -f /path/printed/by/script.log`. JSON results are checkpointed after every completed scan and on interruption, under `/var/log/devshield/<run>/report.json`.
|
|
@@ -64,6 +71,6 @@ For each running container the script uses `docker export`, scans the resulting
|
|
|
64
71
|
|
|
65
72
|
Stopped containers, unused image layers, RAM, kernel state and rootkits are not covered. ClamAV's configured/default size, archive and recursion limits still apply, including to large container TAR exports; a successful scan can miss content past those limits. Review ClamAV summaries and warnings in every log. This is a best-effort filesystem scan, not a comprehensive compromise assessment. Live files can change during scanning. Use a trusted rescue environment for suspected root-level compromise.
|
|
66
73
|
|
|
67
|
-
Exit status: 0 = no signature detections reported and no recorded orchestration errors; 1 = detections; 2 = incomplete/error (detections may also exist; always inspect the report).
|
|
74
|
+
Exit status: 0 = no signature detections reported and no recorded orchestration errors; 1 = detections; 2 = incomplete/error (detections may also exist; always inspect the report). The default scan is read-only. `--quick-scan` and `--remediate-running` can terminate detected processes and quarantine matching host executables. Reports persist if Docker scanning fails or the scan is interrupted with Ctrl+C. A forced kill or power loss may lose the active stage, but earlier checkpoints remain.
|
|
68
75
|
|
|
69
76
|
Validation on the development Windows machine covers syntax and mocked orchestration only. A real Linux/Docker/ClamAV integration scan must be validated on your server before operational use.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "devshield-scanner"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "Linux host/Docker inspection with opt-in response for detected process executables"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{devshield_scanner-0.2.1 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|