Skip to content

no-interpreter-source-arguments

Keep interpreter programs in linted files or modules, outside process argv and literal Python stdin.

Why

Moving deployment logic from YAML into Python still bypasses language checks when the Python wrapper passes program source through interpreter flags, jq/awk argv, or literal Python stdin.

Fix

Invoke a repository-owned file or module covered by the normal language checks; pass configuration as arguments rather than interpreter source.

Examples

Before — flagged Process argv contains unchecked Python source
tools/check.py
import subprocess
subprocess.run(["python3", "-c", "print(1)"], check=True)
After — preferred Process argv invokes a checked module
tools/check.py
import subprocess
subprocess.run(["python3", "-m", "tools.verify", "-c", "strict"], check=True)
Before — flagged Process stdin contains unchecked Python source
tools/check.py
import subprocess
subprocess.run(["python3", "-"], input="print(1)", text=True)
After — preferred An external module receives stdin as data
tools/check.py
import subprocess
subprocess.run(["python3", "-m", "tools.verify"], input="print(1)", text=True)