question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pscanrules: test error on InformationDisclosureReferrerScanRuleUnitTest with Eclipse

See original GitHub issue

Describe the bug

The test InformationDisclosureReferrerScanRuleUnitTest->shouldRaiseAlertWhenCreditCardInReferer fails for me. All others work.

Steps to reproduce the behavior

  1. I installed Eclipse (Java) on Linux via Flathub.
  2. 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…
  3. 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.)
  4. I run all the JUnit tests for pscanrules: grafik

-> 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:

Fedora Linux 35 (Workstation Edition) GNOME 41.3

Eclipse configuration: https://gist.github.com/rugk/419fe08b9b6bb30d2ab7d1309faa8244

Screenshots

grafik

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:closed
  • Created 2 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
thc202commented, Mar 7, 2022

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.

0reactions
github-actions[bot]commented, Jun 22, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message run I tried to run the hello world in java - Eclipse
while trying to run eclipse hello world I got the error java.lang.module.InvalidModuleDescriptorException: I saw an answer on the forum but ...
Read more >
Newcomers » [SOLVED]error while opening eclipse Luna
Hello, I work with Eclipse Luna. When I try to open Eclipse I have the following error. It is chinese for me. Could...
Read more >
"Validation" and "Error Markers" behave strange when testing
Hello all, we use SWTBot successfully so far to test our application at system level. It is an extension to the eclipse IDE...
Read more >
e(fx)clipse » 11 errors on "New FX-Project" - Eclipse
Each time I try to begin a new JavaFX-project, I instantly get an error, even if I did not code anything (see attached...
Read more >
Error occurred during initialization of boot layer - Eclipse
I believe you have a module defined here [check for a module-info.java file]. You must have got a compilation error in this case...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found