devshield-scanner 0.2.0__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.0/devshield_scanner.egg-info → devshield_scanner-0.3.0}/PKG-INFO +14 -5
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/README.md +13 -4
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/devshield_linux.py +25 -12
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/devshield_processes.py +6 -2
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0/devshield_scanner.egg-info}/PKG-INFO +14 -5
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/pyproject.toml +1 -1
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/LICENSE +0 -0
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/SOURCES.txt +0 -0
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/dependency_links.txt +0 -0
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/entry_points.txt +0 -0
- {devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/top_level.txt +0 -0
- {devshield_scanner-0.2.0 → 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,15 +14,21 @@ Dynamic: license-file
|
|
|
14
14
|
|
|
15
15
|
# DevShield for Linux
|
|
16
16
|
|
|
17
|
-
|
|
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
|
+
|
|
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.
|
|
18
24
|
|
|
19
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+).
|
|
20
26
|
|
|
21
27
|
Heuristic, PUA, encrypted-content, scan-limit and EICAR test alerts never trigger automatic process response. Evidence copies and action records are saved before termination. PID 1, DevShield and its ancestors are excluded. Original-file moves require a matching inode and a same-filesystem rename; failures are reported rather than falling back to destructive copy/delete. Container executables are not moved: rebuild affected containers from trusted images. Supervisors may restart terminated processes. Script interpreters, injected code, memory-only malware and persistence are not comprehensively inspected, and files found during the subsequent host/container scan are not automatically removed. Quarantine samples must not be executed. Quarantine is excluded from later scans.
|
|
22
28
|
|
|
23
|
-
`--max-files 200000` raises the archive member-count limit when needed.
|
|
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.
|
|
24
30
|
|
|
25
|
-
|
|
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.
|
|
26
32
|
|
|
27
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.
|
|
28
34
|
|
|
@@ -41,6 +47,9 @@ Copy this folder onto the server, then run:
|
|
|
41
47
|
|
|
42
48
|
```sh
|
|
43
49
|
sudo python3 devshield_linux.py
|
|
50
|
+
|
|
51
|
+
# Process-only signature scan and response
|
|
52
|
+
sudo python3 devshield_linux.py --quick-scan
|
|
44
53
|
```
|
|
45
54
|
|
|
46
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`.
|
|
@@ -62,6 +71,6 @@ For each running container the script uses `docker export`, scans the resulting
|
|
|
62
71
|
|
|
63
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.
|
|
64
73
|
|
|
65
|
-
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.
|
|
66
75
|
|
|
67
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,14 +1,20 @@
|
|
|
1
1
|
# DevShield for Linux
|
|
2
2
|
|
|
3
|
-
|
|
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
|
+
|
|
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.
|
|
4
10
|
|
|
5
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+).
|
|
6
12
|
|
|
7
13
|
Heuristic, PUA, encrypted-content, scan-limit and EICAR test alerts never trigger automatic process response. Evidence copies and action records are saved before termination. PID 1, DevShield and its ancestors are excluded. Original-file moves require a matching inode and a same-filesystem rename; failures are reported rather than falling back to destructive copy/delete. Container executables are not moved: rebuild affected containers from trusted images. Supervisors may restart terminated processes. Script interpreters, injected code, memory-only malware and persistence are not comprehensively inspected, and files found during the subsequent host/container scan are not automatically removed. Quarantine samples must not be executed. Quarantine is excluded from later scans.
|
|
8
14
|
|
|
9
|
-
`--max-files 200000` raises the archive member-count limit when needed.
|
|
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.
|
|
10
16
|
|
|
11
|
-
|
|
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.
|
|
12
18
|
|
|
13
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.
|
|
14
20
|
|
|
@@ -27,6 +33,9 @@ Copy this folder onto the server, then run:
|
|
|
27
33
|
|
|
28
34
|
```sh
|
|
29
35
|
sudo python3 devshield_linux.py
|
|
36
|
+
|
|
37
|
+
# Process-only signature scan and response
|
|
38
|
+
sudo python3 devshield_linux.py --quick-scan
|
|
30
39
|
```
|
|
31
40
|
|
|
32
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`.
|
|
@@ -48,6 +57,6 @@ For each running container the script uses `docker export`, scans the resulting
|
|
|
48
57
|
|
|
49
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.
|
|
50
59
|
|
|
51
|
-
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.
|
|
52
61
|
|
|
53
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.
|
|
@@ -15,6 +15,17 @@ import time
|
|
|
15
15
|
from devshield_processes import inspect_running
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
def clamav_limits(args):
|
|
19
|
+
options = []
|
|
20
|
+
if args.max_filesize_mb is not None:
|
|
21
|
+
options.append(f'--max-filesize={args.max_filesize_mb}M')
|
|
22
|
+
if args.max_scansize_mb is not None:
|
|
23
|
+
options.append(f'--max-scansize={args.max_scansize_mb}M')
|
|
24
|
+
if args.max_files is not None:
|
|
25
|
+
options.append(f'--max-files={args.max_files}')
|
|
26
|
+
return options
|
|
27
|
+
|
|
28
|
+
|
|
18
29
|
def coverage_warnings(log_path):
|
|
19
30
|
"""Read logs incrementally; a zero exit code alone does not establish coverage."""
|
|
20
31
|
warnings = set()
|
|
@@ -36,7 +47,8 @@ def coverage_warnings(log_path):
|
|
|
36
47
|
|
|
37
48
|
def main():
|
|
38
49
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
39
|
-
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')
|
|
40
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.')
|
|
41
53
|
parser.add_argument('--quarantine', default='/var/lib/devshield/quarantine', help='Root-owned 0700 quarantine directory')
|
|
42
54
|
parser.add_argument('--max-files', type=int, help='ClamAV maximum archive member count')
|
|
@@ -49,6 +61,9 @@ def main():
|
|
|
49
61
|
parser.add_argument('--temp-dir', help='Scratch filesystem with enough space for container exports')
|
|
50
62
|
parser.add_argument('--heartbeat', type=int, default=10)
|
|
51
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.')
|
|
66
|
+
scan_options = clamav_limits(args)
|
|
52
67
|
if not sys.platform.startswith('linux'):
|
|
53
68
|
parser.error('Run this script on Linux.')
|
|
54
69
|
if args.heartbeat < 1:
|
|
@@ -60,7 +75,8 @@ def main():
|
|
|
60
75
|
parser.error('clamscan is missing. Install ClamAV and update its databases first; see README.md.')
|
|
61
76
|
report_dir = Path(args.reports).resolve() / (dt.datetime.now(dt.timezone.utc).strftime('%Y%m%dT%H%M%SZ') + '-' + str(os.getpid()))
|
|
62
77
|
report_dir.mkdir(parents=True, mode=0o700)
|
|
63
|
-
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': [],
|
|
64
80
|
'limitations': ['Filesystem signature scan, not proof of absence of malware or rootkits.',
|
|
65
81
|
'Files can change during live scans; no atomic snapshot is taken.',
|
|
66
82
|
'Stopped containers and unused image layers are not exported.',
|
|
@@ -110,12 +126,7 @@ def main():
|
|
|
110
126
|
def scan(path, label, excludes=()):
|
|
111
127
|
command = ['clamscan', '--recursive=yes', '--infected', '--verbose', '--scan-archive=yes',
|
|
112
128
|
'--cross-fs=yes', '--follow-dir-symlinks=0', '--follow-file-symlinks=0', '--alert-exceeds-max=yes']
|
|
113
|
-
|
|
114
|
-
command.append(f'--max-filesize={args.max_filesize_mb}M')
|
|
115
|
-
if args.max_scansize_mb is not None:
|
|
116
|
-
command.append(f'--max-scansize={args.max_scansize_mb}M')
|
|
117
|
-
if args.max_files is not None:
|
|
118
|
-
command.append(f'--max-files={args.max_files}')
|
|
129
|
+
command.extend(scan_options)
|
|
119
130
|
command.extend('--exclude-dir=^' + re.escape(str(Path(p).resolve())) + r'(/|$)' for p in excludes)
|
|
120
131
|
rc, log = run([*command, '--', str(path)], label)
|
|
121
132
|
warnings = coverage_warnings(log)
|
|
@@ -135,15 +146,17 @@ def main():
|
|
|
135
146
|
version = subprocess.run(['clamscan', '--version'], capture_output=True, text=True)
|
|
136
147
|
report['engine'] = version.stdout.strip()
|
|
137
148
|
save()
|
|
138
|
-
if args.remediate_running:
|
|
139
|
-
|
|
140
|
-
|
|
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)
|
|
152
|
+
inspect_running(run, issue, save, report, scratch.name, args.quarantine, coverage_warnings, scan_options)
|
|
153
|
+
if not args.quick_scan and not args.skip_host:
|
|
141
154
|
if not Path(args.host_root).is_dir():
|
|
142
155
|
issue('Host root is not a directory: ' + args.host_root)
|
|
143
156
|
else:
|
|
144
157
|
scan(Path(args.host_root).resolve(), 'Host filesystem',
|
|
145
158
|
['/proc', '/sys', '/dev', '/run', '/var/lib/docker', '/var/lib/containerd', report_dir.parent, scratch.name, args.quarantine])
|
|
146
|
-
if not args.skip_docker:
|
|
159
|
+
if not args.quick_scan and not args.skip_docker:
|
|
147
160
|
if not shutil.which('docker'):
|
|
148
161
|
issue('Docker CLI missing; containers and volumes were not inspected.')
|
|
149
162
|
else:
|
|
@@ -7,6 +7,10 @@ import signal
|
|
|
7
7
|
import stat
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
def process_scan_command(snapshot, scan_options=()):
|
|
11
|
+
return ['clamscan', '--infected', '--alert-exceeds-max=yes', *scan_options, '--', str(snapshot)]
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
def signature_names(log_path):
|
|
11
15
|
names = []
|
|
12
16
|
with open(log_path, encoding='utf-8', errors='replace') as stream:
|
|
@@ -56,7 +60,7 @@ def move_original(source, before, destination):
|
|
|
56
60
|
os.close(parentfd)
|
|
57
61
|
|
|
58
62
|
|
|
59
|
-
def inspect_running(run, issue, save, report, scratch, quarantine, coverage_warnings):
|
|
63
|
+
def inspect_running(run, issue, save, report, scratch, quarantine, coverage_warnings, scan_options=()):
|
|
60
64
|
"""Scan immutable copies, pin process identities, preserve evidence before SIGKILL."""
|
|
61
65
|
if os.geteuid() != 0:
|
|
62
66
|
issue('Running-process response requires root; stage skipped.')
|
|
@@ -97,7 +101,7 @@ def inspect_running(run, issue, save, report, scratch, quarantine, coverage_warn
|
|
|
97
101
|
target.write(block)
|
|
98
102
|
with snapshot.open('rb') as target:
|
|
99
103
|
snapshot_hash = digest(target)
|
|
100
|
-
rc, log = run(
|
|
104
|
+
rc, log = run(process_scan_command(snapshot, scan_options), f'Process executable PID {pid}')
|
|
101
105
|
for warning in coverage_warnings(log):
|
|
102
106
|
issue(f'PID {pid}: {warning} See {log}')
|
|
103
107
|
names = signature_names(log) if rc == 1 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,15 +14,21 @@ Dynamic: license-file
|
|
|
14
14
|
|
|
15
15
|
# DevShield for Linux
|
|
16
16
|
|
|
17
|
-
|
|
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
|
+
|
|
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.
|
|
18
24
|
|
|
19
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+).
|
|
20
26
|
|
|
21
27
|
Heuristic, PUA, encrypted-content, scan-limit and EICAR test alerts never trigger automatic process response. Evidence copies and action records are saved before termination. PID 1, DevShield and its ancestors are excluded. Original-file moves require a matching inode and a same-filesystem rename; failures are reported rather than falling back to destructive copy/delete. Container executables are not moved: rebuild affected containers from trusted images. Supervisors may restart terminated processes. Script interpreters, injected code, memory-only malware and persistence are not comprehensively inspected, and files found during the subsequent host/container scan are not automatically removed. Quarantine samples must not be executed. Quarantine is excluded from later scans.
|
|
22
28
|
|
|
23
|
-
`--max-files 200000` raises the archive member-count limit when needed.
|
|
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.
|
|
24
30
|
|
|
25
|
-
|
|
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.
|
|
26
32
|
|
|
27
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.
|
|
28
34
|
|
|
@@ -41,6 +47,9 @@ Copy this folder onto the server, then run:
|
|
|
41
47
|
|
|
42
48
|
```sh
|
|
43
49
|
sudo python3 devshield_linux.py
|
|
50
|
+
|
|
51
|
+
# Process-only signature scan and response
|
|
52
|
+
sudo python3 devshield_linux.py --quick-scan
|
|
44
53
|
```
|
|
45
54
|
|
|
46
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`.
|
|
@@ -62,6 +71,6 @@ For each running container the script uses `docker export`, scans the resulting
|
|
|
62
71
|
|
|
63
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.
|
|
64
73
|
|
|
65
|
-
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.
|
|
66
75
|
|
|
67
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
|
{devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{devshield_scanner-0.2.0 → devshield_scanner-0.3.0}/devshield_scanner.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|