mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/awelzel/javascript-separate-thread'
* origin/topic/awelzel/javascript-separate-thread: btest/javascript: Add file_sniff() and file_state_remove() test Bump zeekjs to v0.15.0
This commit is contained in:
commit
db28ff04e2
6 changed files with 52 additions and 2 deletions
22
CHANGES
22
CHANGES
|
@ -1,3 +1,25 @@
|
|||
7.2.0-dev.288 | 2025-03-10 19:16:57 +0100
|
||||
|
||||
* btest/javascript: Add file_sniff() and file_state_remove() test (Arne Welzel, Corelight)
|
||||
|
||||
Using file_state_remove() or file_sniff() would previously crash with the
|
||||
spicy-zip file analyzer. We don't have spicy-zip here, so it's not a
|
||||
proper reproducer, but still makes sense to test these events.
|
||||
|
||||
* GH-4239: Bump zeekjs to v0.15.0 (Arne Welzel, Corelight)
|
||||
|
||||
f5ff7c4 version: 0.15.0
|
||||
2a48143 docker/fedora: Bust cache and ensure sqlite-libs is updated
|
||||
05e5f57 Executor: Unblock SIGTERM in thread
|
||||
46496b9 Instance: Remove unsued variable
|
||||
c3b3c86 Instance: Offload JavaScript invocations to executor thread
|
||||
09e311f Introduce Executor helper
|
||||
|
||||
Mainly, run JavaScript on a separate thread for interoperability with
|
||||
Spicy fiber stacks.
|
||||
|
||||
Closes #4239
|
||||
|
||||
7.2.0-dev.285 | 2025-03-10 08:28:54 -0700
|
||||
|
||||
* CI: Unconditionally upgrade pip on macOS (Tim Wojtulewicz, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
7.2.0-dev.285
|
||||
7.2.0-dev.288
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 79b0c2126fa0178dbc2e37536588fcd1db9f4443
|
||||
Subproject commit f5ff7c4b51e3ec1e11fc48adafdd813feccc04c5
|
|
@ -0,0 +1,3 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
fuid uid from_js
|
||||
FMnxxt3xjVcWNS2141 CHhAvVGS1DHFjwGM9 Hello from JavaScript
|
3
testing/btest/Baseline/javascript.file-sniff/out
Normal file
3
testing/btest/Baseline/javascript.file-sniff/out
Normal file
|
@ -0,0 +1,3 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
file_sniff FMnxxt3xjVcWNS2141 {"mime_type":"text/plain","mime_types":[{"strength":-20,"mime":"text/plain"}],"inferred":true}
|
||||
file_state_remove FMnxxt3xjVcWNS2141
|
22
testing/btest/javascript/file-sniff.js
Normal file
22
testing/btest/javascript/file-sniff.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* @TEST-REQUIRES: $SCRIPTS/have-javascript
|
||||
* @TEST-EXEC: zeek -b -Cr $TRACES/http/get.trace base/protocols/http ./ext.zeek %INPUT > out
|
||||
* @TEST-EXEC: zeek-cut -m fuid uid from_js < files.log > files.log.cut
|
||||
* @TEST-EXEC: btest-diff out
|
||||
* @TEST-EXEC: btest-diff files.log.cut
|
||||
*/
|
||||
|
||||
zeek.on('file_sniff', (f, meta) => {
|
||||
console.log(`file_sniff ${f.id} ${JSON.stringify(meta)}`);
|
||||
});
|
||||
|
||||
zeek.on('file_state_remove', (f) => {
|
||||
console.log(`file_state_remove ${f.id}`);
|
||||
f.info.from_js = "Hello from JavaScript";
|
||||
});
|
||||
|
||||
@TEST-START-FILE ext.zeek
|
||||
redef record Files::Info += {
|
||||
from_js: string &log &optional;
|
||||
};
|
||||
@TEST-END-FILE
|
Loading…
Add table
Add a link
Reference in a new issue