Scripts directly call to Java packages

Impact area

Manageability

Severity

High

Affected element

Business Rule

Access Control

Script Includes

Catalog Client Scripts

Client Script

Script Action

Inbound Email Actions

Email Script

Widget Angular Provider

Widget

Record Producer

Scripted REST Resource

UI Action

UI Script

Rule number

SN-0390

Impact

Package calls can access resources on the server-side to perform operations without appropriate validation, for this reason calls to Java packages are unsupported. They should be replaced by the Glide alternative.

Remediation

Use Glide APIs to call Java packages.

Time to fix

10 min

Code examples

Compliant

var date1 = new GlideDateTime().getRaw();


Non-compliant

var date1 = Packages.com.glide.glideobject.GlideDateTime().getRaw();

What's here


Related content





Last modified on May 18, 2021