Skip to content

S603: sys.executable flagged as untrusted input #24084

@steovd

Description

@steovd

Summary

Ruff treats sys.executable as untrusted input when AFAIK it is not.

subprocess.run([sys.executable, "-m", "pip", "install", "ruff"], check=True)

In Ruff 0.15.6, this gets flagged with S603 `subprocess` call: check for execution of untrusted input.

#17112 was solved by allowing string literals, so maybe another exception can be added?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions