dotnet / dotnet/extensions

Warn when non-instance members are annotated with data classification attributes

Open
#4,669 0 comments 0 reactions 0 assignees View on GitHub
area-compliance enhancement
Dominant language
C#
Stars
3.2k
Forks
894
Avg merge
1d 12h
Merged PRs (30d)
23

Description

Originally raised in the PR: https://github.com/dotnet/extensions/pull/4658/files/10aaa0f1ff678707dd3dcc24556f52e6e83c6d5d#diff-34c8e3af3817fab6821f66bbb4341255c5413079bc94560de0a77e973412701f

TL;DR: we should add an analyzer (or emit a warning in our logging source-gen) when someone applies a data classification attribute on a non-instance member (e.g. `const` or `static` field):
```cs
class MyClass
{
[PrivateData] public const string ConstFieldBase = "Sensitive information...";
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.