Skip to content

harden(pyrb+cloud): re-rebase agent-generated work onto post-PR-#44 develop (continuation of #36 #38) #45

Closed

Description

@thehoff

Status

Agent-generated branches harden/pyrb-wip (issue #36) and harden/cloud-wip (issue #38) are pushed to the fork. Both contain fully-functional commits with passing tests on their original base (pre-#44 develop).

The original session ran 6 parallel agents; 4 merged cleanly (#39/#34/#35/#37 → PRs #41/#42/#43/#44). The pyrb and cloud branches need re-rebasing onto current develop. The previous rebase attempt hit structural conflicts in src/core/utils.rs (multiple PRs added per-tool helpers to overlapping regions); recovery via additive merge corrupted function bodies.

Resolution path (for the next session)

Recommended approach — DO NOT use the previous python-additive merger:

  1. Reset harden/pyrb-wip to current develop
  2. Cherry-pick the original commit OR manually apply the diff in two steps:
    • Apply non-utils.rs file changes (these have no conflict)
    • Surgically copy the per-tool helper functions from the WIP branch's src/core/utils.rs into the new utils.rs, placed AFTER existing per-tool helpers but BEFORE any tests/mod blocks
  3. Build, test, codex review, push, PR, merge
  4. Same for harden/cloud-wip

Source-of-truth files in the WIP branches

harden/pyrb-wip adds to utils.rs (per agent report):

  • secure_python_command(), secure_ruby_command(), secure_jvm_command(), secure_dotnet_command(), secure_go_command() (opportunistic Go)
  • check_forbidden_{pytest,mypy,rspec,rubocop,gradle,pip}_args()
  • Per-runtime constants
  • mod secure_pyrbjvmdotnet_tests (23 unit tests)

Wire-ins: src/cmds/{python,ruby,jvm,dotnet,go}/*_cmd.rs. New tests/runtime_hardening.rs with 12 integration tests.

harden/cloud-wip adds to utils.rs (per agent report):

  • secure_{kubectl,docker,aws,psql,curl,wget}_command()
  • check_forbidden_{kubectl,docker,aws,curl,wget}_args()
  • mod secure_cloud_tests (16 unit tests)

Wire-ins: src/cmds/cloud/{aws,psql,curl,wget,container,web}_cmd.rs, plus a cloud_fallback_hardening() in main.rs's run_fallback (load-bearing — clap parse-fail on kubectl --kubeconfig … otherwise bypasses the Kubectl subcommand and spawns raw). New tests/cloud_hardening.rs with 14 integration tests.

Issue conversion

These can fold back into #36 / #38 as "ready to land" once rebased. Or close those and file fresh.

Activity

  1. added
    enhancement
    on May 18, 2026
  2. thehoff commented on May 18, 2026

    @thehoff
    OwnerAuthor

    Both pyrb (#36 → PR #46) and cloud (#38 → PR #47) landed via surgical cherry-pick + manual conflict resolution as scoped in this issue. The python-additive merger that broke things on the first attempt was the lesson; see feedback memory for the rule we adopted: never use language-naive regex merge on Rust files.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions