Skip to content

feat(guardrails): deny another identity domain's markers in identity positions #9746

Description

@kyle-sexton

Parent

Refs #5945

Depends on

Outcome

A command carrying another domain's identity marker in an identity position is denied (rule 4):
git remote add or set-url to the other domain's org, a user.email= or --author with its address, its
gh or az config directory name.

Decisions

  • Epic feat(guardrails): generalize machine-local safety guards into plugin guards #5943 defaults, adopted: the guard lives in guardrails behind its dispatcher and a per-guard kill switch;
    bash under the node entry point; port behavior, not the local Python.
  • The domain map is derived from /harness-ops:machine-profile and is machine-local: it never sits in a tracked
    file, fixture or doc. Placeholders only.
  • Fail open on any internal error; every exit is 0 with the decision in stdout JSON.
  • The guard reads command text: a deterrent, not a sandbox. Declared gaps: computed paths, scripts run by name.

Key interfaces

  • plugins/guardrails/hooks/block-cross-domain.sh and plugins/guardrails/hooks/block-cross-domain.test.sh, the Bash|PowerShell row of plugins/guardrails/hooks/hooks.json,
    plugins/guardrails/README.md, docs/conventions/hook-precision, docs/conventions/hook-budget.

Done when

  • scripts/run-test-file.sh plugins/guardrails/hooks/block-cross-domain.test.sh exits 0 with deny cases for each identity position and allow cases for the same marker in a non-identity position (a commit message, an echo).
  • git grep -nE "melodic|kyle|sexton" -- plugins/guardrails/hooks/block-cross-domain.sh plugins/guardrails/hooks/block-cross-domain.test.sh prints nothing (placeholders only).
  • scripts/run-test-file.sh plugins/guardrails/hooks/run-guards.test.sh exits 0, including the guardrails: Bash|PowerShell PreToolUse row takes 30+s on a ~70 KB command; its 60s timeout fails open #4528 long-command ceiling case.
  • The PR reports the Bash|PowerShell row's added time, measured as docs/conventions/hook-budget describes, inside that budget.
  • scripts/check-changelog-fragments.sh --check-required origin/main exits 0.

Activity

  1. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.
    on Oct 24, 2026
  2. melodic-automation-lanes commented on Oct 24, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: merged pull request #10871 names it with Refs: after its newest decision or refinement comment, so its work may already be done: close the issue if it is, or post a comment whose first line is **Decision recorded.** saying what is left, which sends it back through intake. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  3. added
    admission-deferredAdmitted but waiting for WIP room; the hourly work-unblock sweep labels it agent-ready.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    and removed
    admission-deferredAdmitted but waiting for WIP room; the hourly work-unblock sweep labels it agent-ready.
    on Oct 24, 2026
  4. melodic-automation-lanes commented on Oct 29, 2026

    @melodic-automation-lanes
    Contributor

    The lanes App's pull request #10871 merged with Refs:, so this issue stays open and nothing starts the lane on it again. work-unblock removed status: ready and agent-ready, so the hourly triage sweep sends it back to intake triage. Admission then parks it at status: confirmed for a check of what that pull request left, until a **Decision recorded.** comment says what is left or someone closes it.

  5. removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Oct 29, 2026
  6. github-actions commented on Oct 29, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (attempt 1 of 2).

  7. github-actions commented on Oct 29, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Medium
    Uncertainty: Knowable
    Flags: none
    Blocked by: none

    I understand this as adding a guardrails hook that denies another identity domain's markers (git remote org, user.email or --author, gh/az config directory) in identity positions only, with placeholders only in tracked files.

    #9743 no longer appears among the open issues, so I list no blocker. The guard script and its test file already exist in plugins/guardrails/hooks/, and merged PR #10871 referenced this issue. What that PR left against the done-when list needs a check: the deny and allow cases, the placeholder grep, the run-guards ceiling case, the hook-budget measurement and the changelog fragment. No duplicates found.

    Automated triage, applied by the lanes App.

  8. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    and removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Oct 29, 2026
  9. melodic-automation-lanes commented on Oct 29, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: confirmed; its comment says why.

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

    area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.priority: mediumReal value, no hard deadline; normal backlog flow.status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions