Skip to content

Commit 7e08341

Browse files
Add exclusion for modern InternalsVisibleTo in SDK-style projects (#630)
* Add exclusion for modern InternalsVisibleTo in SDK-style projects * Update secrets.json test * Update Changelog.md
1 parent ba3d17a commit 7e08341

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.0.41] - 2024-08-23
8+
## Rules
9+
Extend the false positive fix for the issue reported in #548 to Sdk-style msbuild projects.
10+
711
## [1.0.40] - 2024-7-08
812
## Fix
913
Fixes extraneous printing of git errors when git ignore checking is enabled during analysis.

rules/default/security/privacy/secrets.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,26 @@
3131
},
3232
"negate_finding": true,
3333
"search_in": "same-line"
34+
},
35+
{
36+
"pattern" :
37+
{
38+
"pattern": "<InternalsVisibleTo Include=",
39+
"type": "substring",
40+
"scopes": [
41+
"code"
42+
]
43+
},
44+
"negate_finding": true,
45+
"search_in": "same-line"
3446
}
3547
],
3648
"must-match": [
3749
"var hash = \"121212121212121212121212121212\""
3850
],
3951
"must-not-match": [
40-
"[assembly: InternalsVisibleTo(\"Application.Tests, PublicKey=1234567890abcd\")]"
52+
"[assembly: InternalsVisibleTo(\"Application.Tests, PublicKey=1234567890abcd\")]",
53+
"<InternalsVisibleTo Include=\"Application.Tests\" Key=\"1234567890abcd\"/>"
4154
]
4255
},
4356
{
@@ -69,4 +82,4 @@
6982
"must-not-match": [
7083
]
7184
}
72-
]
85+
]

0 commit comments

Comments
 (0)