Skip to content

templates/family-root/scripts/siblings.py: with SHAPE_LEGS_TOKEN or SHAPE_LEGS_APP_TOKEN set, make siblings writes the token into every trace2 target the caller names, as #996 found in bootstrap.py #1055

Closed

Description

@brettheap

Goal: make siblings and family.py siblings write the token in SHAPE_LEGS_TOKEN or SHAPE_LEGS_APP_TOKEN to no trace a caller asked git for, as #996 (#1045) makes make bootstrap write it to none.

State

What happens (measured)

Lane 5's probe on main 1a47ed07, with git 2.43.0 and git 2.47.1:

  • The family of tests/test_family.py (two members, local bare remotes, the file transport allowed as the suite allows it), laid out as <tmp>/InkRouter/InkRouter, with SHAPE_LEGS_TOKEN=ghp_FAKEFAKEFAKE0123456789. Offline: GIT_SSH_COMMAND=false and a stub gh.
  • make siblings run twice, so the first run clones both members and the second fetches both; and family.py siblings run once, cloning.
  • Each run asked for traces one of three ways: the six variables GIT_TRACE, GIT_TRACE2, GIT_TRACE2_EVENT, GIT_TRACE2_PERF, GIT_TRACE_PACKET and GIT_TRACE_CURL set to files; trace2.eventTarget in a scratch GIT_CONFIG_GLOBAL; or the same in a scratch GIT_CONFIG_SYSTEM.

What it showed:

  • Every run ended siblings ok: 2 member(s) beside the holder in ..., exit 0, and the token was in neither stdout nor stderr.

  • Every trace2 target held the token, on both gits, for the clone and the fetch, and through family.py siblings too: two lines in each file, one for each member, the start event of the git given the -c. The first line below is 2.43.0's clone and the second 2.47.1's fetch, from trace2-normal.txt; 2.47.1 writes the argument unredacted too:

    10:43:21.481565 common-main.c:56                  start git -c url.https://x-access-token:[email protected]/.insteadOf=https://github.com/ -c url.https://x-access-token:[email protected]/[email protected]: clone ...
    10:44:09.564912 common-main.c:58                  start git -c url.https://x-access-token:[email protected]/.insteadOf=https://github.com/ -c url.https://x-access-token:[email protected]/[email protected]: fetch ...
    
    how the trace was asked for files that held the token, lines in each (both gits; clone, then fetch)
    the six variables, make siblings trace2-event.json, trace2-normal.txt, trace2-perf.txt: 2 and 2
    the six variables, family.py siblings the same three: 2 (clone)
    trace2.eventTarget in the global config cfg-event.json: 2 and 2
    trace2.eventTarget in the system config sys-event.json: 2 and 2
  • GIT_TRACE's and GIT_TRACE_PACKET's files were written and held no token; GIT_TRACE_CURL wrote nothing, with no http remote.

  • The control with no token (make siblings, each of the three ways): the same files written, and no x-access-token in any.

  • The holder's own copy of siblings.py changed only so that the clone and the fetch run in the environment the family root's bootstrap.py: git's update ended by a signal fails the run by name, and B4 with a token in use is told from fetches redone without a trace, so the token reaches no file (#998, #996) #1045's untraced() builds: all twelve runs (three ways, clone and fetch, two gits) ended siblings ok, exit 0, the trace files were still written by the run's other gits, and none held the token.

Not measured: an https remote, since the rewrite reaches only github.com and these probes are offline. #996 measured git 2.43 also writing the rewritten url it gives a remote helper, so a real github.com member would put the token in more lines.

Direction

Run the two gits that siblings.py gives the -c (the clone at :964 and the fetch at :997) in the environment #1045's untraced() builds: every variable whose name begins GIT_TRACE taken out, and GIT_TRACE2, GIT_TRACE2_EVENT and GIT_TRACE2_PERF set to 0, which turns off a target the global or the system config names too. Only where a token is in use; with none, the two gits keep the caller's environment, as now.

Verify

  • make siblings (clone), make siblings again (fetch) and family.py siblings, each with a fake SHAPE_LEGS_TOKEN and, in turn, the trace variables set to files, trace2.eventTarget in the global config, and the same in the system config: exit 0, siblings ok, the trace files written, and the token in no file under the run's TMPDIR and in no output.
  • The same with SHAPE_LEGS_APP_TOKEN.
  • With no token, the clone and the fetch are still traced where the caller asked.
  • Each such row with a token fails on main's siblings.py: the token is in trace2-event.json, trace2-normal.txt and trace2-perf.txt, as measured above.

Found by lane 5's independent review of #1045 (#998, #996), rv996 (#1045 issuecomment-6288783192), and measured by lane 5.

Milestone: v1.2.0 (placement is lane 3's call).

Not claimed.

Lane: openreposhape-5 (openRepoShape-5)

Activity

  1. added this to the v1.2.0 milestone on Oct 20, 2026
  2. brettheap commented on Oct 20, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-20T12:53:38Z, for #1055

    Logged in lanes/log/openRepoShape-5.md at 83f0634d873a53125c4128ed89196f86a0c92957.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1055:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1055"`, kept where the row or its body names `#1055`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1055` as a whole token:
       none
    
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions