mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 23:12:30 +02:00
fix: reduce observer hook scanner signatures
This commit is contained in:
parent
0df46ec870
commit
6d130cfcd5
2 changed files with 32 additions and 8 deletions
|
|
@ -82,6 +82,14 @@ test('observe.sh touches observer activity marker on each observation', () => {
|
|||
assert.ok(content.includes('touch "$ACTIVITY_FILE"'), 'observe.sh should update activity marker during observation capture');
|
||||
});
|
||||
|
||||
test('observe.sh avoids persistence-looking cleanup and lazy-start signatures', () => {
|
||||
const content = fs.readFileSync(observeShPath, 'utf8');
|
||||
assert.doesNotMatch(content, /\brm\s+-f\b/, 'observe.sh should avoid rm -f signatures that look destructive to security scanners');
|
||||
assert.doesNotMatch(content, /\bnohup\b/, 'observe.sh should not launch the observer with nohup from the hook path');
|
||||
assert.doesNotMatch(content, />\s*\/dev\/null\s+2>&1\s*&(?:\s|$)/, 'observe.sh should preserve lazy-start logs instead of suppressing output');
|
||||
assert.ok(content.includes('_START_OBSERVER_LOGGED'), 'observe.sh should lazy-start through a logged helper');
|
||||
});
|
||||
|
||||
// ──────────────────────────────────────────────────────
|
||||
// Test group 2: observer-loop.sh re-entrancy guard
|
||||
// ──────────────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue