/usr/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 -- Setting management
      • arithmetic.pl
      • main.pl
      • readutil.pl -- Read utilities
      • operators.pl -- Manage operators
      • pairs.pl
      • prolog_source.pl
      • record.pl -- Access compound arguments by name
      • quasi_quotations.pl -- Define Quasi Quotation syntax
      • sandbox.pl -- Sandboxed Prolog code
        • 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
        • sandbox_allowed_directive/1
        • sandbox_allowed_expansion/1
        • sandbox_allowed_goal/1
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • yall.pl
      • assoc.pl
      • prolog_format.pl -- Analyse format specifications
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl
      • random.pl
      • base64.pl -- Base64 encoding and decoding
      • aggregate.pl -- Aggregation operators on backtrackable predicates
      • predicate_options.pl
      • csv.pl
      • pprint.pl
      • atom.pl
      • modules.pl
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl
      • ugraphs.pl
      • url.pl -- Analysing and constructing URL
      • www_browser.pl
      • prolog_pack.pl
      • git.pl
      • utf8.pl
      • quintus.pl
      • prolog_versions.pl -- Demand specific (Prolog) versions
      • prolog_wrap.pl
      • dialect.pl
      • date.pl -- Process dates and times
      • persistency.pl
      • iostream.pl -- Utilities to deal with streams
      • prolog_code.pl
      • strings.pl
      • dif.pl
      • edinburgh.pl
      • terms.pl
      • ansi_term.pl
      • threadutil.pl -- Interactive thread utilities
      • prolog_stack.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl
      • sort.pl
      • dicts.pl
      • varnumbers.pl
      • rbtrees.pl -- Red black trees
      • backcomp.pl -- Backward compatibility
      • charsio.pl -- I/O on Lists of Character Codes
      • base32.pl
      • codesio.pl
      • coinduction.pl
      • heaps.pl
      • statistics.pl
      • when.pl -- Conditional coroutining
      • prolog_debug.pl -- User level debugging tools
      • ctypes.pl -- Character code classification
      • shell.pl
      • hashtable.pl
      • increval.pl -- Incremental dynamic predicate modification
      • tables.pl
      • intercept.pl
      • streams.pl
      • listing.pl -- List programs and pretty print clauses
      • check.pl
      • make.pl
      • optparse.pl
      • help.pl -- Text based manual
      • thread.pl
      • nb_rbtrees.pl
      • readln.pl
      • writef.pl
      • nb_set.pl
      • macros.pl
      • prolog_coverage.pl
      • files.pl
      • prolog_profile.pl
      • prolog_trace.pl
      • prolog_metainference.pl -- Infer meta-predicate properties
      • prolog_autoload.pl
      • edit.pl
      • prolog_codewalk.pl
      • qpforeign.pl -- Quintus compatible foreign loader
      • exceptions.pl
      • tty.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.