github / github/codeql

False positive "Uncontrolled data used in path expression" in C code

Open
#16,983 4 comments 0 reactions 0 assignees View on GitHub
false-positive
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

In the evaluation of https://github.com/sysrepo/sysrepo/pull/3353, CodeQL seems to think there is uncontrolled data used in path expression, when there is none.

`This argument to a file access function is derived from and then passed to op_export(file_path), which calls fopen(__filename).`

https://github.com/sysrepo/sysrepo/pull/3353/files

`step_create_input_file` is the function responsible to create a unique filename, and is untouched in this diff, and it seems to be not exploitable.

https://github.com/sysrepo/sysrepo/pull/3353/checks?check_run_id=27465095770

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.