Skip to content

CodeQL cannot parse HTTP annotations in decompiled C# code. #20170

@wooyune1

Description

@wooyune1

Hi CodeQL team. I'm trying to use CodeQL for taint analysis on decompiled C# code. Most features work as expected, but it fails to parse HTTP annotations properly. An example is below and we can see that the decompiled code is similiar to original code. Could you help explain why this happen and suggest how to resolve it?

  [HttpPost]
  [Microsoft.AspNetCore.Mvc.Route("cms/material/message/actions/delete")]
  public async Task<ActionResult<BoolResult>> Delete([FromBody] MessageController.DeleteRequest request)
  {
    MessageController messageController = this;
    if (!await messageController._authManager.HasSitePermissionsAsync(request.SiteId, "site_materialMessage"))
      return ActionResult<BoolResult>.op_Implicit((ActionResult) messageController.Unauthorized());
    int num = await messageController._materialMessageRepository.DeleteAsync(request.Id) ? 1 : 0;
    return ActionResult<BoolResult>.op_Implicit(new BoolResult()
    {
      Value = true
    });
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions