Skip to content

Commit ce4d2ef

Browse files
committed
Fix typos
1 parent 5bde17e commit ce4d2ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

secure-dev-c-sharp.mdc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Generated code must not violate these rules. If a rule is violated, a comment mu
1212

1313
## 1. Validate All external inputs
1414
- **Rule:** Validate all external inputs by manually checking the type, format and size of the input manually or by using libraries like `FluentValidation`.
15-
For file validation, tilize MIME Type Validation libraries, like `MimeDetective` or `HeyRed.Mime` to check whether a file's type and content actually matches the expected type.
15+
For file validation, utilize MIME Type Validation libraries, like `MimeDetective` or `HeyRed.Mime` to check whether a file's type and content actually matches the expected type.
1616

1717
## 2. Use Parameterized Queries in EntityFramework
1818
- **Rule:** Parameterize queries in EntityFramework using LINQ and `FromSqlInterpolated`.
@@ -39,7 +39,7 @@ For file validation, tilize MIME Type Validation libraries, like `MimeDetective`
3939
```
4040

4141
## 3. Avoid Singleton Dependency Injection On User-Specific Services
42-
- **Rule:** When registring services in ASP.NET Dependency Injection, choose the correct service lifetime to avoid exposing unauthorized users to other users' requests.
42+
- **Rule:** When registering services in ASP.NET Dependency Injection, choose the correct service lifetime to avoid exposing unauthorized users to other users' requests.
4343

4444
- **Unsafe:**
4545
```cs
@@ -58,7 +58,7 @@ For file validation, tilize MIME Type Validation libraries, like `MimeDetective`
5858
- **Rule:** Handling of mutable data in Singleton services should be avoided to prevent data inconsistencies. Ensure thread safety in Singletons to avoid race conditions that can cause logic bypass, for example by escalating privilages in authorization logic.
5959

6060
## 5. Ensure Solution's Project Paths Are Within the Expected Directory Structure
61-
- **Rule:** Check that referenced projects inside .sln files do not poimt to suspicious project files outsdie the expected directory structure.
61+
- **Rule:** Check that referenced projects inside .sln files do not point to suspicious project files outside the expected directory structure.
6262

6363
## 6. Use Secure Deserialization Methods
6464
- **Rule:** When deserializing data use type-safe methods to avoid malicious code injection.
@@ -75,7 +75,7 @@ For file validation, tilize MIME Type Validation libraries, like `MimeDetective`
7575
{
7676
PropertyNameCaseInsensitive = true
7777
};
78-
return JsonSerializer.Deserialize<T>(json, options) // Type-safe
78+
return JsonSerializer.Deserialize<T>(json, options); // Type-safe
7979
```
8080

8181
## 7. Validate and Normalize File Paths

0 commit comments

Comments
 (0)