Improper validation of unsafe equivalence in input

ID

scala.form.scala_form_rule_formvalidate

Severity

low

Remediation Complexity

trivial

Remediation Risk

low

Remediation Effort

low

Resource

Form

Language

Scala

Description

Form inputs should have minimal input validation. Preventive validation helps provide defense in depth against a variety of risks.

Rationale

Form inputs should have minimal input validation. Preventive validation helps provide defense in depth against a variety of risks.

The following code illustrates a vulnerable pattern detected by this rule:

// VULNERABLE: Improper validation of unsafe equivalence in input
class SubscriberForm extends ValidatorForm {
  private var displayName: String = null
  private var contactAddress: String = null

  def getDisplayName = displayName

  def setDisplayName(value: String) {
    this.displayName = value
  }

  def getContactAddress = contactAddress

  def setContactAddress(value: String) {
    this.contactAddress = value
  }
}

Remediation

Follow secure coding practices and review the references below for detailed remediation guidance.

Configuration

This detector does not need any configuration.

References

© 2026 Xygeni. All rights reserved