mirror of
https://github.com/github/codeql.git
synced 2026-06-19 03:41:07 +02:00
Fix test comments: replace GOOD/BAD markers with flow source descriptions
Per review feedback, GOOD/BAD markers don't apply to flow source enumeration tests. Use descriptive comments instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -67,7 +67,7 @@ namespace Testing
|
||||
// Razor Page handler tests
|
||||
public class MyPageModel : Microsoft.AspNetCore.Mvc.RazorPages.PageModel
|
||||
{
|
||||
// BAD: handler method parameters are user-controlled
|
||||
// Handler method parameters are remote flow sources
|
||||
public void OnGet(string id) { }
|
||||
|
||||
public void OnPost(string command, int count) { }
|
||||
@@ -78,10 +78,10 @@ namespace Testing
|
||||
|
||||
public void OnDelete(string itemId) { }
|
||||
|
||||
// GOOD: not a handler method (doesn't start with On)
|
||||
// Not a handler method — does not start with "On", so not a flow source
|
||||
public void GetUser(string userId) { }
|
||||
|
||||
// GOOD: marked with NonHandler attribute
|
||||
// Excluded by [NonHandler] attribute, so not a flow source
|
||||
[Microsoft.AspNetCore.Mvc.RazorPages.NonHandlerAttribute]
|
||||
public void OnGetNonHandler(string param) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user