Hello dear community.
I run zap via .bat file on windows - the latest one 2.17.0 with this java onboard:
openjdk 17.0.17 2025-10-21
OpenJDK Runtime Environment Temurin-17.0.17+10 (build 17.0.17+10)
OpenJDK 64-Bit Server VM Temurin-17.0.17+10 (build 17.0.17+10, mixed mode, sharing)
I've observed the issue with javascript passive scripts:
Normally without any script the memory usage is pretty stable and increase very slowly.
But when I enable the passive script - it increase dramatically fast.
Then when I disable it - memory increase stop and usage is on this level (doesn't drop).
I also doesn't found any issue with zap related to the memory usage, heap allocation or any other like this.
My question is: Can I do anything to stop this memory increase or just report an issue on zap github?
Here is an example of script:
var ScanRuleMetadata = Java.type(
"org.zaproxy.addon.commonlib.scanrules.ScanRuleMetadata"
);
function getMetadata() {
return ScanRuleMetadata.fromYaml(`
id: 100003
name: Cookie Set Without HttpOnly Flag
description: >
A cookie has been set without the HttpOnly flag, which means that the cookie can be accessed by JavaScript.
If a malicious script can be run on this page then the cookie will be accessible and can be transmitted to another site.
If this is a session cookie then session hijacking may be possible.
solution: Ensure that the HttpOnly flag is set for all cookies.
risk: low
confidence: medium
cweId: 0
wascId: 13 # WASC-13: Information Leakage
status: alpha
`);
}
function scan(helper, msg, src) {
return;
}