The application uses Transparency attributes such as SecurityCriticalAttribute and SecuritySafeCriticalAttribute to identify code that performs critical security operations. However a transparency conflict is created when a member is marked with a security attribute that has a different transparency than the security attribute of a container of the member.
Cause unexpected behaviors in the application.
Remove nested transparency annotation to avoid security attributes conflicts.
Anonymous attacker from Internet.
⌚ 30 minutes.
Default score using CVSS 3.1. It may change depending on the context of the src.
Default score using CVSS 4.0. It may change depending on the context of the src.
The source code does not have any transparency annotations in production
using System;
using System.Security;
namespace MyLibrary{
public class Foo{
public void Bar(){
//Do something
}
public void Testeo(){
//Do something
}
}
}
There are nested transparency annotations in the source code
using System;
using System.Security;
namespace MyLibrary{
[SecurityCritical]
public class Foo{
[SecuritySafeCritical]
public void Bar(){
//Do something
}
public void Testeo(){
//Do something
}
}
}
https://rules.sonarsource.com/csharp/type/Vulnerability/RSPEC-4211