SSingh011905 (Community Member) asked a question.

CSRF issue reported at read-only class variable

We found below logs in CICD pipeline

----------------------------------

CWE-352: Cross-Site Request Forgery (CSRF): agent-pipeline/src/feature/product/productcontroller.cs:34

 

namespace SampleProject.Feature.Product.Controllers

{

[ValidateAntiForgeryToken]

public class ProductController : BaseController

{

 private readonly ProductContext _productContext = new ProductContext();

...

 

 

Issue is reported at above given line. What else can be done to fix this issue?


Topics (5)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.