pscanrules: test error on InformationDisclosureReferrerScanRuleUnitTest with Eclipse
See original GitHub issueDescribe the bug
The test InformationDisclosureReferrerScanRuleUnitTest
->shouldRaiseAlertWhenCreditCardInReferer
fails for me.
All others work.
Steps to reproduce the behavior
- I installed Eclipse (Java) on Linux via Flathub.
- I accidentally opened the
zap-extensions
project just as a project dir, which kinda looked, good but then looked into the doc (point below) and set it up properly using gradle import… - I set up the project as stated there i.e. import via gradle, but only for
zap-extensions
, because I do not want to run the actual code, but just tests (of this particular repository), so I think this is fine. (BTW that import process took ages wtf, which gradle stuff, does it download and so on.) - I run all the JUnit tests for pscanrules:
-> Ran: 430; Failed: 1 (“Errors”, no “Failures” whatever that means), Skipped: 3
I can also run all the tests for the InformationDisclosureReferrerScanRuleUnitTest
file too and it’s the same, 15 tests run, one fails.
All others work.
It fails with this bbasically as far as I see:
13:36:17.954 [main] ERROR org.parosproxy.paros.common.AbstractParam - No write access to directory /tmp/junit8938835657286392160/home/plugin
java.security.InvalidParameterException: No write access to directory /tmp/junit8938835657286392160/home/plugin
at org.zaproxy.zap.extension.autoupdate.OptionsParamCheckForUpdates.setDownloadDirectory(OptionsParamCheckForUpdates.java:330) ~[zap-2.11.1.jar:2.11.1]
at org.zaproxy.zap.extension.autoupdate.OptionsParamCheckForUpdates.parse(OptionsParamCheckForUpdates.java:100) ~[zap-2.11.1.jar:2.11.1]
Expected behavior
No test failures.
Software versions
Eclipse IDE for Java Developers (includes Incubating components)
Version: 2021-12 (4.22.0) Build id: 20211202-1639
Flatpak details
$ flatpak info org.eclipse.Java
Eclipse IDE for Java Developers - The essential tools for any Java developer,
including a Java IDE, a Git client, XML Editor, Maven and Gradle integration
ID: org.eclipse.Java
Ref: app/org.eclipse.Java/x86_64/stable
Arch: x86_64
Branch: stable
Version: 4.22
License: EPL-2.0
Origin: flathub
Collection: org.flathub.Stable
Installation: system
Installed: 365.8�MB
Runtime: org.gnome.Platform/x86_64/41
Sdk: org.gnome.Sdk/x86_64/41
Commit: fa98ae04d6872b2f2d84b578905c1514c248e00ce1e8df0fa9c931a3497c02a8
Parent: 8e557316ab7b190499cd046e5770a6585352998c88ea97322b884de225974f31
Subject: Update README.md (1b5a5a2a)
Date: 2022-01-26 09:42:47 +0000
$ flatpak --version
Flatpak 1.12.5
source code:
- reproduced at https://github.com/zaproxy/zap-extensions/commit/f1a4eda62
- reproduced at https://github.com/zaproxy/zap-extensions/commit/10f37b77e now (all further tests done with that state)
Fedora Linux 35 (Workstation Edition) GNOME 41.3
Eclipse configuration: https://gist.github.com/rugk/419fe08b9b6bb30d2ab7d1309faa8244
Screenshots
Errors from the zap.log file
Stacktrace: https://gist.github.com/rugk/302bc49794a8fdc6be284f68118aaaa1
Additional context
Note Flatpak may have permission constraint of what can be accessed. However as far as I read what is is written to just a /tmp
directory, so that should not fail and is of course always available.
Discovered while working on https://github.com/zaproxy/zap-extensions/pull/3627
Would you like to help fix this issue?
- Yes
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (8 by maintainers)
Top GitHub Comments
Run the test task, e.g.:
./gradlew aO:pscanrules:test
. While the guide does not explicitly tell how to run the tests it does tell how to list the available tasks.It’s actually called “JAR hell”, different versions of the same library one has the constructor the other doesn’t. Either in Eclipse or Buildship.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.