Revision Difference
AccessList#530506
<cat>Code.Misc</cat>
<title>Code Accesslist</title>
S&box uses an accesslist to restrict which types and members you can access from your code. This is necessary to prevent access to dangerous functions such as `Process.Start`, `DllImport` or reflection. You can only access types and members that are allowed in the accesslist below.
# How it works
After your addon gets compiled the generated assembly will be scanned for all used types. Any call to a type or method that is not allowed explicitly will result in the addon not getting loaded.
After your addon gets compiled the generated assembly will be scanned for all used types. Any call to a type or member that is not allowed explicitly will result in the addon not getting loaded.
# Reporting a bug
Since escaping or bypassing the sandbox would result in serious security issues (such as getting infected with malware just by joining servers), please report them properly as described [here](https://github.com/Facepunch/sbox-issues/security/policy). *Do not report them publicly*.
# Accesslist
`config\accessgroups\baseaccess.txt`:
```
Sandbox.Engine/*
Sandbox.Game/*
Sandbox.System/*
System.Private.CoreLib/System.Void
System.Private.CoreLib/System.Void.*
System.Private.CoreLib/System.Boolean
System.Private.CoreLib/System.Boolean.*
System.Private.CoreLib/System.Double
System.Private.CoreLib/System.Double.*
System.Private.CoreLib/System.Int16
System.Private.CoreLib/System.Int16.*
System.Private.CoreLib/System.UInt16
System.Private.CoreLib/System.UInt16.*
System.Private.CoreLib/System.Int32
System.Private.CoreLib/System.Int32.*
System.Private.CoreLib/System.UInt32
System.Private.CoreLib/System.UInt32.*
System.Private.CoreLib/System.UInt64
System.Private.CoreLib/System.UInt64.*
System.Private.CoreLib/System.Int64
System.Private.CoreLib/System.Int64.*
System.Private.CoreLib/System.IntPtr
System.Private.CoreLib/System.IntPtr.*
System.Private.CoreLib/System.Single
System.Private.CoreLib/System.Single.*
System.Private.CoreLib/System.Object
System.Private.CoreLib/System.Object.*
System.Private.CoreLib/System.String
System.Private.CoreLib/System.String.*
System.Private.CoreLib/System.Action*
System.Private.CoreLib/System.Func*
System.Private.CoreLib/System.Type
System.Private.CoreLib/System.Type.*
System.Private.CoreLib/System.Array
System.Private.CoreLib/System.Array.*
System.Private.CoreLib/System.Char
System.Private.CoreLib/System.Char.*
System.Private.CoreLib/System.IDisposable*
System.Private.CoreLib/System.Collections.*
System.Private.CoreLib/System.Math.*
System.Linq/*
System.Private.CoreLib/System.Byte*
System.Private.CoreLib/System.Nullable*
System.Private.CoreLib/System.Predicate*
System.Private.CoreLib/System.IO.BinaryWriter*
System.Private.CoreLib/System.IO.BinaryReader*
System.Private.CoreLib/System.Threading.Tasks.Task
System.Private.CoreLib/System.Threading.Tasks.Task.Yield()
System.Private.CoreLib/System.Threading.Tasks.Task`1
System.Private.CoreLib/System.Threading.Tasks.Task`1.*
System.Private.CoreLib/System.Runtime.CompilerServices.AsyncTaskMethodBuilder*
System.Private.CoreLib/System.Runtime.CompilerServices.YieldAwaitable*
System.Private.CoreLib/System.Runtime.CompilerServices.IAsyncStateMachine
System.Private.CoreLib/System.Activator.CreateInstance<T>()
System.Private.CoreLib/System.Guid*
System.Private.CoreLib/System.IO.MemoryStream*
System.Private.CoreLib/System.IO.Stream*
System.Private.CoreLib/System.Runtime.CompilerServices.TaskAwaiter*
System.Private.CoreLib/System.Threading.Tasks.Task.Delay*
System.Private.CoreLib/System.Threading.Tasks.Task.GetAwaiter*
System.Private.CoreLib/System.Threading.CancellationToken*
System.Private.CoreLib/System.Enum*
System.Private.CoreLib/System.IAsyncResult
System.Private.CoreLib/System.AsyncCallback
System.Private.CoreLib/System.Runtime.CompilerServices.AsyncVoidMethodBuilder*
System.Private.CoreLib/System.Environment.get_CurrentManagedThreadId()
System.Private.CoreLib/System.DateTime*
System.Private.CoreLib/System.DayOfWeek*
System.Private.CoreLib/System.HashCode*
System.Private.CoreLib/System.StringSplitOptions*
System.Private.CoreLib/System.Threading.Interlocked*
System.Private.CoreLib/System.Delegate
System.Private.CoreLib/System.Delegate.Combine(*
System.Private.CoreLib/System.Delegate.Remove(*
System.Private.CoreLib/System.Exception*
System.Private.CoreLib/System.NotImplementedException*
System.Private.CoreLib/System.NotSupportedException*
System.Private.CoreLib/System.Math.*
System.Private.CoreLib/System.MathF.*
System.Private.CoreLib/System.RuntimeFieldHandle
System.Private.CoreLib/System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray( System.Array, System.RuntimeFieldHandle )
System.Private.CoreLib/System.IO.Path.*
System.Private.CoreLib/System.IO.FileMode
System.Private.CoreLib/System.IO.SeekOrigin
System.Text.RegularExpressions/System.Text.RegularExpressions.*
System.Private.CoreLib/System.Text.Encoding*
System.Private.CoreLib/System.Buffers.ArrayPool*
System.Private.CoreLib/System.Convert.ToInt32*
System.Net.Http/System.Net.Http.HttpClient*
System.Net.Http.Json/System.Net.Http.Json.HttpClientJsonExtensions*
System.Private.CoreLib/System.TimeSpan*
System.Private.CoreLib/System.RuntimeTypeHandle
System.Private.CoreLib/System.StringComparison
System.Private.CoreLib/System.FlagsAttribute
System.Private.CoreLib/System.Runtime.CompilerServices.IsReadOnlyAttribute
System.Private.CoreLib/System.Runtime.CompilerServices.ExtensionAttribute
System.Private.CoreLib/System.Runtime.CompilerServices.IteratorStateMachineAttribute
System.Private.CoreLib/System.Runtime.CompilerServices.AsyncStateMachineAttribute
System.Private.CoreLib/System.Runtime.CompilerServices.CompilerGeneratedAttribute
System.Private.CoreLib/System.Runtime.CompilerServices.PreserveBaseOverridesAttribute
System.Private.CoreLib/System.Diagnostics.DebuggerBrowsableAttribute
System.Private.CoreLib/System.Diagnostics.DebuggerHiddenAttribute
System.Private.CoreLib/System.Diagnostics.DebuggerStepThroughAttribute
System.Text.Json/System.Text.Json.Serialization.JsonPropertyNameAttribute
```