Skip to content

How to write CodeQL rules? #20159

@Firebasky

Description

@Firebasky

code:

import os
from fastapi import FastAPI

#  close docs_url and redoc_url is safe
app1 = FastAPI(docs_url=None, redoc_url=None)
app2 = FastAPI()
app3 = FastAPI(docs_url="/docs", redoc_url="/redoc")
app4 = FastAPI(docs_url="/docs")
app5 = FastAPI(redoc_url="/redoc")

In the code above, only app1 is created safely, while the others are risky. I want to write CodeQL to search for risky code snippets, and it needs to support @kind path-problem. Can any master help me?

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