Enum Class Safety

java.lang.Object
java.lang.Enum<Safety>
uk.ac.starlink.topcat.Safety
All Implemented Interfaces:
Serializable, Comparable<Safety>, Constable

public enum Safety extends Enum<Safety>
Characterises a security risk. There are currently two values, SAFE and UNSAFE.

A value of SAFE indicates that the action so characterised is known to be harmless. This applies to actions that can only affect the internal state of the application. Actions that might be the target of an injection attack should be marked UNSAFE.

Potentially unsafe capabilities, which should be marked UNSAFE, include:

  • invocation of activation-type JEL functions (those from uk.ac.starlink.topcat.func.*, though not those from uk.ac.starlink.ttools.func.*)
  • unrestricted execution of System (shell) commands
  • acquiring input streams from DataSource.makeDataSource(java.lang.String) (these may include shell execution; note that table load typically calls this method)
  • sending a SAMP message of unknown semantics (except one marked as mostly-harmless)
Since:
13 Jul 2018
Author:
Mark Taylor
  • Enum Constant Details

    • SAFE

      public static final Safety SAFE
      Poses no security risk.
    • UNSAFE

      public static final Safety UNSAFE
      Poses a potential security risk.
  • Method Details

    • values

      public static Safety[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Safety valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null