Share via


Best Practices for Security in VSPackages

To install the Visual Studio SDK on your computer, you must be running in a context with administrative credentials. The basic unit of security and deployment of a Visual Studio application is the VSPackages. A VSPackage must be registered by using Visual Studio, which also requires administrative credentials.

Administrators have full permissions to write to the registry and file system, and to run any code. You must have these permissions to develop, deploy, or install a VSPackage.

Before loading a VSPackage, Visual Studio verifies that the package has a valid package load key (PLK). However, PLKs are not useful as a security mechanism. For more information, see VSPackage Load Keys.

As soon as it is installed, a VSPackage is fully trusted. Because of this high level of permission associated with a VSPackage, it is possible to inadvertently install a VSPackage that has malicious intent.

Users should ensure that they install VSPackages only from trusted sources. Companies developing VSPackages should strongly name and sign them, to assure the user that tampering is prevented. Companies developing VSPackages should examine their external dependencies, such as web services and remote installation, to evaluate and correct any security issues.

For more information, see Secure Coding Guidelines for the .NET Framework (https://msdn.microsoft.com/library/en-us/dnnetsec/html/seccodeguide.asp).

See Also

Concepts

Add-in Security

DDEX Security