/usr/local/lib/swipl/library/sandbox.pl
All Application Manual Name SummaryHelp

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl
      • lists.pl
      • broadcast.pl
      • shlib.pl
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl
      • arithmetic.pl
      • main.pl
      • readutil.pl -- Read utilities
      • operators.pl
      • pairs.pl -- Operations on key-value lists
      • prolog_source.pl
      • record.pl
      • quasi_quotations.pl
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl
      • random.pl
      • base64.pl
      • aggregate.pl
      • yall.pl
      • sandbox.pl -- Sandboxed Prolog code
        • sandbox_allowed_directive/1
        • sandbox_allowed_expansion/1
        • sandbox_allowed_goal/1
        • safe_call/1
        • safe_goal/1
        • safe_primitive/1
        • safe_global_variable/1
        • safe_meta/2
        • format_calls/3
        • safe_directive/1
        • safe_prolog_flag/2
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl
      • prolog_format.pl
      • predicate_options.pl
      • csv.pl -- Process CSV (Comma-Separated Values) data
      • pprint.pl
      • atom.pl
      • modules.pl
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl -- Prolog syntax colouring support.
      • lazy_lists.pl
      • ugraphs.pl
      • url.pl -- Analysing and constructing URL
      • www_browser.pl
      • prolog_pack.pl
      • git.pl
      • utf8.pl -- UTF-8 encoding/decoding on lists of character codes.
      • dialect.pl
      • system.pl -- System utilities
      • terms.pl -- Term manipulation
      • date.pl
      • persistency.pl
      • iostream.pl -- Utilities to deal with streams
      • prolog_stack.pl
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl
      • prolog_code.pl
      • sort.pl
      • dicts.pl
      • dif.pl -- The dif/2 constraint
      • varnumbers.pl
      • pio.pl
      • base32.pl
      • charsio.pl
      • codesio.pl
      • coinduction.pl
      • heaps.pl
      • rbtrees.pl
      • statistics.pl
      • when.pl
      • backcomp.pl
      • tty.pl
      • prolog_history.pl
      • prolog_config.pl
      • check.pl
      • ctypes.pl -- Character code classification
      • writef.pl
      • qsave.pl
      • zip.pl -- Access resource ZIP archives
      • prolog_autoload.pl
      • listing.pl
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • prolog_wrap.pl
      • prolog_codewalk.pl
      • quintus.pl
      • thread.pl
      • increval.pl
      • tables.pl
      • portray_text.pl
      • prolog_coverage.pl
      • threadutil.pl -- Interactive thread utilities
      • prolog_debug.pl
      • prolog_profile.pl -- Execution profiler
      • intercept.pl
      • prolog_metainference.pl
      • prolog_trace.pl
      • optparse.pl
      • make.pl
      • files.pl
      • shell.pl
 safe_goal(:Goal) is det
True if calling Goal provides no security risc. This implies that:
  • The call-graph can be fully expanded. Full expansion stops if a meta-goal is found for which we cannot determine enough details to know which predicate will be called.
  • All predicates referenced from the fully expanded are whitelisted by the predicate safe_primitive/1 and safe_meta/2.
  • It is not allowed to make explicitly qualified calls into modules to predicates that are not exported or declared public.
Errors
- instantiation_error if the analysis encounters a term in a callable position that is insufficiently instantiated to determine the predicate called.
- permission_error(call, sandboxed, Goal) if Goal is in the call-tree and not white-listed.