Skip to content

Shell (all families): text on a first-line #! interpreter line stays in the code stream #9462

Backlog

Description

@squid-protocol

SOP-002-v1 gap-cell decoy suite (epic #8863), Shell batch.

Leak. The #! interpreter line is a # comment, but when it is the first line of the file it stays in the code stream, so a keyword on it counts. A #! line that is not on line 1 is stripped correctly.

#!/bin/sh set -euo pipefail

Expected safety 0, actual 1 (same for comprehensions with {1..5}, dependency_injection with ${1:-x}, pointers with declare -n; state_mutation is anchored so it does not show it). The same text on line 2 gives 0. Pinned by strict xfail in tests/decoys/test_decoy_shell.py. Low impact in practice (real shebangs carry few such words) but it is a measured comment-form leak.

Activity

  1. added
    bug
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions