Questions tagged [code-access-security]

Code-access security is security specific to limiting access to or protecting source code, through the use of processes such as encryption, obfuscation, and more.

Code-access security is security specific to limiting access to or protecting source code, through the use of processes such as , , and more. The goal of code-access security is most often to protect functionality from competitors, to prevent reverse-engineering, or to preserve integrity of program communication protocols.

For more on obfuscation:

Note that security questions which are not about a specific programming problem may be better suited to our sister site, IT Security Stack Exchange.

337 questions
5
votes
1 answer

Widget Security

I am working on a javascript widget that will allow users to sign-up for a list. This widget will be embeddable on customer websites. Because it is all client-side driven, minus the requests back to the server. I've been trying to come up with ways…
Seth
  • 659
  • 2
  • 7
  • 21
5
votes
2 answers

c# dll encryption

I need to encrypt my C# code used by by ASP.NET pages. So, when I compile to create an DLL file I do need to encrypt my DLL file. Please do help me how to encrypt DLL file...
Karthik Malla
  • 5,570
  • 12
  • 46
  • 89
5
votes
2 answers

Load Assembly with custom Permissions

I need to load an untrusted assembly into my AppDomain. I don't want to Sandbox a new AppDomain for this assembly to execute in, because it internally requires access to certain functionality such as HttpContext.Current (which would be null in a…
Jeff
  • 35,755
  • 15
  • 108
  • 220
5
votes
7 answers

Protecting source code from theft during development

Is there any way to protect my code during development so that if a developer leaves my company they are unable to access files in my project? This is especially important with TFS where the project is downloaded locally, cached, and available for…
5
votes
1 answer

Xamarin.IOS. Code analysis - CA2123

I have Microsoft Extended Correctness Rules rule set for my Xamarin.IOS project. When I analysed I had many troubles: CA2123: Add the following security attribute to BooleanNegationConverter.Convert(object, Type, object, CultureInfo) in order to…
5
votes
5 answers

Testing .NET code in partial trust environments

I want to test the behavior of a certain piece of .NET code in partial trust environments. What's the fastest way to set this up? Feel free to assume that I (and other readers) are total CAS noobs. @Nick: Thanks for the reply. Alas, the tool in…
Curt Hagenlocher
  • 20,680
  • 8
  • 60
  • 50
5
votes
7 answers

How to restrict to add an item to List?

I have Class called Person containing to properties, Father and List of Children. I want every one to use only AddChild Method to add children, not the List.Add method , so how do I restrict use of it? public class Person { private List
Prashant Cholachagudda
  • 13,012
  • 23
  • 97
  • 162
5
votes
2 answers

How can I successfully run secannotate.exe on a library that depends on a Portable Class Library?

I am working on the Autofac project trying to convert all of our common logic into Portable Class Libraries and adding platform-specific libraries for specific functionality. My development machine is Windows 8 Enterprise (64-bit) and I have VS 2012…
Travis Illig
  • 23,195
  • 2
  • 62
  • 85
4
votes
3 answers

Are there any coding guidelines for the Android platform that focus on security?

Are there any good coding guidelines for the Android platform that focus on security? Thanks
Dan Largo
  • 1,075
  • 3
  • 11
  • 25
4
votes
1 answer

.NET/Security: Limiting runtime-loaded assemblies from accessing certain APIs

In a shell application, I need to be able to load and execute other .NET assemblies at runtime, but without giving them full trust. Essentially, I want to limit them (the loaded assemblies) from touching any system resources (threading, networking,…
user438034
4
votes
1 answer

Sandboxing untrusted code in c#, Security Permissions seem not working

This is my code: System.Security.PermissionSet PS = new System.Security.PermissionSet(PermissionState.None); PS.AddPermission(new FileIOPermission(FileIOPermissionAccess.AllAccess,Path)); PS.AddPermission(new…
4
votes
2 answers

Limiting Access to a DLL in .NET

I write in-house software for a company. I always want to leverage OOP techniques as best as I can. In this thinking, I want to create a Data Access Layer (DAL) isolated in its own .DLL. What can I do to limit the access of the DAL DLL to only my…
HardCode
  • 6,497
  • 4
  • 31
  • 54
4
votes
2 answers

Are there commercially deployed and used .NET CAS (Code Access Security) based applications?

I've seen a couple threads here on SO that ask about what CAS is and how to use it.My specific is specifically focused on real-world usages of CAS. For example: DotNetNuke did some efforts in the past to be able to run under Medium Trust: is that…
Dinis Cruz
  • 4,161
  • 2
  • 31
  • 49
4
votes
2 answers

Is it possible to provide security for war file?

I have developed a web application which I am going to sell, but I face some security issues because I am going to provide a .war file to client machines and I found .war files can be easily extracted. How can one provide security for war files to…
Nilesh12
  • 99
  • 1
  • 2
  • 15
4
votes
1 answer

Code Access Security exception in restricted AppDomain

Goal: I need to run some code in an AppDomain with very limited permissions - it should have no access to anything at all fancy or unsafe, except for a few helper methods that I have defined elsewhere. What I've done: I'm creating a sandbox…
staafl
  • 3,147
  • 1
  • 28
  • 23