When an application is installed, all files included within
an AIR installer file are installed onto the user's computer into
an application directory. All files within the application directory
tree are assigned to the application sandbox when the application
is run. Content in the application sandbox is allowed the full privileges
available to an AIR application, including interaction with the
local file system.
Many AIR applications use only these locally installed files
to run the application. However, AIR applications are not restricted
to just the files within the application directory — they can load
any type of file from any source. This includes files on the user's
computer as well as files from external sources, such as those on
a local network or from the Internet. File type has no impact on
security restrictions; loaded HTML files have the same security
privileges as loaded SWF files from the same source. (However, content
in the application sandbox is restricted from loading JavaScript
files from outside that sandbox. Details are provided in the developer
documentation.)
Content in the application security sandbox has access to AIR
APIs that content in other sandboxes is prevented from using. For
example, only content in the application security sandbox can read
and write to the local file system.
Some JavaScript techniques exist for dynamically transforming
strings into executable code. Content in the application security
sandbox can only use these techniques while code is loading from
application URLs. Using these techniques within the application
sandbox would pose a security risk. For example, an application
could inadvertently execute a string loaded from a network sandbox,
and that string may contain malicious code, such as code to delete
or alter files on the user’s computer or to report back the contents
of a local file to an untrusted network domain. Details are provided
in the developer documentation.
Note:
In mobile AIR applications, HTML and JavaScript cannot be
loaded into the application sandbox. Mobile AIR applications display
such content using the system web control. This control has the
same security considerations as the default system web browser.