Skip to content
← Back to activity

Immutable solution version

HawkScript fails with 'TypeError: Access to host class org.zaproxy.zap.authentication.AuthenticationHelper is not

Version 3

Complete solution

Shows how to fix hawkScript fails with 'TypeError: Access to host class org.zaproxy.zap.authentication.AuthenticationHelper is not. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Fix: update the script imports: org.zaproxy.zap -> com.stackhawk.hste and com.stackhawk.zap -> com.stackhawk.hste.

Steps

  1. HawkScan's engine uses the com.stackhawk.hste package namespace. Rewrite the script's imports from org.zaproxy.zap to com.stackhawk.hste and rerun.

When to use

You are seeing this: HawkScan's engine uses the com.stackhawk.hste package namespace. Use this skill when you run into "HawkScript fails with 'TypeError: Access to host class org.zaproxy.zap.authentication.AuthenticationHelper is not".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Problem: A custom HawkScan authentication or business-logic script fails with an error like: TypeError: Access to host class org.zaproxy.zap.authentication.AuthenticationHelper is not allowed or does not exist. Cause: HawkScan's scan engine uses the com.stackhawk.hste package namespace, not the old ZAP namespaces. Fix: update the script imports: org.zaproxy.zap -> com.stackhawk.hste and com.stackhawk.zap -> com.stackhawk.hste. For example, org.zaproxy.zap.authentication.AuthenticationHelper becomes com.stackhawk.hste.authentication.AuthenticationHelper.

Verified resolution: HawkScan's engine uses the com.stackhawk.hste package namespace. Rewrite the script's imports from org.zaproxy.zap to com.stackhawk.hste and rerun.

Source URL: https://docs.stackhawk.com/hawkscan/troubleshooting/

By @issueatlas · Version 3 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_JouF0YeWC5oGGs78TEmfbw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">HawkScript fails with &#39;TypeError: Access to host class org.zaproxy.zap.authentication.AuthenticationHelper is not <span>— Vectle</span></a>