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

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl -- Apply predicates on a list
      • lists.pl
      • broadcast.pl
      • shlib.pl -- Utility library for loading foreign objects (DLLs, shared objects)
      • option.pl -- Option list processing
      • thread_pool.pl -- Resource bounded thread management
      • gensym.pl
      • settings.pl
      • arithmetic.pl
      • main.pl
      • readutil.pl -- Read utilities
      • operators.pl
      • pairs.pl
      • prolog_source.pl
      • record.pl
      • quasi_quotations.pl -- Define Quasi Quotation syntax
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl
      • random.pl -- Random numbers
      • base64.pl -- Base64 encoding and decoding
      • 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 -- Binary associations
      • prolog_format.pl -- Analyse format specifications
      • predicate_options.pl
      • csv.pl -- Process CSV (Comma-Separated Values) data
      • pprint.pl -- Pretty Print Prolog terms
      • atom.pl
      • modules.pl
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl
      • ugraphs.pl
      • url.pl
      • www_browser.pl
      • prolog_pack.pl
      • git.pl
      • utf8.pl
      • dialect.pl
      • system.pl
      • terms.pl
      • date.pl
      • persistency.pl
      • iostream.pl -- Utilities to deal with streams
      • prolog_stack.pl -- Examine the Prolog stack
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl
      • prolog_code.pl
      • sort.pl
      • dicts.pl
      • dif.pl
      • varnumbers.pl
      • pio.pl
      • writef.pl
      • rbtrees.pl
      • backcomp.pl -- Backward compatibility
      • base32.pl
      • charsio.pl
      • codesio.pl -- I/O on Lists of Character Codes
      • coinduction.pl
      • heaps.pl
      • statistics.pl -- Get information about resource usage
      • when.pl
      • prolog_trace.pl -- Print access to predicates
      • optparse.pl
      • make.pl
      • help.pl
      • exceptions.pl
      • readln.pl
      • intercept.pl
      • prolog_autoload.pl -- Autoload all dependencies
      • check.pl
      • threadutil.pl -- Interactive thread utilities
      • prolog_debug.pl
      • prolog_jiti.pl
      • listing.pl
      • hashtable.pl
      • qsave.pl
      • zip.pl -- Access resource ZIP archives
      • ctypes.pl -- Character code classification
      • prolog_profile.pl
      • prolog_codewalk.pl -- Prolog code walker
      • files.pl
      • increval.pl -- Incremental dynamic predicate modification
      • tables.pl -- XSB interface to tables
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • prolog_versions.pl -- Demand specific (Prolog) versions
      • prolog_history.pl
      • nb_set.pl
      • prolog_metainference.pl
      • prolog_coverage.pl -- Coverage analysis tool
      • explain.pl
      • thread.pl
      • strings.pl
      • edit.pl
      • portray_text.pl
      • fastrw.pl
      • macros.pl
      • rwlocks.pl
      • prolog_wrap.pl
      • quintus.pl
      • shell.pl
      • prolog_config.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.