Skip to content

False positive - uncontrolled data used in network request golang int64 #20610

@geritol

Description

@geritol

Description of the false positive

Rule id: go/request-forgery
Error: Uncontrolled data used in network request

Last analysis path being (url) is highlighted

url := fmt.Sprintf("%s/%d", "some-url", *id)
req, err := http.NewRequestWithContext(ctx, http.MethodPut, url, &buf)

Uncontrolled part of the url is an int64 (*id is highlighted)

I am not sure there are possible exploits around the int64 type and not sure how we would fix this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions